jqplot. | |
$.jqplot. | Plugin renderer to draw a donut chart. |
Properties | |
diameter | Outer diameter of the donut, auto computed by default |
innerDiameter | Inner diameter of the donut, auto calculated by default. |
thickness | thickness of the donut, auto computed by default Overridden by if innerDiameter is specified. |
padding | padding between the donut and plot edges, legend, etc. |
sliceMargin | angular spacing between donut slices in degrees. |
ringMargin | pixel distance between rings, or multiple series in a donut plot. |
fill | true or false, whether to fil the slices. |
shadowOffset | offset of the shadow from the slice 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 slice when moused over. |
highlightMouseDown | True to highlight when a mouse button is pressed over a slice. |
highlightColors | an array of colors to use when highlighting a slice. |
dataLabels | Either ‘label’, ‘value’, ‘percent’ or an array of labels to place on the pie slices. |
showDataLabels | true to show data labels on slices. |
totalLabel | true to show total label in the centre |
dataLabelFormatString | Format string for data labels. |
dataLabelThreshold | |
dataLabelPositionFactor | A Multiplier (0-1) of the pie radius which controls position of label on slice. |
dataLabelNudge | Number of pixels to slide the label away from (+) or toward (-) the center of the pie. |
startAngle | Angle to start drawing donut in degrees. |
$.jqplot. | Legend Renderer specific to donut plots. |
Properties | |
numberRows | Maximum number of rows in the legend. |
numberColumns | Maximum number of columns in the legend. |
Plugin renderer to draw a donut chart. x values, if present, will be used as slice labels. y values give slice size.
To use this renderer, you need to include the donut renderer plugin, for example:
<script type="text/javascript" src="plugins/jqplot.donutRenderer.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.DonutRenderer, rendererOptions:{ sliceMargin: 2, innerDiameter: 110, startAngle: -90 } } });
A donut plot will trigger events on the plot target according to user interaction. All events return the event object, the series index, the point (slice) index, and the point data for the appropriate slice.
’jqplotDataMouseOver’ | triggered when user mouseing over a slice. |
’jqplotDataHighlight’ | triggered the first time user mouses over a slice, if highlighting is enabled. |
’jqplotDataUnhighlight’ | triggered when a user moves the mouse out of a highlighted slice. |
’jqplotDataClick’ | triggered when the user clicks on a slice. |
’jqplotDataRightClick’ | tiggered when the user right clicks on a slice if the “captureRightClick” option is set to true on the plot. |
Properties | |
diameter | Outer diameter of the donut, auto computed by default |
innerDiameter | Inner diameter of the donut, auto calculated by default. |
thickness | thickness of the donut, auto computed by default Overridden by if innerDiameter is specified. |
padding | padding between the donut and plot edges, legend, etc. |
sliceMargin | angular spacing between donut slices in degrees. |
ringMargin | pixel distance between rings, or multiple series in a donut plot. |
fill | true or false, whether to fil the slices. |
shadowOffset | offset of the shadow from the slice 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 slice when moused over. |
highlightMouseDown | True to highlight when a mouse button is pressed over a slice. |
highlightColors | an array of colors to use when highlighting a slice. |
dataLabels | Either ‘label’, ‘value’, ‘percent’ or an array of labels to place on the pie slices. |
showDataLabels | true to show data labels on slices. |
totalLabel | true to show total label in the centre |
dataLabelFormatString | Format string for data labels. |
dataLabelThreshold | |
dataLabelPositionFactor | A Multiplier (0-1) of the pie radius which controls position of label on slice. |
dataLabelNudge | Number of pixels to slide the label away from (+) or toward (-) the center of the pie. |
startAngle | Angle to start drawing donut in degrees. |
Legend Renderer specific to donut plots. Set by default when user creates a donut plot.
Properties | |
numberRows | Maximum number of rows in the legend. |
numberColumns | Maximum number of columns in the legend. |
Outer diameter of the donut, auto computed by default
this.diameter = null
Inner diameter of the donut, auto calculated by default.
this.innerDiameter = null
thickness of the donut, auto computed by default Overridden by if innerDiameter is specified.
this.thickness = null
padding between the donut and plot edges, legend, etc.
this.padding = 20
angular spacing between donut slices in degrees.
this.sliceMargin = 0
pixel distance between rings, or multiple series in a donut plot.
this.ringMargin = null
true or false, whether to fil the slices.
this.fill = true
offset of the shadow from the slice 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 slice when moused over.
this.highlightMouseOver = true
True to highlight when a mouse button is pressed over a slice.
this.highlightMouseDown = false
an array of colors to use when highlighting a slice.
this.highlightColors = []
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
true to show total label in the centre
this.totalLabel = false
Format string for data labels.
this.dataLabelFormatString = null
this.dataLabelThreshold = 3
A Multiplier (0-1) of the pie radius which controls position of label on slice.
this.dataLabelPositionFactor = 0.4
Number of pixels to slide the label away from (+) or toward (-) the center of the pie.
this.dataLabelNudge = 0
Angle to start drawing donut in degrees.
this.startAngle = 0
Maximum number of rows in the legend.
this.numberRows = null
Maximum number of columns in the legend.
this.numberColumns = null