Highcharts.Tree with JSON
Initialising tree chart with TreeRow.
by cristiscu
HTML
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://rawgit.com/skorunka/highcharts.tree/master/dist/tree.js"></script>
<script src="https://rawgit.com/skorunka/highcharts.tree/master/dist/highcharts.tree.js"></script>
<div id="chart_div"></div>
JavaScript
$(function () {
$("#chart_div").highcharts({
chart: { type: "tree" },
title: { text: false },
series: [{ data: [{ tree: [
new TreeRow(1, null, { title: "Country", data: [324] }),
new TreeRow(7, 1, { title: "UK", data: [134] }),
new TreeRow(8, 1, { title: "France", data: [445] }),
new TreeRow(5, 1, { title: "US", data: [13] }),
new TreeRow(9, 5, { title: "2007", data: [62] }),
new TreeRow(10, 5, { title: "2008", data: [42] }),
] }] }],
});
});