Funnel Chart

ALIAS: funnel

Example of Funnel Chart:

FusionCharts should load here..

JavaScript embedding code:

    <script type="text/javascript">
    FusionCharts.ready(function(){
        var myChart = new FusionCharts({
            "type": "funnel",
            "dataFormat": "jsonurl",
            "dataSource": "chartdata.json"
            });
        });
    </script>

Data for this chart:

...

Chart Attributes

Functional Attributes

You can control a variety of functional elements on the chart. For example, you can opt to show/hide data labels, data values, y-axis values. You can also set chart limits and extended properties.

These attributes let you control the functional properties in a Funnel chart.

Name Type Range Description
animation Boolean 0/1 This attribute lets you set the configuration whether the chart should appear in an animated fashion. If you do not want to animate any part of the chart, set this as 0.
clickURL URL in FusionCharts format The entire chart can now act as a hotspot. Use this URL to define the hotspot link for the chart. The link can be specified in FusionCharts Link Format.
palette Number 1-5 Each chart has 5 pre-defined color palettes which you can choose from. Each palette renders the chart in a different color theme.
paletteThemeColor Color Code Hex Code If you want your own palette derived from a particular hex color, you can specify the same here. All other colors on the chart will automatically derive from that palette.
annRenderDelay Number In seconds If you've defined any annotation groups over the chart, using this attribute you can set the duration after which they'll render on the chart. The timer starts from the time the chart has initialized.
showPrintMenuItem Boolean 0/1 Whether to show "Print Chart" item in the context menu of the chart? Even if you opt to hide the item in context menu, you can still opt to invoke `print()` JavaScript method of the chart to print the same.
manageResize
Since 3.2
Boolean 0/1 Setting this attribute to 1, you can allow the chart to automatically resize itself when the parent container of the chart is resized.
useEllipsesWhenOverflow
Since 3.2
Boolean 0/1 When enabled in AUTO mode, long data labels are truncated by adding ellipses to prevent them from overflowing the chart background. The default value is 1.

Chart Captions

These attributes let you configure Chart captions.

Name Type Description
caption String Caption of the chart.
subCaption String Sub-caption of the chart.

Chart Caption Cosmetics

These attributes let you configure the cosmetics of chart caption and sub-caption.

Name Type Range Description
captionAlignment String "left", "center", "right" Sets horizontal alignment of caption
captionOnTop Boolean 0/1 Whether caption should be on top of the data plot area
captionFontSize Number 0 - 72 Sets the caption font size in pixels
subCaptionFontSize Number 0 - 72 Sets the sub-caption font size (in pixels)
captionFont String Font Name Sets the caption font family
subCaptionFont String Font Name Sets the sub-caption font family
captionFontColor Color Hex Code Sets the caption font color
subCaptionFontColor Color Hex Code Sets the sub-caption font color
captionFontBold Boolean 0/1 Whether the caption font should be displayed in bold
subCaptionFontBold Boolean 0/1 Whether the sub caption font should be displayed in bold
alignCaptionWithCanvas Boolean 0/1 Whether the caption is aligned with the canvas. Else, it will be aligned with the entire chart area
captionHorizontalPadding Number In Pixels If caption is not centre aligned, lets you configure the padding (in pixels) from either edge. Will be ignored if caption is centre aligned.

Chart Labels & Values

Data labels refer to the names for the data points which appear on the x-axis and data values refer to the plot values.

These attributes let you configure the properties for chart labels and values.

