Re: Re: How to change PlottlingPanel Coordinate Format (EJSS_5.0 ,Javascript)? -
Mariusz Krasinski
17 Posts
Hi
I am using this thread to return to one of my previous post which is still without answer.
I have made simple simulations in java and javascript. Just graph and possibility to change minimum and maximum values on both axis. In ejss version I added the setting described in the post above.
Compare results. Whatever you do in java version axis label are rounded numbers. In javascript one can see almost chaos. On vertical axis 1.79, 3.58, 5.37 etc. I always saying to ma student not to describe axis this way. So, I would be happy to use proper description in my simulations for the same students. But I am not able.
Has anybody any idea how to produce better description of axis also in javascript?
Re: Re: How to change PlottlingPanel Coordinate Format (EJSS_5.0 ,Javascript)? -
Wolfgang
192 Posts
Here are additional scale parameters that can help you customize the axis labels.
var xAxis = _view.plottingPanel.getAxisX(); xAxis.setAutoTicks(false); xAxis.setTicks(10); // divide the axis to give 10 tick marks xAxis.setScalePrecision(0); // Don't show any decimals