Skip to content

Add point.percentage property for solidgauge chart type #18433

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

Closed
vitaliy-kretsul opened this issue Feb 2, 2023 · 5 comments
Closed

Add point.percentage property for solidgauge chart type #18433

vitaliy-kretsul opened this issue Feb 2, 2023 · 5 comments
Assignees
Labels
Type: Feature Request Used when a new feature is requested either directly or indirectly Type: Good for beginners

Comments

@vitaliy-kretsul
Copy link

This property is currently supported for stacked charts or pies. It would be convenient to have it for solid gauge chart type as well, considering that displaying gauge as a percentage is a pretty common use case.

@vitaliy-kretsul vitaliy-kretsul added the Type: Feature Request Used when a new feature is requested either directly or indirectly label Feb 2, 2023
@karolkolodziej
Copy link
Contributor

Hi @vitaliy-kretsul.
Could you please elaborate on how the percentage value should be calculated for the solidgauge points?

In pie it is rather straightforward, you check the point.value / sumOfPointsInPie but I don't see how it should work in the solidgauge series.

@TorsteinHonsi
Copy link
Collaborator

I imagine it would make sense to calculate the percentage on the yAxis like this: https://jsfiddle.net/highcharts/fcwL4r9s/

This is quite simple to implement, I'll mark it good for beginners. Make sure it is implemented in the gauge series types, that the solid gauge inherits from.

@vitaliy-kretsul
Copy link
Author

@karolkolodziej
I am not sure what is the best way to calculate it, but here is what I am doing currently to get percentage: https://jsfiddle.net/Cortez/7vtx5kmn/
The 'percentage' property is present on 'point' object, but it is undefined. But for pie chart it is there, and it is very convenient to use it.

@karolkolodziej
Copy link
Contributor

Thank you @vitaliy-kretsul for additional feedback!

That is what I was hoping to see, now everything is clear!

@hubertkozik
Copy link
Member

Closing as completed in #18448.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature Request Used when a new feature is requested either directly or indirectly Type: Good for beginners
Projects
None yet
Development

No branches or pull requests

6 participants