7 Answers, 1 is accepted
This will depend on the first category added to the chart. If the first category is 0 you will get the desired results.
In general, you can consider using scatter line or scatter area series for a chart where you have numeric values for both axes. This way you will be able to set the minimum and maximum of the horizontal axis.
I hope this will be useful. Let me know if you have additional questions.
Your answer does not suit me.
Well, if the category begins with 0, we obtain 10, 20, ....
Why, if the category begins with 1, we obtain 12, 22, 32...? It must then be 11, 21, 31 ... Or alternatively 15, 25, 35
I have further investigated this and even when the axis starts from the top the labels are calculated from bottom to top, so the points count will matter as well.
It is possible to format in any way and in this case you can round the numbers. Here is the code:
Let me know how this works for you.
The problem is also that the label is drawn in the wrong place (see image - zoomed in paint). I use two series (red and blue) with the same categories.
The label 12 is in the place where the category 7 is located and so on
You can set the PlotMode like this:
Please note that the categorical axis is not meant for such use, it usually contains categories that are not consecutive and do not require exact rendering (like names, product, e.t.c).
I hope this will be useful.
if I use
PlotMode = AxisPlotMode.OnTicks;
results are more adequate, but only if I do not use the vertical axis inversion (label starts from 1).
If I write for the vertical axis (the same data)
IsInverse = true;
label starts from 3. It is not right. How to make it start with 1?
Currently, the ticks are calculated from the bottom to top (inverse or not) and this is why there is a difference. In your case, the last point is 163 and the tics are starting from there. Unfortunately, the logic for this is located in an internal class and there is no way to access it. This is why I have logged this in our Feedback Portal. You can track its progress, subscribe to status changes and add your comment to it here. I have also updated your Telerik Points.
For a workaround, I can suggest adding some empty points so the total number is consistent with the tick interval (for example 170).
Should you have any other questions do not hesitate to ask.