Comments (5)
It also struggles a lot, when you toggle between different min and max ranges. I think both of these issues can be fixed by scaling this values better. I attahced the formula i used in my code. Maybe you can implement this within the widget itself?
double normalize(
double oldMin,
double oldMax,
double? value, {
double newMin = 0,
double newMax = 100,
}) {
if (value == null) return newMin;
if (oldMax - oldMin == 0) return 0;
return (((value - oldMin) * (newMax - newMin)) / (oldMax - oldMin)) + newMin;
}
from gauge_indicator.
Thank you @tobiasht for that 💪🏻
I will try to make some improvements in the upcoming version.
I will post updates here.
from gauge_indicator.
That would be awesome. I'm in a situation where I'd need to set the max value to 0 and dynamically change the min value. The min value needs to be negative.
from gauge_indicator.
This was implemented/fixed by @dino-keskic in #7 and released in version 0.4.3 💪🏻.
If there are further problems, please reopen this issue.
from gauge_indicator.
Awesome! thank you very much! I'll test it now
from gauge_indicator.
Related Issues (13)
- Shader examples HOT 6
- When will v0.4.0 be released? HOT 1
- 0.4.2 - Bugs HOT 3
- Update example of Readme / More simpler example in file? HOT 1
- Assertion Error for circle pointer to have color or gradient HOT 1
- Possible to give height spesific GaugeSegment ? HOT 2
- Add Label in Axis
- Rounded progress bar draws excess curves when the value is zero. HOT 3
- Pointer's shadow offset is not used in the drawPointer method.
- Pointer interactivity
- Segment Painter and Position Incorrect on RadialGauge
- How to place gauge in row oder column widget? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gauge_indicator.