Plugin renderer to draw a funnel chart. x values, if present, will be used as labels. y values give area size.
Funnel charts will draw a single series only.
To use this renderer, you need to include the funnel renderer plugin, for example:
<script type="text/javascript" src="plugins/jqplot.funnelRenderer.js"></script>
Properties described here are passed into the $.jqplot function as options on the series renderer. For example:
plot2 = $.jqplot('chart2', [s1, s2], { seriesDefaults: { renderer:$.jqplot.FunnelRenderer, rendererOptions:{ sectionMargin: 12, widthRatio: 0.3 } } });
IMPORTANT
The funnel renderer will reorder data in descending order so the largest value in the data set is first and displayed on top of the funnel. Data will then be displayed in descending order down the funnel. The area of each funnel section will correspond to the value of each data point relative to the sum of all values. That is section area is proportional to section value divided by sum of all section values.
If your data is not in descending order when passed into the plot, it will be reordered when stored in the series.data property. A copy of the unordered data is kept in the series._unorderedData property.
A funnel plot will trigger events on the plot target according to user interaction. All events return the event object, the series index, the point (section) index, and the point data for the appropriate section. Note the point index will referr to the ordered data, not the original unordered data.
’jqplotDataMouseOver’ | triggered when mousing over a section. |
’jqplotDataHighlight’ | triggered the first time user mouses over a section, if highlighting is enabled. |
’jqplotDataUnhighlight’ | triggered when a user moves the mouse out of a highlighted section. |
’jqplotDataClick’ | triggered when the user clicks on a section. |
’jqplotDataRightClick’ | tiggered when the user right clicks on a section if the “captureRightClick” option is set to true on the plot. |
$.jqplot. | Plugin renderer to draw a funnel chart. |
Properties | |
padding | padding between the funnel and plot edges, legend, etc. |
sectionMargin | spacing between funnel sections in pixels. |
fill | true or false, whether to fill the areas. |
shadowOffset | offset of the shadow from the area and offset of each succesive stroke of the shadow from the last. |
shadowAlpha | transparency of the shadow (0 = transparent, 1 = opaque) |
shadowDepth | number of strokes to apply to the shadow, each stroke offset shadowOffset from the last. |
highlightMouseOver | True to highlight area when moused over. |
highlightMouseDown | True to highlight when a mouse button is pressed over a area. |
highlightColors | array of colors to use when highlighting an area. |
widthRatio | The ratio of the width of the top of the funnel to the bottom. |
lineWidth | width of line if areas are stroked and not filled. |
dataLabels | Either ‘label’, ‘value’, ‘percent’ or an array of labels to place on the pie slices. |
showDataLabels | true to show data labels on slices. |
dataLabelFormatString | Format string for data labels. |
dataLabelThreshold | |
$.jqplot. | Legend Renderer specific to funnel plots. |
Properties | |
numberRows | Maximum number of rows in the legend. |
numberColumns | Maximum number of columns in the legend. |
Legend Renderer specific to funnel plots. Set by default when the user creates a funnel plot.
Properties | |
numberRows | Maximum number of rows in the legend. |
numberColumns | Maximum number of columns in the legend. |
padding between the funnel and plot edges, legend, etc.
this.padding = {top: 20, right: 20, bottom: 20, left: 20}
spacing between funnel sections in pixels.
this.sectionMargin = 6
true or false, whether to fill the areas.
this.fill = true
offset of the shadow from the area and offset of each succesive stroke of the shadow from the last.
this.shadowOffset = 2
transparency of the shadow (0 = transparent, 1 = opaque)
this.shadowAlpha = 0.07
number of strokes to apply to the shadow, each stroke offset shadowOffset from the last.
this.shadowDepth = 5
True to highlight area when moused over.
this.highlightMouseOver = true
True to highlight when a mouse button is pressed over a area.
this.highlightMouseDown = false
array of colors to use when highlighting an area.
this.highlightColors = []
The ratio of the width of the top of the funnel to the bottom.
this.widthRatio = 0.2
width of line if areas are stroked and not filled.
this.lineWidth = 2
Either ‘label’, ‘value’, ‘percent’ or an array of labels to place on the pie slices.
this.dataLabels = 'percent'
true to show data labels on slices.
this.showDataLabels = false
Format string for data labels.
this.dataLabelFormatString = null
this.dataLabelThreshold = 3
Maximum number of rows in the legend.
this.numberRows = null
Maximum number of columns in the legend.
this.numberColumns = null