Is there a way to pad the min/max x or y axis values dynamically? For instance, if my dataset has a min y-value of 0 and a max y-value of 10, the chart will automatically set the y-axis to range from 0 to 10. The problem is that I can get points along the top or bottom edges of the chart which can make them difficult to see. What I’d like to do is pad the range by some percentage, say 110%, such that the y-axis will range from -1 to 11.
I know I can do that If I know the Min and Max value of my data points. The problem is I have a real-time chart and the data points updated dynamically. My user doesn’t want to set the range at design time, it has to be set dynamically depends of the min and max data points.
Hello,
I am just checking the progress of this issue and was wondering if you managed to achieve your goal or if you need any further assistance on the matter.
Thank you for your post. I have been looking into it and I created a sample project for you with the functionality you want. Basically I handled the XamDataChart’s Loaded event and in its handler I set the Axis’ MaximumValue based on its ActualMaximumValue. This way I increase it by one. I did the same for the MinimumValue. Please let me know if this helps you or you have further questions on this matter.
Looking forward for your reply.