This is a plugin for drawing markers for minimum/maximum range and average values of series with flot.
Download and include the javaScript-file on your page:
<script type="text/javascript" src="[...]/jquery.flot.min.js"></script>
<script type="text/javascript" src="[...]/jquery.flot.autoMarkings.js"></script>
Options can be set inside the 'series' option of the plot. Flot will then copy these to each series.
var options = {
series: {
autoMarkings: {
enabled: true,
showMinMax: true,
showAvg: true
}
}
};
$.plot(placeholder, data, options);
Options can also be set for each series individually to e.g. enable autoMarkings on one series and disable on another.
Enable or disable autoMarkings.
Value: true or false
Default: false
Color to use for drawing the marking of the series. If not given the plugin will use the color calculated by flot for each series.
Value: [String] e.g. "rgb(237,194,64)"]
Color to use for drawing the average line of the series. If not given the plugin will use the color calculated by flot for each series.
Value: [String] e.g. "rgb(237,194,64)"]
Draw a marking between the minimum and maximum of the series data.
Value: true or false
Default: false
Alpha value of minMax markings color.
Value: double
Default: 0.2
Draw a marking line for the average of the series data.
Value: true or false
Default: false
The minimum value of the series data. If not given the plugin will automatically calculate this value.
Value: [double]
The maximum value of the series data. If not given the plugin will automatically calculate this value.
Value: [double]
The average value of the series data. If not given the plugin will automatically calculate this value.
Value: [double]
The lineWidth for the average value lines and other markers.
Value: [int]
Default: 2