Closed ryock2000 closed 8 years ago
It's a bug :-)
I will check how to solve it in the next days.
maybe this will help, change this
var zeroY = 0;
if (valueBounds.minValue < 0) {
zeroY = calculateOffset(config.logarithmic, 0, calculatedScale, valueHop);
}
to this in code
var zeroY = 0;
if (valueBounds.minValue < 0) {
zeroY = calculateOffset(config.logarithmic, 0, calculatedScale, valueHop);
}
else if (valueBounds.minValue > config.scaleStartValue) {
zeroY = calculateOffset(config.logarithmic, 0, calculatedScale, valueHop);
}
after change it looks like this
not sure if this will lead to other bugs or something
EDIT: Legend with normal/bold style is from my others testing of change option from single value to function accepting option
Hi,
it has fixed the problem on my side.
I don't see other problem cause by the fix for now. But now I know where to look.
Thank you
Code has been updated to fix the issue
Great thanks to @markosko for the debugging.
In fact, the zeroY value has to be computed without any condition and the bug was for Bar/StackedBar/Lines/HorizontalBar/HorizontalStackedBar.
Yeah, later i found that there was conditional useless, but probably no one till now checked this or used permanent negative start scale with positive numbers ? Not sure. And no problem.
Hi,
if you override the scale start to a negative value, and if you don't have any negative value, all bars start from the override start instead of 0.
is there an option I forgot to set on my side ?
have a nice day