-
Notifications
You must be signed in to change notification settings - Fork 346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gauge resizing causes thresholds updates #1759
Comments
As you can see below, there is a case, where billboard.js/src/ChartInternal/shape/arc.ts Lines 103 to 110 in 38568c1
Problem 1It should be considered, if forcing the user to use the totalSum as Problem 2If you remove the title in the example above, it will show 100% as value, and 500 as max. If this should be implemented/changed, it should also be implemented for billboard.js/src/ChartInternal/shape/arc.ts Lines 135 to 140 in 38568c1
|
@michkami super nice investigation, thanks a lot! Personally I don't insist in either behavior, I just want it to be consistent. And resizing should not alter the data presented initially in the chart. But I really like the idea of having more granular control over the min/max pair. |
Hm... after reviewing the code, prioritizing So, if prioritize the text regardless the data value, is making incorrect representation of it. In case of to make display some fixed text regardless the data amount, there's gauge: {
min: 0,
label: {
extents: function(value, isMax) {
return isMax ? 100 : value; // will make display 100 for max
},
}
}, |
Max label text should reflect data value, regardless the max option value set. Ref naver#1759
## [2.1.4](2.1.3...2.1.4) (2020-11-11) ### Bug Fixes * **api:** fix tooltip showing when lesser data loaded ([74320cf](74320cf)), closes [#1761](#1761) * **event:** fix referencing event element ([38568c1](38568c1)), closes [#1752](#1752) * **gauge:** fix to be consistent max label value ([0c2006f](0c2006f)), closes [#1759](#1759) * **radar:** fix labels showing on esm usage ([d56ff52](d56ff52)), closes [#1765](#1765) * **shape:** shape not showing on ie11 ([d1366d1](d1366d1)), closes [#1758](#1758) * **tooltip:** fix to reset pending events from .show() ([ce8210c](ce8210c)), closes [#1753](#1753) * **zoom:** fix throwing TypeError during zoom ([f2787fa](f2787fa)), closes [#1760](#1760)
Description
Gauge Max value is changing during the resizing
Steps to check or reproduce
Go to https://naver.github.io/billboard.js/demo/#Chart.GaugeChart, paste in the code
Wait for 2 seconds, note the Max value of the gauge becomes 500, while the max is set to 100 only.
If you remove the
title
property from thegauge: {}
- the value is always 500.And I expect it to always be the
gauge.max
value - 100 in my example.The text was updated successfully, but these errors were encountered: