How to identify the x-axis & y-axis value of a particular unit in a chart

Hi,

Can any body tell me how to identify the axis position for any given value from the Chart.

Say for example, the y-axis of a chart contains some numbers from 0 to 100 at a variance of 10. Now i need to get the axis position for the value 20, so that i can use those axis points to draw a line. Now how to identify the axis points of the y-axis value 20?

Please let me know if you need any further detail.

Thanks

Regards,

Suchindhraa

Hi Suchindhraa,

Thank you for considering Aspose.

Well, I am not sure about your requirement, if you want to get the Y-Axis Position on the basis of some specific value, you can use c.ChartArea.AxisY.GetPosition(value) method. I your requirement is different, please explain in more detail so that we can provide you with the proper solution.

Thank you & Best Regards,

Hi,

Thanks for your reply.

My requirement is, I need to draw a line in the chart which is parallel to the x-axis. But the starting point and the endpoint of that line needs to be calculated dynamically from the chart.

That is, suppose i have the y-axis values as 0,10,20,30,40. Now i need to draw a line with its start point, say for example, from Y-axis value 25 (which is some where inbetween 10-20).

So, i need to identify the position of value 25 in the chart. How to do that?

Also i couldn't find the method ChartArea.AxisY.GetPosition(value), in Aspose.Cells. I think its available in Aspose.Charts. But i have only Aspose.Cells.

Please let me know if you could help me.

Thanks

Regards,

Suchindhraa

Hi Suchindhraa,

Well, yes, ChartArea.AxisY.GetPosition(value) is Aspose.Chart for .NET APIs, please ignore Nausherwan's post as he thought you are using Aspose.Chart for .NET.

We understand your requirement now. I 'm afraid currently Aspose.Cells for .NET does not support this feature. We will certainly look into it and support it for your need soon.

Thank you.

Hi Amjad Sahi,

Thanks for your reply.

Also i need to complete my task by this month end and i need your support in this issue.

I'll really appreciate your efforts in this issue, if you could solve my problem at the earliest.

Expecting your co-operation.

Thanks&Regards,

Suchindhraa

Hi Suchindhraa,

We will support this feature but it cannot be completed soon. Actually there is some complexity involved so we need some time to look into it.

By the way, I think you may try to utilize/set chart's minor gridlines to do your task if it suits your need.

e.g..,

chart.ValueAxis.MinorGridLines.IsVisible = true;

chart.ValueAxis.MinorUnit = 5;

Thank you.

Hi Amjad Sahi,

Thanks a lot for updating me about your status. For time being i'm using very low minor unit, but as you know the look and feel of the graph will not be good, when the values are huge.

Anyways, please let me know once you get the solution.

Once again, I appreciate your efforts in this.

Thanks

Suchindhraa