|
Help! How to set the scale of secondary axis along with data point on xyChart? |
Posted by Yalin on Jun-14-2012 15:40 |
|
Hi all:
I'm working on setting the scales of secondary asix along with data points on a xy-chart like attached pic shown. lables(A,B,C,D) are mapping to its corresponding data point on PLAN asix)
I'm wonder if it is possible because I've checked all functions included in xAxis2() API. For example, setLabelGap() only allows to set an equal distanct between each axis lable.
Please help me if there is any other soluction, thanks a lot.
|
Re: Help! How to set the scale of secondary axis along with data point on xyChart? |
Posted by Yalin on Jun-14-2012 15:56 |
|
By the way, I'm using C# to using Chart Director |
Re: Help! How to set the scale of secondary axis along with data point on xyChart? |
Posted by Peter Kwan on Jun-15-2012 00:32 |
|
Hi Yalin,
You can use the top x-axis and then use Axis.addMark to add the labels to any position you like. For example:
c.xAxis2().syncAxis(c.xAxis()); //The top x-axis has the same scale as the bottom x-axis
c.xAxis2().setColors(Chart.Transparent, Chart.Transparent); //hide original labels
string[] myLabels = {"A", "B", "C", "D", "E"};
for (int i = 0; i < 5; ++i)
c.xAxis2().addMark(myXData[i], -1, myLabels[i]).setMarkColor(Chart.Transparent, 0x000000, Chart.Transparent);
Hope this can help.
Regards
Peter Kwan |
|