Nevron Forum

Same scalling on x and y axis

https://www.nevron.com/Forum/Topic12666.aspx

By Manal Goyal - Tuesday, January 1, 2019

Hi,
Is there any way we can have same scalling n both x and y axis in a chart. By same scalling I mean 1 unit on x axis should be equal to 1 unit on y axis.
Is there a quick way to achieve that automatically?

Thank you
By Nevron Support - Wednesday, January 2, 2019

Hi Manal,
You need to take a look at the All Examples \ Panels \ Chart \ Aspect \ Aspect 2D example - it shows how to achieve equal proportion between the x and y axes.
By Manal Goyal - Wednesday, January 2, 2019

Hi,

I am not talking about the aspect ratio but rather to keep the same units on both axis. For example if my chart's x,y axes aspect ratio is lets say 1:2 and the range on the x axis is from 0 to 10 then the range on the y axis should be from 0 to 20. For the same example lets say data goes on y axis from 0 to 100 then the x axis should automatically take range from 0 to 50 so the i unit on each axis is exactly the same.

To make it further clear, lets say a data set have a y values ranging from 0 to 100 and x values from 0 to 10, if I plot a line chart using these values, the x axis would take the rage from 0 to 10 and y axis will take the range from 0 to 100. but I want them to take range from 0 to 100 and 0 to 100 for the aspect ratio of one and if the aspect ratio is not fixed then I want both the axis to be able to manage their ranges to represent same units. For aspect ratio of 1:2 between x and y axis in above example the range should be from 0 to 50 and from 0 to 100 for x and y axis respectively.
By Nevron Software - Thursday, January 3, 2019

Hi Manal,
There is no setting to automatically manage the aspect / range of the chart however you can control both the aspect and the view range of the axis programmatically. The following code shows how to explicitly assign a range to the axis:

chart.Axis(StandardAxis.PrimaryX).View = new NRangeAxisView(new NRange1DD(0, 100), true, true);

By Manal Goyal - Tuesday, January 8, 2019

Hi,
So will it be something that nevron willing to implement. To have the same scalling on 2 axes.

Thanks and regards
Manal
By Nevron Software - Tuesday, January 8, 2019

Hi Manal,
We've added this to the list of client requests for functionality, but currently we consider the control to have enough features to support same scaling on axes with a bit of custom code.