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

counter-clockwise gauge #220

Open
robbiezl opened this issue Nov 22, 2022 · 7 comments
Open

counter-clockwise gauge #220

robbiezl opened this issue Nov 22, 2022 · 7 comments

Comments

@robbiezl
Copy link

Now, because of the value clamp,the gauge can only support clockwise graphical representation. When the value is negative, could you provide counterclockwise representation

@HanSolo
Copy link
Owner

HanSolo commented Nov 22, 2022

Can you provice a graphical example about what you are looking for please?

@robbiezl
Copy link
Author

robbiezl commented Nov 22, 2022

Thank you for your reply. The following is the URL of the sketch I uploaded

https://pan.baidu.com/s/1V7Ap_iySwf1wZ10I8L99WA?pwd=7hxy

input code: 7hxy

@HanSolo
Copy link
Owner

HanSolo commented Nov 22, 2022

Looks like I have only implemented it in the GaugeSkin.

Gauge gauge = GaugeBuilder.create()
                          .skinType(SkinType.GAUGE)
                          .minValue(-100)
                          .maxValue(0)
                          .tickLabelDecimals(1)
                          .startAngle(90)
                          .angleRange(270)                    
                          .decimals(2)
                          .autoScale(false)
                          .animated(true)                    
                          .build();
```
If that skin doesn't work for you, I'm afraid you need to implement it on your own (which is not too hard, depending on the skin you choose as base). If you take the BarSkin you don't need to worry about the tickmarks which is the most work to get it right. So you could create either a new skin based on the BarSkin or create a pull request with the changes.

@robbiezl
Copy link
Author

Maybe my expression is not accurate enough. I want the value progress bar to express positive and negative through positive or clockwise.Now when the value is negative, the progress bar is always displayed at 0.

1 similar comment
@robbiezl
Copy link
Author

Maybe my expression is not accurate enough. I want the value progress bar to express positive and negative through positive or clockwise.Now when the value is negative, the progress bar is always displayed at 0.

@robbiezl
Copy link
Author

Maybe my expression is not accurate enough. I want the value progress bar to express positive and negative through positive or clockwise.Now when the value is negative, the progress bar is always displayed at 0.

            gauge = GaugeBuilder.create().interactive(true)
            .skinType(Gauge.SkinType.BAR)
            .barColor(Color.rgb(0, 255, 0))
            .valueColor(Color.BLACK)
            .unitColor(Color.BLACK)
            .unit("KPH")
            .animated(true).value(-75)
            .build();

链接: https://pan.baidu.com/s/1yD8hsbbbCpcQuCU0txP2GQ?pwd=kjgx

@HanSolo
Copy link
Owner

HanSolo commented Nov 22, 2022

Yes, I understand but it is not implemented in the BarSkin, so it only works in the GaugeSkin at the moment. Because I'm busy with other stuff, I won't have the time to implement it at the moment. But as mentioned for the BarSkin it should not be too hard to implement it on your own and either use your own skin based on the BarSkin or creeate a pull request which might end up in Medusa.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants