Add borderDashStyle to bar and column plotOptions
In addition to the current capability of setting borderColor, borderWidth and borderRadius on bar and column plotOptions, it would be helpful to be able to configure a dashStyle for the border.
In our use case, we're drawing a stacked bar chart, and we'd like to display the final stack series as a empty bar (white background) bordered by a red dashed line.
There’s a simple hack you can do to implement it: http://jsfiddle.net/highcharts/ztRF5/
-
Cristi S. commented
...more remarks:
- dashStyle works in most bar charts (and must be documented)
- no effect in Waterfall charts
- in Mekko it is called borderDashStyle -
Cristi S. commented
...found the answer here: https://stackoverflow.com/questions/26658815/how-to-make-a-dashed-bar-chart-border-in-highcharts
just comment out the first line and it works: http://jsfiddle.net/cristiscu/ztRF5/178/
-
Cristi S. commented
Is this in the current branch? Or the topic needs an update?
http://jsfiddle.net/cristiscu/ztRF5/177/ - I replaced just the script location and it throws an exception.
Thanks,
-Cristian -
It took a minor adjustment to make it work again - the SVG renderer needs to know the borderWidth first in order to apply the dashStyle.
Code change at https://github.com/highslide-software/highcharts.com/commit/cd0d689e4de4729839d3e63c370836c07290db7f
Demo at http://jsfiddle.net/highcharts/ztRF5/130/ -
Ehud Winograd commented
Same as Simon said; it seems like it's supposed to work, but for some reason shows a solid border until mouseover.
Any ideas? -
Simon Smithson commented
I realise this is a bit of an old issue but I would like to do exactly the same thing. The examples provided though show a solid border until moused over. I presume this was not the case in previos versions.
Is there another way to achieve this in the current version?
-
Jeff Myers commented
Very cool! This allowed me to do exactly what I wanted: http://jsfiddle.net/jdmyers/ztRF5/1/
Do you intend to add this as a supported API?
Thanks,
- Jeff