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

Add y-scale logarithmic axis to Windrose chart #18422

Closed
tkreyche opened this issue Feb 1, 2023 · 3 comments · Fixed by #18430
Closed

Add y-scale logarithmic axis to Windrose chart #18422

tkreyche opened this issue Feb 1, 2023 · 3 comments · Fixed by #18430

Comments

@tkreyche
Copy link

tkreyche commented Feb 1, 2023

The Windrose chart has an inherent flaw that is not specific to your implementation of it. But it can (probably) be resolved if you allow a y-axis log scale option. I've tried log scale on the y-axis and it throws an error. I don't see the option documented for the Windrose chart.

The problem is pretty simple: a high wind event is not (or barely) visible on the Windrose chart under the following conditions:

  1. it is of relatively short duration
  2. the direction of the event is not consistent with the otherwise prevailing wind

In this case the chart "pie slice" will be extremely short and this event show up so small on the chart that it's invisible.
It may be that the chart is more designed to show typical events, but it having a y-axis log scale would add flexibility.

One option is to show two Windrose charts side by side, with one restricting the y-axis maximum to 5% or so and not restricting the other chart's y-axis but is not ideal since it takes more real estate and may be confusing to some people.

thanks, Tom Kreyche

@tkreyche tkreyche added the Type: Feature Request Used when a new feature is requested either directly or indirectly label Feb 1, 2023
@highsoft-bot highsoft-bot added this to To do in Development-Flow via automation Feb 1, 2023
@tkreyche
Copy link
Author

tkreyche commented Feb 1, 2023

Here's a prototype app example.
The top Windrose chart has max y-axis is restricted to 5%. The bottom chart has no restriction.

There is a wind event event of 10 to 15 kt (and direction of SE). It shows as 1%. See blue arrows for the event. For the rest of the time period, the wind velocity is under 10kt.

It is visible on the top restricted polar chart, but invisible on the bottom chart.
Maybe log scale is not ideal, but there are other azimuthal projections options such as orthographic that might work.

windrose

@TorsteinHonsi
Copy link
Collaborator

TorsteinHonsi commented Feb 2, 2023

Thanks for writing!

First of all, polar charts support logarithmic y axis out of the box. The error you experienced was probably error 10, because the axis min is set to 0. A log axis cannot go to 0, so by setting it slightly higher, it works: https://jsfiddle.net/highcharts/rjoephd7/.

That said, there's something wrong with how the latest series overlap the whole stack. The > 10 category (yellow) seems to render on top of the other elements. That should be treated as a bug.

@TorsteinHonsi TorsteinHonsi added Type: Bug Flow: Backlog and removed Type: Feature Request Used when a new feature is requested either directly or indirectly labels Feb 2, 2023
@highsoft-bot highsoft-bot moved this from To do to Backlog in Development-Flow Feb 2, 2023
@TorsteinHonsi
Copy link
Collaborator

Workaround

Until the fix is released - the columns that extend to the end are 0-value columns. By replacing 0 by a very small value it should render okay.

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

Successfully merging a pull request may close this issue.

3 participants