Name Type Range Description
showLabels Boolean 0/1 Allows you to show/hide the labels of a funnel chart.
showLabelsAtCenter Boolean 0/1 Whether to show the labels of each funnel at its side or at the center? This attribute is only applicable for 2D Pyramid chart.
labelDistance Number In pixels Lets you set the horizontal distance between the data labels & funnel slices.
labelSepChar String If you've opted to show both funnel label & value, this attribute lets you specify the character using which they'll be separated. By default, a comma (,) is used.
enableSmartLabels Boolean 0/1 Whether to use smart lines & labels for the funnel chart?
smartLineColor Color Code Hex Code If you've opted to use smart lines, this attribute lets you define the color for the same.
smartLineThickness Number In pixels Thickness of smart lines.
smartLineAlpha Number 0-100 Alpha of the smart lines.
showValues Boolean 0/1 Allows you to show/hide data values along with the funnel slices on chart.
showPercentValues Boolean 0/1 Whether to show the values as percentage or as absolute values?
percentOfPrevious Boolean 0/1 When showing values in percentage for each slice, you can ask the chart to calculate the percentage value of a slice w.r.t the previous slice (instead of the first slice) by setting this attribute to 1.

Number Formatting Properties

FusionCharts XT offers you a lot of options to format your numbers on the chart.

Using the attributes below, you can control a myriad of options like:

  • Formatting of commas and decimals
  • Number prefixes and suffixes
  • Decimal places to which the numbers will round to
  • Scaling of numbers based on a user defined scale
  • Custom number input formats

These attributes let you appropriately format the numbers displayed on the chart.

Name Type Range Description
formatNumber Boolean 0/1 This configuration determines whether the numbers displayed on the chart will be formatted using commas, e.g., 40,000 if `"formatNumber":"1"` and 40000 if `"formatNumber":"0".`
numberPrefix String Using this attribute, you could add prefix to all the numbers visible on the graph. For example, to represent all dollars figure on the chart, you could specify this attribute to ' $' to show like $40000, $50000.
numberSuffix String Using this attribute, you could add suffix to all the numbers visible on the graph. For example, to represent all figures quantified as per annum on the chart, you could specify this attribute to ' /a' to show like 40000/a, 50000/a.
decimals Number Number of decimal places to which all numbers on the chart will be rounded to.
forceDecimals Boolean 0/1 Whether to add 0 padding at the end of decimal numbers? For example, if you set decimals as 2 and a number is 23.4. If `forceDecimals` is set to 1, the number will automatically be converted to 23.40 (note the extra 0 at the end).
formatNumberScale Boolean 0/1 Configuration whether to add K (thousands) and M (millions) to a number after truncating and rounding it - e.g., if `formatNumberScale` is set to 1, 1043 will become 1.04K (with decimals set to 2 places). Same with numbers in millions - an M will be added at the end.
defaultNumberScale String The default unit of the numbers that you're providing to the chart.
numberScaleUnit String Unit of each block of the scale.
numberScaleValue String Range of the various blocks that constitute the scale.
scaleRecursively Boolean 0/1 Whether recursive scaling should be applied.
maxScaleRecursion Number How many recursions to complete during recursive scaling? -1 completes the entire set of recursion.
scaleSeparator String What character to use to separate the scales that are generated after recursion?
decimalSeparator String This attribute helps you specify the character to be used as the decimal separator in a number.
thousandSeparator String This attribute helps you specify the character to be used as the thousands separator in a number.
thousandSeparatorPosition
Since 3.2 - SR1
Number This option helps you specify the position of the thousand separator.
inDecimalSeparator String In some countries, commas are used as decimal separators and dots as thousand separators. In XML/JSON data, if you specify such values, it will give an error while converting to number. So, FusionWidgets XT accepts the input decimal and thousand separators from user, so that it can convert it accordingly into the required format. This attribute lets you input the decimal separators.
inThousandSeparator String In some countries, commas are used as decimal separators and dots as thousand separators. In XML/JSON, if you specify such values, it will give an error while converting to number. The chart accepts the input decimal and thousand separators from user, so that it can convert it accordingly into the required format. This attribute lets you input the thousand separators.

Funnel Functional Properties

These attributes let you configure the functional properties of the funnel chart.

