Time for action — customizing the chart limits and the number of divisional lines
1. Create a copy of
ChartBackground.html
andChartBackground.xml
, and rename them toChartLimitCustomization.html
andChartLimitCustomization.xml
respectively. Make the change in XML data URL and remove the background attribute for all the forthcoming examples, wherever we make a copy of the chart background files, let's assume this step by default to keep our focus on the new stuff.2. Add the attributes
adjustDiv='0' yAxisMaxvalue='3000000' numDivLines='2'
to the<chart>
element.3. Check out
ChartLimitCustomization.html
in a browser to see how the chart limits and the divisional lines are under your control now.
What just happened?
First up, as we wanted to explicitly specify the y-axis upper limit and the number of divisional lines, we had to disable automatic adjustment of divisional lines using adjustDiv='0'
. It is pretty simple after that, we just set the y-axis upper limit using yAxisMaxValue='3000000...