|
Y axis Maximum and minimum value |
Posted by abhishek.mr on May-17-2018 22:08 |
|
Hello,
I have created sample chart by setting y axis full range as -2000 to +2000.But my requirement is need to show user y axis value only 0 to 1000 and also user can able o pan , zoom till -2000 to +2000.
If i set full range as -2000 to +2000 it appears y axis as -2000 to +2000 (Please find the attached screenshot)
Below code i am using to set y axis ange
chartViewer.setFullRange(axis, -2000 , + 2000);
My requirement is to show y axis range as 0 to 1000(Refer screenshot 2) with support of pan and zoom functionality
Hope you understand my requiremnt
Regards,
Abhishek
|
Re: Y axis Maximum and minimum value |
Posted by Peter Kwan on May-18-2018 01:32 |
|
Hi abhishek.mr,
When you initialize the chartViewer, simply set the viewport to be 0 to 1000. It is like:
chartViewer.setFullRange("y", -2000, 2000);
chartViewer.ViewPortTop = 0.25;
chartViewer.ViewPortHeight = 0.25;
Then in your charting code, you can use sync:
chartViewer.syncLinearAxisWithViewPort("y", _XYChart.yAxis());
Regards
Peter Kwan |
|