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

The columnpyramid series isn't working with yAxis width and inverted #16150

Closed
TheresaJoy opened this issue Aug 5, 2021 · 5 comments · Fixed by #16257
Closed

The columnpyramid series isn't working with yAxis width and inverted #16150

TheresaJoy opened this issue Aug 5, 2021 · 5 comments · Fixed by #16257

Comments

@TheresaJoy
Copy link

TheresaJoy commented Aug 5, 2021

Hi,

I posted this issue in Highcharts Forum. So Higcharts Developer @K009 suggested that I post it here to have a closer look into it.

We tried to get a vertical version of this:
https://jsfiddle.net/Theresa_Joy/4x6rfom9/16/

We tried to get it done, and this is our result.
https://jsfiddle.net/Theresa_Joy/j270L9y5/36/

There seems to be no script error, but we only see kind of bars with a slight angle instead of pyramids.
We checked this in Chrome, Mozilla and Edge.

Reply of @K009
It happens because the axis is smaller (eg. 25% instead of 100%) and the points don't have enough place to be displayed, which results in no angled corners. Simplified demo with this issue: https://jsfiddle.net/BlackLabel/o390gwje/

I think that it might be a bug. Could you report it on our GitHub so we could take a closer look at it?
Here's a link: https://github.com/highcharts/highchart ... new/choose

Can you pls. check it out at the earliest and let us know. This is one very important feature we want to have, for our graphs. Since Highcharts has already an inbuilt Column Pyramid Chart, it was a very good candidate for our choice.

@highsoft-bot highsoft-bot added this to To do in Development-Flow Aug 5, 2021
@raf18seb
Copy link
Contributor

raf18seb commented Aug 5, 2021

Hi @TheresaJoy, thank you for reporting the bug.

Indeed, the columnpyramid has never worked with chart.inverted and yAxis.width.
Simplified demo: https://jsfiddle.net/BlackLabel/3d4t9hp1

Internal note: tagged as Good for beginners because the reason of this bug and the fix should be applied somewhere here:

if (chart.inverted) {
invBarPos = chart.plotWidth - barY;
stackHeight = (topPointY -
(chart.plotWidth - (translatedThreshold as any)));
// proportion tanges
topXwidth = (barW *
(topPointY - invBarPos)) / stackHeight;
bottomXwidth = (barW *
(topPointY - (invBarPos - barH))) / stackHeight;
x1 = barX + barW + topXwidth; // top bottom
x2 = x1 - 2 * topXwidth; // top top
x3 = barX - bottomXwidth + barW; // bottom top
x4 = barX + bottomXwidth + barW; // bottom bottom
y1 = barY;
y2 = barY + barH - minPointLength;
if ((point.y as any) < 0) {
y2 = barY + barH + minPointLength;
}
}

@raf18seb raf18seb changed the title Vertical Stacked Multiple Axis The columnpyramid series isn't working with yAxis width and inverted Aug 6, 2021
@bm64 bm64 self-assigned this Aug 6, 2021
@TheresaJoy
Copy link
Author

Hi @raf18seb, Is there an update in this? Thank you!

@highsoft-bot highsoft-bot moved this from To do to In progress in Development-Flow Aug 25, 2021
@raf18seb
Copy link
Contributor

Hi @TheresaJoy,

Our developer has started working on a fix which should be available soon in the next release version.

@TheresaJoy
Copy link
Author

Thank you for the info. We would like to use this in our project if this issue is fixed. When would be approx. the next release?

@raf18seb
Copy link
Contributor

@TheresaJoy,

We have found the problem and we hope that it will be fixed in the core soon.
We released v9.2.2 yesterday, so the next version should be released within few weeks (or months the most). We don't have ETA at this moment.

For now, you can use this workaround plugin: https://jsfiddle.net/BlackLabel/9qx6nuLt/

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.

4 participants