JSFiddle - React, Tailwind, and code Playground
by Stanislav Kanzafarov
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: 210px; height: 400px; margin: 0 auto"></div>
JavaScript
$(function () {
$('#container').highcharts({
chart: {
zoomType: 'xy'
},
title: {
text: 'Кількість поданих ідей помісячно'
},
subtitle: {
text: 'В режимі реального часу'
},
xAxis: [{
categories: ['Січень', 'Лютий', 'Березень', 'Квітень', 'Травень', 'Червень',
'Липень', 'Серпень', 'Вересень', 'Жовтень', 'Листопад', 'Грудень'],
crosshair: true
}],
yAxis: [{ // Primary yAxis
labels: {
format: '{value}шт.',
style: {
color: Highcharts.getOptions().colors[1]
}
},
title: {
text: 'Кількість фішек',
style: {
color: Highcharts.getOptions().colors[1]
}
}
}, { // Secondary yAxis
title: {
text: 'Кількість фішек всього',
style: {
color: Highcharts.getOptions().colors[0]
}
},
labels: {
format: '{value} шт',
style: {
color: Highcharts.getOptions().colors[0]
}
},
opposite: true
}],
tooltip: {
shared: true
},
legend: {
layout: 'vertical',
align: 'left',
x: 120,
verticalAlign: 'top',
y: 100,
floating: true,
backgroundColor: (Highcharts.theme && Highcharts.theme.legendBackgroundColor) || '#FFFFFF'
},
series: [{
name: 'Фішки',
type: 'column',
yAxis: 1,
data: [15, 22, 20, 36, 55, 44, 48, 33, 61, 33, 44, 54],
tooltip: {
valueSuffix: ' шт'
}
}, {
name: 'Всього',
type: 'spline',
data:...