Commit 1c43b8a5 authored by Mathieu Giraud's avatar Mathieu Giraud

js/scatterPlot: set .adapt on true for MODE_BAR

See #3503.
What we finally want has still to be discussed. See #2431.

This does not work now on MODE_GRID, see #2700.
We anyway find back a behaviour on MODE_BAR we had more than one year ago.
parent 6629b457
Pipeline #42247 passed with stages
in 6 minutes and 18 seconds
......@@ -1690,8 +1690,8 @@ ScatterPlot.prototype = {
this.mode = mode;
this.compute_size();
this.axisX = this.updateAxis(this.splitX, false);
this.axisY = this.updateAxis(this.splitY, true);
this.axisX = this.updateAxis(this.splitX, false, (this.mode == this.MODE_BAR));
this.axisY = this.updateAxis(this.splitY, true, false);
if (this.mode == this.MODE_BAR){
this.updateBar();
......@@ -1719,7 +1719,7 @@ ScatterPlot.prototype = {
* @param {Axis} axis
* @param {string} splitMethod
* */
updateAxis: function(splitMethod, is_Y) {
updateAxis: function(splitMethod, is_Y, adaptAxis) {
if (typeof is_Y === "undefined") is_Y = false;
var axis;
var aa = this.available_axis[splitMethod]
......@@ -1730,6 +1730,8 @@ ScatterPlot.prototype = {
axis = aa.axis;
axis.reverse = is_Y;
axis.adapt = adaptAxis
if (is_Y)
axis.MAX_NB_STEPS_IN_AXIS = 6
axis.init(this.m.clones, aa.fct, aa.labels, aa.sort, aa.min, aa.max, aa.log, aa.display_label);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment