0
votes

Highchart's own donut chart example does not display the yAxis. Link below:

http://jsfiddle.net/gh/get/jquery/1.9.1/highslide-software/highcharts.com/tree/master/samples/highcharts/demo/pie-donut/

Part of the code related to the yAxis that does not show up on the chart:

yAxis: {
    title: {
        text: 'Total percent market share'
    }
},

Is it possible to have a donut or a pie chart with a visible yAxis?

1
It's not possible, because pie/donut chart doesn't have yAxis.. You can workaround this by adding some dummy series (with specified type to line etc.): jsfiddle.net/wr8u8kc1Paweł Fus
Thank you. One last request: How do I change the color of that new bottom line to white, to make it disappear visually?thiago
I would think the chart title/subtitle would be a more appropriate way to do this. Seems kind of silly to add an axis, which isn't applicable to a pie chart at all, and then hide it...jlbriggs
@jlbriggs: Thank you for your comment. The purpose is to add a little more information (text) to the chart. My intention wouldn't be to hide the yAxis, I want it to be visible. I was asking, on my previous comment, about how to hide the new bottom blue horizontal line created after Paweł's recommendation and leave only the yAxis text.thiago
Sure. But again - pie charts don't have an axis, so adding one for the sake of a label is odd, when there the title, subtitle, label, and credits elements already, as well as the renderer function.jlbriggs

1 Answers

0
votes

I would suggest making use of one of the many other text elements already set up for the chart.

Adding a dummy series in order to add a dummy axis in order to make use of its title element seems like an odd and excessive choice.

You have these elements available to you by default: