Highcharts Demo
author(s): Torstein Hønsi
by Black Label
HTML
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap" rel="stylesheet">
<script src="https://code.highcharts.com/highcharts.js"></script>
<div class="flex-container">
<div id="container1"></div>
<div id="container2"></div>
</div>
CSS
.flex-container {
display: flex;
}
#container1,
#container2 {
flex: 1;
}
#container2 {
border-left: 1px solid #E2E2E2;
}
@media (max-width: 550px) {
.flex-container {
display: block;
}
#container2 {
border-left: 0px solid transparent;
border-top: 1px solid #E2E2E2;
}
}
JavaScript
Highcharts.theme = {
colors: [
"#2D2357",
"#4B3A7D",
"#614FA2",
"#7765C7",
"#8E7BED",
"#A392F5",
"#B8A8FF",
"#CCC0FF",
"#E0D9FF"
],
chart: {
panning: {
enabled: false
},
zooming: {
mouseWheel: {
enabled: false
}
},
style: {
fontFamily: 'Montserrat, sans-serif'
},
},
credits: {
enabled: false
},
title: {
style: {
fontWeight: 'normal',
color: 'black',
fontSize: '16px'
}
},
legend: {
symbolRadius: 0,
itemStyle: {
fontWeight: 'normal',
color: 'black',
fontSize: '12px'
}
},
plotOptions: {
series: {
borderRadius: 0,
borderWidth: 0.5,
borderColor: null,
dataLabels: {
style: {
fontWeight: 'normal',
color: 'black',
fontSize: '12px'
}
}
}
},
xAxis: {
title: {
style: {
fontSize: 14,
fontWeight: 'normal',
color: 'black',
}
},
labels: {
style: {
fontSize: 12,
fontWeight: 'normal',
color: 'black',
}
}
},
yAxis: {
title: {
style: {
fontSize: 14,
fontWeight: 'normal',
color: 'black',
}
},
labels: {
style: {
fontSize: 12,
fontWeight: 'normal',
color: 'black',
}
}
},
responsive: {
rules: [{
condition: {
maxWidth: 502
},
chartOptions: {
chart:{marginLeft:100},
yAxis: [{
labels: {
step: 2,
style: {
fontSize: 12
}
},
},
],
xAxis: {
labels: {
style: {
textOverflow: 'ellipsis',
width: '50px',
fontSize: 12
}
},
title: {
style: {
fontSize: 12
}
}
},
...