Setting axisYType lets you choose between primary and secondary Y Axis for a dataSeries to plot against. By choosing “secondary” Axis you can plot the series against axisY2.
In case of Multi-Series or Combinational Charts, one can assign primary axis to some series and secondary axis to other series.
This is helpful when dataSeries objects use different unit of measurement or range of data. By default, all series are plotted against primary Y axis.
Default: “primary”var chart = new CanvasJS.Chart("container", { . . data: [{ axisYType: "secondary", } ], . . }); chart.render();
Also See:
7 Comments
Hi, How can I set a secondary axis range ? For some reason the automatic setting makes my line flat. the values are between 15 and 25, but the secondary axis ranges from 0 to 50. The primary axis works as expected.
Please set includeZero property to false
https://canvasjs.com/docs/charts/chart-options/axisy/includezero/
Hi,
is it possible to create multiple (2+) y axis at one side? Example: http://download.infragistics.com/users/skim/ChartU/c13.jpg
If not, is this feature planed for the near future?
Patrick,
This feature is not available as of now. We are considering to implement the same in future version – but we don’t have a timeline yet.
Any update on the timeline for more than 2 y axis support?
I’m interested in this as well. Are there any plans to implement this at all?
[Update]
We have just released v1.9.5 Beta which supports Secondary X Axis and Multiple X / Y Axis. Please refer to the release blog for more information.
We have started working on multiple Y-axis and it will be available in couple of months.