|Top Previous Next|
void addBin( String label, boolean redraw )
Adds a new static label to the axis and sets the appropriate flags if necessary to force the chart to draw using static labels (as opposed to a dynamic range based on series data).
This method is useful if there is a need to include bins which may not be part of any series added (i.e. chart labels should be "Apples", "Oranges", "Pears" but the series data only contains data pertaining to Apples and Pears).
If redraw is false, drawing will not occur immediately but will not be entirely prevented. Certain actions such as adding an additional series with redraw = true, or chart dimensions changing may still trigger the chart to draw. The default, if redraw is omitted is true.
Manually added bins may only be removed if there are no series currently utilizing them.
>> Add bins in a specific order to ensure they appear the same each time the chart is loaded, regardless of the order in which they appear in the data.
var myChart = new EJSC.Chart("chart");
var mySeries = myChart.addSeries(