JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
JavaScript
$(function () {
$('#container').highcharts({
title: {
text: 'Combination chart'
},
xAxis: {
categories: ['ТБ 1', 'ТБ 2', 'ТБ 3', 'ТБ 4', 'ТБ 5']
},
labels: {
items: [{
html: 'Total fruit consumption',
style: {
left: '50px',
top: '18px',
color: (Highcharts.theme && Highcharts.theme.textColor) || 'black'
}
}]
},
series: [{
type: 'column',
name: 'Q1',
/*Не получается разбить колонку на 3 части */
data: [{type:'column',name:'Q1',data:[2]},3,4,5,6]
},
{
type: 'column',
name: 'Q2',
data: [2, 2, 3, 2, 1]
}, {
type: 'column',
name: 'Q3',
data: [3, 4, 4, 2, 5]
},
{
type: 'column',
name: 'Q4',
data: [3, 4, 4, 2, 5]
},
{
type: 'pie',
name: 'Total consumption',
data: [{
name: 'Jane',
y: 13,
color: Highcharts.getOptions().colors[0] // Jane's color
}, {
name: 'John',
y: 23,
color: Highcharts.getOptions().colors[1] // John's color
}, {
name: 'Joe',
y: 19,
color: Highcharts.getOptions().colors[2] // Joe's color
}],
center: [100, 80],
size: 50,
showInLegend: false,
dataLabels: {
enabled: false
}
}
]
...