Hi everyone! I am trying to create a certain HighChart
, but I am not sure on how I should format my drilldown
data and I can't find any example on the internet!
This JSfiddle shows how far I have gotten: http://jsfiddle.net/ma50685a/37/.
The HighChart is suppose to visualise comments that have been deleted. The first two bars are mean amounts of filtered comments. When the drilldown is activated, I would to have stacked columns of websites and four categories of why a comment has been filtered (nasty comments, spam etc).
Could someone help me out with this or have an example of how to format the drilldown data?
You just forgot to include the drilldown js (http://jsfiddle.net/ma50685a/38/)
Add the following script after highstock :
<script src="https://code.highcharts.com/modules/drilldown.js"></script>
EDIT : Sorry I didn't read the question right... This works : http://jsfiddle.net/ma50685a/39/
Found here : http://www.semantia.com.au/articles/highcharts-drill-down-stacked-columns/
To have a stacked column you need multiple series, to have multiple series after the drilldown you have to add the series dynamically, e.g. on drilldown event.
Each property of the object below represents a series and it is associated with the top level series name. Object '1' will appear after the click on the first column and will span 4 categories.
The next object '1' will be stacked with the data from the
drilldowns.1
object:And finally the series must be added and the drilldown is fired.
example: https://jsfiddle.net/ahjkouuh/