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

Option to remove border between the stacked graph #20782

Open
mayur249 opened this issue Mar 5, 2024 · 3 comments
Open

Option to remove border between the stacked graph #20782

mayur249 opened this issue Mar 5, 2024 · 3 comments
Labels
Product: Highcharts Status: Has workaround Type: Feature Request Used when a new feature is requested either directly or indirectly

Comments

@mayur249
Copy link

mayur249 commented Mar 5, 2024

Description of the feature

For a stacked graph, after giving a borderWidth and borderColor, If we don't want the border which appears in between the two bars, we can't remove it as there is no option for it in highchart

Library related to the feature

Highcharts

Proof of Concept/Live example for the feature

Sharing a jsfiddle link here which contains a stacked column graph with border in between them: https://jsfiddle.net/mayur249/59awzu0d/

The border which are there in between the bars, if we get an option to remove those borders it will be of great help.
Screenshot 2024-03-05 at 6 47 37 PM


You can vote for this feature by adding a thumbs-up reaction to this post.

@mayur249 mayur249 added the Type: Feature Request Used when a new feature is requested either directly or indirectly label Mar 5, 2024
@bm64
Copy link
Member

bm64 commented Mar 5, 2024

Hello @mayur249 and thanks for sharing the idea.

This topic was brought up on stack overflow some time ago too: https://stackoverflow.com/questions/64334052/need-a-single-border-for-stacked-bar-graph-in-highcharts
Suggested workaround was to use a dummy series to create a border:
https://jsfiddle.net/BlackLabel/vz87adgu/

@mayur249
Copy link
Author

Hello @bm64, thank you so much for giving your time for sharing this solution.
One issue I noticed with this solution is that if we want to hover over a particular stack in a bar, we can't do it because it is considering that I am hovering over an entire bar
Screenshot 2024-03-10 at 7 50 43 PM

But for this zIndex was the solution so I applied that and got the solution.
Screenshot 2024-03-10 at 7 50 58 PM
Added the solution in this jsfiddle: https://jsfiddle.net/mayur249/21bp6tjy/

But @bm64, after applying the above solution, there is one more problem that I am facing.
This problem is related to another feature request which I have raised: https://github.com/highcharts/highcharts/issues/20781

The thing is if the stack's value which is at top is zero, I want to change the border radius of the below stacked column dynamically. But currently I am not getting any option to do that. So because of that I am facing this issue here:
Screenshot 2024-03-10 at 8 06 55 PM

@TorsteinHonsi
Copy link
Collaborator

@mayur249 An alternative to setting the zIndex is to apply pointer-events: none. That way the border is not clipped: https://jsfiddle.net/highcharts/ycpa8svt/

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

No branches or pull requests

3 participants