ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Chart Challenge Multiple axis on XYChart
Posted by icm63 on Mar-12-2011 02:17
Attachments:
Can i do this on a XY chart...if so how??
Howtodo.png

  Re: Chart Challenge Multiple axis on XYChart
Posted by Peter Kwan on Mar-14-2011 11:23
Hi icm63,

You can add multiple y-axes to a chart using XYChart.addAxis. See "Multiple Axes" sample code.

In the sample code, the y-axes are added at different positions. You can add them all at the same position if you like. For example, you can add 3 y-axes on the right edge of the chart.

By default, the 3 y-axes will overlap. You can configure the axis using Axis.setMargin, so that each axis covered a different part of the right edge. For example, for the y4 axis in your attachment, you may set a large top margin. In this way, the y4 axis will only occupy the bottom of the right edge. You can configure the other axes similarly.

Hope this can help.

Regards
Peter Kwan

  Re: Chart Challenge Multiple axis on XYChart
Posted by JerryLia on May-08-2011 18:15
Attachments:
But how to set these Axises titles?
Capture.PNG

  Re: Chart Challenge Multiple axis on XYChart
Posted by Peter Kwan on May-10-2011 00:11
Hi JerryLia,

You may consider to just add the titles as custom text in the proper location. For example, in Java/C#:

c.addText(0, c.getPlotArea().getTopY() + c.getPlotArea().getHeight() * 1/6, "AAA", "arialbd.ttf", 8, 0x000000, Chart.Left, 90);

c.addText(0, c.getPlotArea().getTopY() + c.getPlotArea().getHeight() * 3/6, "BBB", "arialbd.ttf", 8, 0x000000, Chart.Left, 90);

c.addText(0, c.getPlotArea().getTopY() + c.getPlotArea().getHeight() * 5/6, "CCC", "arialbd.ttf", 8, 0x000000, Chart.Left, 90);

Hope this can help.

Regards
Peter Kwan