Columns 2 dimentional
by b_g_v
HTML
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/variwide.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script src="https://code.highcharts.com/modules/export-data.js"></script>
<script src="https://code.highcharts.com/modules/accessibility.js"></script>
<figure class="highcharts-figure">
<div id="container"></div>
</figure>
CSS
#container {
height: 500px;
}
.highcharts-figure,
.highcharts-data-table table {
min-width: 320px;
max-width: 900px;
margin: 1em auto;
}
.highcharts-data-table table {
font-family: Verdana, sans-serif;
border-collapse: collapse;
border: 1px solid #ebebeb;
margin: 10px auto;
text-align: center;
width: 100%;
max-width: 500px;
}
.highcharts-data-table caption {
padding: 1em 0;
font-size: 1.2em;
color: #555;
}
.highcharts-data-table th {
font-weight: 600;
padding: 0.5em;
}
.highcharts-data-table td,
.highcharts-data-table th,
.highcharts-data-table caption {
padding: 0.5em;
}
.highcharts-data-table thead tr,
.highcharts-data-table tr:nth-child(even) {
background: #f8f8f8;
}
.highcharts-data-table tr:hover {
background: #f1f7ff;
}
.highcharts-description {
margin: 0.3rem 10px;
}
JavaScript
const chart = Highcharts.chart('container', {
chart: {
type: 'variwide'
},
credits: {
enabled: false
},
title: {
text: ''
},
/*
subtitle: {
text: 'Source: <a href="http://ec.europa.eu/eurostat/web/' +
'labour-market/labour-costs/main-tables">eurostat</a>'
},
*/
xAxis: {
type: 'category'
},
/*
caption: {
text: 'Column widths are proportional to GDP'
},
*/
legend: {
enabled: false
},
series: [{
name: 'Account',
data: [["AwVw7daqs4TwJr3",11,1],
["mukuge137",10,1],
["Mari21Sofi",3,1],
["neguser1media",1,1],
["junyaasylum",3,1],
["ya0012ya",6,1],
["InvestBeginner2",3,1],
["mjnTTcTBmf1oyYT",1,1],
["kousui_kantei",5,1],
["8686kinta",51,1],
["shouchu_007",3,1],
["trappedsoldier",1,1],
["rGs1oSZQSbti9cd",3,1],
["wakka1104",2,1],
["uofusROQOqswawo",2,1],
["97bO5rzmTt65134",2,1],
["nWjYIQxdBwYt4iF",5,1],
["ma15876509",2,1],
["Yusuke_Murayama",1,1],
["credws",2,1],
["tnekokunnor",3,1]
],
dataLabels: {
enabled: true,
format: '{point.y:.0f}'
},
/**/
tooltip: {
//pointFormat: 'Mentions: <b>{point.y}</b><br>Mentioned: <b>{point.z}</b><br>'
},
/**/
borderRadius: 3,
colorByPoint: true
}]
});
chart.update({
tooltip: {
formatter: function(){
return '<b>' + this.options.name + '</b><br>Mentions: ' + this.y + '<br>Mentioned: ' + (this.z-1);
}
}
});