Name Type Range Description
streamlinedData Boolean 0/1 Whether to present the data as streamlined data or as section data?
is2D Boolean 0/1 Whether the chart will render as 2D?
isSliced Boolean 0/1 This attribute determines whether a funnel slice appears as a part of the total chart or is sliced out as an individual item.
isHollow Boolean 0/1 Whether the funnel slices will render as filled slices or as hollow ones?
useSameSlantAngle Boolean 0/1 In a streamlined funnel chart, whether all slices will have the same slant angle?
funnelYScale Number 0 - 40 Lets you set the 3D perspective of the funnel. You'll need to restrict your values to a value between 0 and 40 (depending on your funnel chart dimensions) to get a proper drawing.

Funnel Cosmetic Properties

These attributes let you configure the cosmetic properties of the funnel chart.

Name Type Range Description
showPlotBorder Boolean 0/1 If you've rendered the funnel chart in 2D mode, you can opt to show or hide the funnel border using this attribute.
plotBorderColor Color Code Hex Code Border color for funnel (only when rendered in 2D mode).
plotBorderThickness Number In pixels Border thickness for funnel (only when rendered in 2D mode).
plotBorderAlpha Number 0-100 Border alpha of funnel slices (only when rendered in 2D mode).
plotFillAlpha Number 0-100 Fill alpha for the funnel slices. This attribute is applicable only in 3D pyramid chart.

Chart Cosmetics

These attributes let you configure chart cosmetics like background color, background alpha, canvas color & alpha etc.

Name Type Range Description
bgColor Color Code Hex Code This attribute sets the background color for the chart. You can set any hex color code as the value of this attribute. To specify a gradient as background color, separate the hex color codes of each color in the gradient using comma. Example: `#FF5904, #FFFFFF`.
bgAlpha Number 0-100 Sets the alpha (transparency) for the background. If you've opted for gradient background, you need to set a list of alpha(s) separated by comma.
bgRatio Numbers separated by comma If you've opted for a gradient background, this attribute lets you set the ratio of each color constituent.
bgAngle Number 0-360 Angle of the background color, in case of a gradient.
showBorder Boolean 0/1 Whether to show a border around the chart or not?
borderColor Color Code Hex Code Border color of the chart.
borderThickness Number In pixels Border thickness of the chart.
borderAlpha Number 0-100 Border alpha of the chart.
bgImage String To place any image (JPG/PNG/GIF) as background of the chart, enter the (path and) name of the background image. It should be in the same domain as the chart.
bgImageAlpha Number 0-100 This attribute specifies the opacity for the loaded background image.
bgImageDisplayMode
Since 3.2
String 'stretch', 'tile', 'fit', 'fill', 'center', 'none' Helps you specify the mode in which the background image is to be displayed. Stretch - expands the image to fit the entire chart area, without maintaining original image constraints. Tile - the image is repeated as a pattern on the entire chart area. Fit - fits the image proportionately on the chart area. Fill -proportionately fills the entire chart area with the image. Center - the image is positioned at the center of the chart area. None - Default mode.
bgImageVAlign
Since 3.2
String 'top', 'middle', 'bottom' Helps you to vertically align the background image.
bgImageHAlign
Since 3.2
String 'left', 'middle', 'right' Helps you to horizontally align the background image.
bgImageScale
Since 3.2
Number 0-300 Helps you magnify the background image. This attribute will only work when the attribute `bgImageDisplayMode` is set to none, center, or tile.
logoURL String You can load an external logo (JPEG/PNG) to your chart, this attribute lets you specify the URL. Due to cross domain security restrictions it is advised to use a logo from the same domain name as your charts.
logoPosition String 'TL', 'TR', 'BL', 'BR', 'CC' Where to position the logo on the chart: TL - Top-left TR - Top-right BR - Bottom right BL - Bottom left CC - Center of screen
logoAlpha Number 0-100 Once the logo has loaded on the chart, you can configure its opacity using this attribute.
logoScale Number 0-100 You can also change the size of externally loaded logo at run-time by specifying a value for this parameter.
logoLink String If you want to link the logo to an external URL, specify the link in this attribute. The link can be in FusionCharts link format, allowing you to link to new windows, pop-ups, frames etc.

