jQuery.wijmo.wijbarchart Namespace > options type : seriesList Field |
Creates an array of series objects that contain data values and labels to display in the chart. Each series object consists of a label and a data attribute with its own array of X and Y values. X values are generally text values, while Y values are generally numeric.
See the Clustering Data topic for information on the concept of providing a cluster of numeric Y data values for the same set of X data values. Type: Array Default: []
Javascript (Usage) | |
---|---|
var value; // Type: array value = jQuery.wijmo.wijbarchart.options.seriesList; |
Javascript (Specification) | |
---|---|
|
<script id="scriptInit" type="text/javascript"> $(document).ready(function () { $("#wijbarchart").wijbarchart({ seriesList: [{ label: "US", data: { x: ['PS3', 'XBOX360', 'Wii'], y: [12.35, 21.50, 30.56] } }, { label: "Japan", data: { x: ['PS3', 'XBOX360', 'Wii'], y: [4.58, 1.23, 9.67] } }, { label: "Other", legendEntry: false, data: { x: ['PS3', 'XBOX360', 'Wii'], y: [31.59, 37.14, 65.32] } }], }); }); </script>
$("#barchart").wijbarchart({ seriesList: [{ label: "Q1", data: { x: [1, 2, 3, 4, 5], y: [12, 21, 9, 29, 30] } }, { label: "Q2", data: { // In this case, using xy causes the array // to split up so that the 1st, 3rd, 5th, 7th, and 9th // values are assigned to x, while the 2nd, 4th, // 6th, 8th, and 10th values are assigned to y. xy: [1, 21, 2, 10, 3, 19, 4, 31, 5, 20] }}] });
$("#barchart").wijbarchart({ seriesList: [{ label: "Q1", data: { x: [new Date(1978, 0, 1), new Date(1980, 0, 1), new Date(1981, 0, 1), new Date(1982, 0, 1), new Date(1983, 0, 1)], y: [12, 21, 9, 29, 30] } }]
Each series object in the seriesList array is defined with the following options.
An object that contains arrays of X and Y data for the chart series. If you want to change the positioning of the X and Y axes, see the horizontal option.
Type: Object
Default: {}
x
An array of data strings to display along the x axis.
Type: array
Default: []
y
An array of numeric data values to plot along the y axis.
Type: array
Default: []
A string value used to label the chart series. By default, this value appears in the legend entry for the series and in the hint when you mouse over a bar in the series. To prevent a series label from appearing in the legend, see legendEntry, below. If you do not provide a label for a series, the label for the series appears as "undefined" in the hint and in the legend.
Type: string
Default: ""
A value that indicates whether to display the label and color of the series in the legend of the chart. Set this value to false to leave a series out of the legend.
Type: Boolean
Default: true