Closed davelandry closed 3 years ago
@davelandry Looking on this bug I found that || bottom
condition on suggested code line was the one causing this issue.
Removing it and keeping only const position = this._colorScalePosition.bind(this)(this.config());
seems to be the solution.
In this example i set colorScalePosition = false;
as default value and then from top to right counter clockwise returning to false.
I also have a question related to colorScalePosition = undefined
behavior. If i set it as default value i got a non colored map as the next image. I don't know if it is related with this issue or is the expected behavior.
I also tested if you don't define a colorScalePosition which i think is defined by the following code.
_this18._colorScalePosition = function () {
return _this18._width > _this18._height ? "right" : "bottom";
};
Here i setted height = 400
and width = 1520
as default behavior and then changed to width = 300
and you can see how color scale changes its position.
Great analysis and testing @ffigueroal 🍻
I left some comments in the PR
LOL this example is lying: http://d3plus.org/examples/d3plus-geomap/hiding-colorscale/
Here's the line causing the bug: https://github.com/d3plus/d3plus-viz/blob/master/src/_drawColorScale.js#L13