|
Problem with margins |
Posted by Davide on Jan-28-2018 04:12 |
|
Hello,
I'm having some problem with c->xAxis()->setDateScale(). I used this function because I need to display milliseconds on the xAxis. The problem is that when I click the arrows I have to zoom in, zoom out, scroll left and scroll right and the values displayed on the xAxis can become also negative. So I tried c->xAxis()->setLinearScale() but I don't want to have the left and right margin like you can see inthe image.
c->xAxis()->setDateScale() Was perfect but I need also negative value and with a double precision, so if I say c->xAxis()->setDateScale(-10.9,20.3) the x Axis should start from -10.9 and end at 20.3.
Thanks in advance!
|
Re: Problem with margins |
Posted by Peter Kwan on Jan-28-2018 23:42 |
|
Hi Davide,
By default, for XYChart.setLinearScale is called provided only 2 parameters (that is, the tick increment is left out), ChartDirector will automatically determine the tick increment, and will adjust the min and max values to ensure they are at a tick position.
If you do not want the adjustment, you can Axis.setRounding. For example:
c->xAxis()->setRounding(false, false);
Hope this can help.
Regards
Peter Kwan |
Re: Problem with margins |
Posted by Davide on Jan-29-2018 16:47 |
|
Thank you a lot!
It works perfect now!
Thanks again Peter! |
|