You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use the profil tool in my web-gis application to display raster profiles along polylines. It works quite well, but I have an issue with graduations.
I try to obtain a generic scaling of the y axis, working at any scale:
let zmin = feature.get('zmin');
let zmax = feature.get('zmax');
let graduation = Number(((zmax-zmin)/20).toPrecision(2));
profil.setGeometry(feature, {"graduation":graduation});
where zmin and zmax are features properties defining the z data range.
It works quite well in some cases:
But sometimes, the labels are not rounded adequately, leading to unreadable values:
Would it be possible to round these labels for readability, for example by using ".toPrecision(...)" with a max number of digits? Or is there any alternative way of doing it?
Another issue: I am not sure why the number of graduations is so different between the two plots with similar ranges. I was expecting ~20 graduations for each plot. A difference between the two situations is that the graduation value is 0.93 (<1) for one plot and 1.1 (>1) for the other one.
Thanks for any help!
The text was updated successfully, but these errors were encountered:
Hello,
I use the profil tool in my web-gis application to display raster profiles along polylines. It works quite well, but I have an issue with graduations.
I try to obtain a generic scaling of the y axis, working at any scale:
where zmin and zmax are features properties defining the z data range.
It works quite well in some cases:

But sometimes, the labels are not rounded adequately, leading to unreadable values:

Would it be possible to round these labels for readability, for example by using ".toPrecision(...)" with a max number of digits? Or is there any alternative way of doing it?
Another issue: I am not sure why the number of graduations is so different between the two plots with similar ranges. I was expecting ~20 graduations for each plot. A difference between the two situations is that the graduation value is 0.93 (<1) for one plot and 1.1 (>1) for the other one.
Thanks for any help!
The text was updated successfully, but these errors were encountered: