Closed majbar-emir closed 6 months ago
Thank you @majbar-emir for raising the issue. After reviewing your issue, it seems that the problem may stem from how the gauge is configured.
Currently if the Gauge
has 5 CustomRulerLabels
it divides the Gauge into 5 segments equally, The lowest value becomes the start of the Gauge
So for your case the Start
label holds value of 20 hence the gauge
starts from 20, and second year
is 40
so the value 50
is just ahead of it.
To Fix it in your code it could be done by adding a CustomRulerLabel
with value 0
so that the gauge can divide equally or change the values to a more precise way
customLabels: const [
CustomRulerLabel(text: 'start', value: 0),
CustomRulerLabel(text: "1st Year", value: 20),
CustomRulerLabel(text: "2d Year", value: 40),
CustomRulerLabel(text: "3d Year", value: 60),
CustomRulerLabel(text: "4th Year", value: 80),
CustomRulerLabel(text: "5th Year", value: 100),
],
If you have any further issues, please don't hesitate to create another issue!
Thank you very much, it worked !!!
Description I've encountered an issue with the LinearGauge widget from the geekyants_flutter_gauges package, where the progress bar does not display correctly for certain values. Specifically, progress values of 25 or lower are not shown at all, and a value of 70 appears visually closer to 50, suggesting an offset in the progress calculation or rendering.
Steps to Reproduce Initialize a LinearGauge widget with the specified configuration. Set the progress value to 20 or lower. Notice that no progress is displayed on the gauge, as if the progress bar is completely missing. Increase the progress value to 60. The progress visually indicates a value closer to the 50% mark, not accurately reflecting the set value. Further increase the progress value to 90. The displayed progress seems to correspond to approximately 87.5%, with the discrepancy between the set value and the visual representation decreasing as the value increases. This behavior suggests an underlying issue with how the gauge calculates or renders progress, particularly less evident at higher values where the discrepancy becomes smaller but still noticeable. Expected Behavior The progress bar should accurately reflect the set progress value across the entire range of the gauge, without any offset or missing segments.
Actual Behavior Progress values of 25 or lower do not appear on the gauge, and a progress value of 70 is visually misrepresented, suggesting an underlying issue with how progress is calculated or rendered.
Environment Flutter version: 3.13.7 geekyants_flutter_gauges version: 1.0.3 Operating System & version: trying to implement it as costume widget in flutterflow Possible Solution N/A
Additional context