Skip to content
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

[RangeLinearGauge] : RangeLinearGauge Fails when RulerPosition is Top #150

Closed
Afroz-Shaikh opened this issue Mar 24, 2023 · 4 comments · Fixed by #151 or #175
Closed

[RangeLinearGauge] : RangeLinearGauge Fails when RulerPosition is Top #150

Afroz-Shaikh opened this issue Mar 24, 2023 · 4 comments · Fixed by #151 or #175
Labels
bug Something isn't working

Comments

@Afroz-Shaikh
Copy link
Collaborator

BUG: RangeLinearGauge renders incorrectly when rulerPosition is top.

Screenshot 2023-03-24 at 7 33 51 PM

Steps to Reproduce:

LinearGauge(
        gaugeOrientation: GaugeOrientation.horizontal,
        rangeLinearGauge: [
          RangeLinearGauge(color: Colors.green, start: 0, end: 50),
          RangeLinearGauge(color: Colors.yellow, start: 50, end: 75),
          RangeLinearGauge(color: Colors.red, start: 75, end: 100),
        ],
        rulers: const RulerStyle(
          rulerPosition: RulerPosition.top,
        ),
      )

Additonal Information

  • This issue occurs in only Horizontal Orientation
  • The issue occurs consistently across different devices and browsers.
@Afroz-Shaikh Afroz-Shaikh added the bug Something isn't working label Mar 24, 2023
This was referenced Mar 24, 2023
hasnentai added a commit that referenced this issue Mar 31, 2023
@Afroz-Shaikh Afroz-Shaikh reopened this Apr 5, 2023
@Afroz-Shaikh
Copy link
Collaborator Author

Afroz-Shaikh commented Apr 5, 2023

After the ViewBox change, we don't need to size.height - offset.dy - getThickness as the RangeLinearGauge aligns Correctly. If we remove the if condition it works as intended

@hasnentai
Copy link
Contributor

Can you quote the GitHub hub file with a line ? Where exactly the condition is ?

@Afroz-Shaikh
Copy link
Collaborator Author

Afroz-Shaikh commented Apr 5, 2023

File : linear_gauge_painter.dart Line no: 971

@Afroz-Shaikh
Copy link
Collaborator Author

was referring to this #151

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants