Skip to content Skip to sidebar Skip to footer

Amcharts Line Chart Disconnected From Axis

My graph is disconnected from my y-axis on creation. I was wondering if anyone had the same problem? I tried playing with the axis-offset as you can see. does not fix the problem.

Solution 1:

Set the startOnAxis property of the categoryAxis object to true

chart.categoryAxis.startOnAxis = true;

http://docs.amcharts.com/javascriptcharts/CategoryAxis

EDIT: As martynasma suggested, you should note that this won't work if you have chart.categoryAxis.parseDates set to true unless you also set chart.categoryAxis.equalSpacing to true. As stated on the amcharts CategoryAxis documentation about "startOnAxis" property:

Specifies whether the graph should start on axis or not. In case you display columns, it is recommended to set this to false. If parseDates is set to true, startOnAxis will allways be false, unless equalSpacing is set to true.

Post a Comment for "Amcharts Line Chart Disconnected From Axis"