jqplot. | |
$.jqplot. | Plugin renderer to draw a meter gauge chart. |
Properties | |
diameter | Outer diameter of the meterGauge, auto computed by default |
padding | padding between the meterGauge and plot edges, auto calculated by default. |
shadowOffset | offset of the shadow from the gauge ring 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. |
background | background color of the inside of the gauge. |
ringColor | color of the outer ring, hub, and needle of the gauge. |
tickColor | color of the tick marks around the gauge. |
ringWidth | width of the ring around the gauge. |
min | Minimum value on the gauge. |
max | Maximum value on the gauge. |
ticks | Array of tick values. |
showTicks | true to show ticks around gauge. |
showTickLabels | true to show tick labels next to ticks. |
label | A gauge label like ‘kph’ or ‘Volts’ |
labelHeightAdjust | Number of Pixels to offset the label up (-) or down (+) from its default position. |
labelPosition | Where to position the label, either ‘inside’ or ‘bottom’. |
intervals | Array of ranges to be drawn around the gauge. |
intervalColors | Array of colors to use for the intervals. |
intervalInnerRadius | Radius of the inner circle of the interval ring. |
intervalOuterRadius | Radius of the outer circle of the interval ring. |
tickSpacing | Degrees between ticks. |
hubRadius | Radius of the hub at the bottom center of gauge which the needle attaches to. |
tickPadding | padding of the tick marks to the outer ring and the tick labels to marks. |
needleThickness | Maximum thickness the needle. |
needlePad | Padding between needle and inner edge of the ring when the needle is at the min or max gauge value. |
pegNeedle | True will stop needle just below/above the min/max values if data is below/above min/max, as if the meter is “pegged”. |
Plugin renderer to draw a meter gauge chart.
Data consists of a single series with 1 data point to position the gauge needle.
To use this renderer, you need to include the meter gauge renderer plugin, for example:
<script type="text/javascript" src="plugins/jqplot.meterGaugeRenderer.js"></script>
Properties described here are passed into the $.jqplot function as options on the series renderer. For example:
plot0 = $.jqplot('chart0',[[18]],{ title: 'Network Speed', seriesDefaults: { renderer: $.jqplot.MeterGaugeRenderer, rendererOptions: { label: 'MB/s' } } });
A meterGauge plot does not support events.
Properties | |
diameter | Outer diameter of the meterGauge, auto computed by default |
padding | padding between the meterGauge and plot edges, auto calculated by default. |
shadowOffset | offset of the shadow from the gauge ring 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. |
background | background color of the inside of the gauge. |
ringColor | color of the outer ring, hub, and needle of the gauge. |
tickColor | color of the tick marks around the gauge. |
ringWidth | width of the ring around the gauge. |
min | Minimum value on the gauge. |
max | Maximum value on the gauge. |
ticks | Array of tick values. |
showTicks | true to show ticks around gauge. |
showTickLabels | true to show tick labels next to ticks. |
label | A gauge label like ‘kph’ or ‘Volts’ |
labelHeightAdjust | Number of Pixels to offset the label up (-) or down (+) from its default position. |
labelPosition | Where to position the label, either ‘inside’ or ‘bottom’. |
intervals | Array of ranges to be drawn around the gauge. |
intervalColors | Array of colors to use for the intervals. |
intervalInnerRadius | Radius of the inner circle of the interval ring. |
intervalOuterRadius | Radius of the outer circle of the interval ring. |
tickSpacing | Degrees between ticks. |
hubRadius | Radius of the hub at the bottom center of gauge which the needle attaches to. |
tickPadding | padding of the tick marks to the outer ring and the tick labels to marks. |
needleThickness | Maximum thickness the needle. |
needlePad | Padding between needle and inner edge of the ring when the needle is at the min or max gauge value. |
pegNeedle | True will stop needle just below/above the min/max values if data is below/above min/max, as if the meter is “pegged”. |
Outer diameter of the meterGauge, auto computed by default
this.diameter = null
padding between the meterGauge and plot edges, auto calculated by default.
this.padding = null
offset of the shadow from the gauge ring 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 = 4
background color of the inside of the gauge.
this.background = "#efefef"
color of the outer ring, hub, and needle of the gauge.
this.ringColor = "#BBC6D0"
color of the tick marks around the gauge.
this.tickColor = "#989898"
width of the ring around the gauge.
this.ringWidth = null
Minimum value on the gauge.
this.min
Maximum value on the gauge.
this.max
Array of tick values.
this.ticks = []
true to show ticks around gauge.
this.showTicks = true
true to show tick labels next to ticks.
this.showTickLabels = true
A gauge label like ‘kph’ or ‘Volts’
this.label = null
Number of Pixels to offset the label up (-) or down (+) from its default position.
this.labelHeightAdjust = 0
Where to position the label, either ‘inside’ or ‘bottom’.
this.labelPosition = 'inside'
Array of ranges to be drawn around the gauge.
this.intervals = []
Array of colors to use for the intervals.
this.intervalColors = [ "#4bb2c5", "#EAA228", "#c5b47f", "#579575", "#839557", "#958c12", "#953579", "#4b5de4", "#d8b83f", "#ff5800", "#0085cc", "#c747a3", "#cddf54", "#FBD178", "#26B4E3", "#bd70c7"]
Radius of the inner circle of the interval ring.
this.intervalInnerRadius = null
Radius of the outer circle of the interval ring.
this.intervalOuterRadius = null
Degrees between ticks.
this.tickSpacing = 30
Radius of the hub at the bottom center of gauge which the needle attaches to.
this.hubRadius = null
padding of the tick marks to the outer ring and the tick labels to marks.
this.tickPadding = null
Maximum thickness the needle.
this.needleThickness = null
Padding between needle and inner edge of the ring when the needle is at the min or max gauge value.
this.needlePad = 6
True will stop needle just below/above the min/max values if data is below/above min/max, as if the meter is “pegged”.
this.pegNeedle = true