Problem

Line Chart Y-Axis Maximum Value not getting set properly

Posted 10 days ago by Avatar Jerin Sebastian

Am trying to set XYDoubleAxis Maximum value as 200, Minimum value as 0 and TickMajorInterval as 10, but the chart am getting is:

https://drive.google.com/open?id=1Cu06NECCQmMYJ3Dn0q4YidzLTW6LKZrr

<charts:XYChart.YAxes>
<charts:XYDoubleAxis Minimum="0" Maximum="200" AreLabelsVisible="True" AreMajorTicksVisible="True" AreMinorTicksVisible="True" TickMajorInterval="10" TickMinorInterval="0" />
</charts:XYChart.YAxes>


Comments (6)

Posted 10 days ago by Actipro Software Support - Cleveland, OH, USA

Hi Jerin,

Can you email our support address a new simple sample project showing this?  Then we can debug with it.  Please reference this thread in your email.  We are very close to a 2018.1 release so the sooner you can do this the better in case any changes would be needed for it.  Be sure to exclude any bin/obj folders from the ZIP you send, and rename the .zip file extension so it doesn't get spam blocked.  Thanks!


Actipro Software Support
Posted 8 days ago by Actipro Software Support - Cleveland, OH, USA

Hi Jerin,

Thanks for the sample.  What's happening is that the chart has a default PaddingPercentage on it that adds some padding around the outside of the chart area.  This ends up effectively showing a tick above/below your min/max and with your major interval setting, it's causing those ticks to get labels too.

One way around it would be to remove the padding percentage and add a little margin so the labels don't get clipped:

lc.PaddingPercentage = new Thickness(0);
lc.Margin = new Thickness(10);

Actipro Software Support
Information The latest build of this product (2018.1 build 0670) was released 7 days ago, which was before the next post in this thread.
Posted 4 days ago by Jerin Sebastian

The problem still persist when the values are set as below

yAxis.TickMajorInterval = 35;
yAxis.Maximum = 250;
Posted 3 days ago by Actipro Software Support - Cleveland, OH, USA

Hi Jerin,

Did you add the lines from my last reply above?  When I do that, the 250 maximum seems to render fine.


Actipro Software Support
Posted 3 days ago by Jerin Sebastian

Yes, I added those previous lines. Did you set the interval as 35?

This is what am getting

https://drive.google.com/open?id=1QbnruSTwru5CbX1E3aNzNYcLuBdip9_y

Posted 2 days ago by Actipro Software Support - Cleveland, OH, USA

Hello,

Yes I used both lines you pasted and it seemed to render ok as long as I also had the lines I had pasted.  Note that I'm testing this on the 2018.1 version.

Sorry but the screenshot link you posted didn't seem to be public.

If you still can't sort it out, please make a new simple sample that shows it and send that to our support address and we'll see what's going on.  In your e-mail, reference this thread and remove any bin/obj folders from the ZIP you send.  Thanks!


Actipro Software Support

Add a Comment

Please log in to a validated account to post comments.