Font Properties

These attributes let you define the generic font properties for all the text on the chart, allowing you a high level control over font properties.

Name Type Range Description
baseFont Font Name This attribute lets you set the font face (family) of all the text (data labels, values etc.) on chart. If you specify the `outCnvBaseFont` attribute also, then this attribute controls only the font face of text within the chart canvas bounds.
baseFontSize Number This attribute sets the base font size of the chart i.e., all the values and the names in the chart which lie on the canvas will be displayed using the font size provided here.
baseFontColor Color Code Hex Code This attribute sets the base font color of the chart i.e., all the values and the names in the chart which lie on the canvas will be displayed using the font color provided here.

Legend Properties

In funnel chart, the series name of each data-set shows up in the legend of the chart. If you do not need the legend, you can opt to hide the same.

Also, the legend can be placed at the bottom of the chart or to the right of the chart.

These attributes let you configure the functional and cosmetic properties for the legend.

Name Type Range Description
showLegend
Since 3.2
Boolean 0/1 Whether to show legend on the chart.
legendItemFontBold Boolean 0/1 Whether legend keys should be displayed in bold
legendItemFont String Font Name Sets legend item font
legendItemFontSize Number 0 - 72 Sets legend item font size
legendItemFontColor Color Hex Code Sets legend item font color
legendPosition
Since 3.2
String 'BOTTOM' or 'RIGHT' The legend can be plotted at two positions on the chart - below (BOTTOM) the chart and to the right (RIGHT) of the chart.
legendCaptionAlignment String "left", "center", "right" Sets the legend caption horizontal alignment .
legendCaptionBold Boolean 0/1 Whether legend caption should be displayed in bold
legendCaptionFont String Font Name Sets legend caption font
legendCaptionFontSize Number 0 - 72 Sets legend caption font size
legendCaptionFontColor Color Hex Code Sets legend caption font color
legendItemHiddenColor Color Hex Code Sets the color that applies on both text font and icon when they are in a disabled / hidden state
legendIconScale
Since 3.2
Number 1-5 Scaling of legend icon is possible starting FusionWidgets XT. This attribute lets you control the size of the legend icon. The default scale value is 1. Anything less than 1 reduces the size of the legend-icons on the chart. Any value bigger than 1 enlarges the icons. e.g., 0.5 means half the size, whereas, 2 means twice the size.
legendBgColor
Since 3.2
Color Hex Code Background color for the legend.
legendBgAlpha
Since 3.2
Number 0-100 Background alpha for the legend.
legendBorderColor
Since 3.2
Color Hex Code Border Color for the legend.
legendBorderThickness
Since 3.2
Number In pixels Border thickness for the legend.
legendBorderAlpha
Since 3.2
Number 0-100 Border alpha for the legend.
legendShadow
Since 3.2
Boolean 0/1 Whether to show a shadow for legend.
legendAllowDrag
Since 3.2
Boolean 0/1 The legend can be made drag-able by setting this attribute to 1. End viewers of the chart can drag the legend around on the chart.
legendScrollBgColor
Since 3.2
Color Hex Code If you've too many items on the legend, a scroll bar shows up on the same. This attribute lets you configure the background color of the scroll bar.
reverseLegend
Since 3.2
Boolean 0/1 You can reverse the ordering of datasets in the legend by setting this attribute to 1.
interactiveLegend
Since 3.2
Boolean 0/1 This attribute lets you interact with the legend in your chart. When you click a particular legend key, the associated slice slides out from the chart. Re-clicking the key causes the slice to slide in.
legendNumColumns
Since 3.2
Number Zero and Positive Integers The legend items are arranged in columns. Using this attribute, you can set the number of columns. This value undergoes internal checking on judicious use of white-space. In case, the value is found improper, the chart auto-calculates the number of columns. When set to 0, the chart automatically decides the number of columns. The above is applicable when `legendPosition` is set to `BOTTOM``.` If the `legendPosition` is set to `RIGHT`, the number of columns is always set to 1.
minimiseWrappingInLegend
Since 3.2
Boolean 0/1 Whether to minimize legend item text wrapping.

Tool-tip Properties

These attributes let you configure tool-tip properties.

Name Type Range Description
showToolTip Boolean 0/1 Whether to show tooltip on chart?
showPercentInToolTip Boolean 0/1 Whether to show percent values in tooltip? If not, the actual values will be shown.
toolTipBgColor Color Code Hex Code Background color for tooltip.
toolTipColor Color Code Hex Code Font color for the tool-tip.
toolTipBorderColor Color Code Hex Code Border color for tooltip.
toolTipSepChar String The character specified as the value of this attribute separates the name and value displayed in tooltip.
showToolTipShadow Boolean 0/1 Whether to show shadow for tooltips.

Chart Padding & Margins

FusionWidgets XT allows you to manually customize the padding of various elements on the chart to allow advanced manipulation and control over chart visualization. Padding in FusionWidgets XT is always defined in pixels, unless the attribute itself suggests some other scale (like plotSpacePercent).

You can also define the chart margins. Chart margins refer to the empty space left on the top, bottom, left, and right of the chart. That means, FusionWidgets XT will not plot anything in that space.

It is not necessary for you to specify any padding/margin values. FusionWidgets XT automatically assumes the best values for the same.

These attributes let you configure the functional and cosmetic properties of chart paddings and margins.

Name Type Range Description
captionPadding Number In pixels This attribute lets you control the space (in pixels) between the sub-caption and top of the chart canvas. If the sub-caption is not defined, it controls the space between caption and top of chart canvas. If neither caption, nor sub-caption is defined, this padding does not come into play.
chartLeftMargin Number In pixels Amount of empty space that you want to put on the left side of your chart. Nothing is rendered in this space.
chartRightMargin Number In pixels Amount of empty space that you want to put on the right side of your chart. Nothing is rendered in this space.
chartTopMargin Number In pixels Amount of empty space that you want to put on the top of your chart. Nothing is rendered in this space.
chartBottomMargin Number In pixels Amount of empty space that you want to put at the bottom of your chart. Nothing is rendered in this space.

<set> element

Each <set> element (child of <dataset> element) represents a set of data which is to be plotted on the graph and determines a set of data which will appear on the chart.

For a single series chart, a typical <set> element will look like:

<set label='January' value='17400' />

These attributes let you configure <set> element.

Name Type Range Description
label String Label for the funnel slice.
value Number Numerical value for the funnel. This value will be plotted on the chart.
link String You can define links for individual data items. That enables the end user to click on data items (Funnel slices) and drill-down to other pages. To define the link for data items, use the `link` attribute. You can define links that open in same window, new window, pop-up window or frames. Please see Drill-Down Charts section for more information. Also, you'll need to URL Encode all the special characters (like ? and &) present in the link.
toolText String By default, FusionWidgets XT shows the "`label`, `value`" as tooltip text for that data item. But, if you want to display more information for the data item as tooltip, you can use this attribute to specify the same.
color Color Code Hex Code Color for funnel slice
alpha Number 0-100 Alpha for funnel slice.
showValue Boolean 0/1 You can individually opt to show/hide values of individual data items using this attribute. This value over-rides the `<chart>` level value.
borderColor Color Code Hex Code Border Color for the funnel slice.
borderAlpha Number 0-100 Border Alpha for the slice.
isSliced Boolean 0/1 This attribute determines whether a funnel slice appears as a part of the total chart or is sliced out as an individual item.