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>
<script src="https://code.highcharts.com/highcharts-more.js"></script>
<div id="wrapper">
<div id="container-column1" style="; height: 400px;"></div>
<div id="container-column2" style=" height: 400px;"></div>
</div>
<div id="container-bar" style=" height: 400px;"></div>
CSS
#wrapper {
display: grid;
grid-template-columns: 1fr 1fr;
grid-template-rows: auto auto;
width: 100%;
}
#ccontainer-line,
#container-radar {
margin-bottom: 35px;
}
#container-column2 {
border-left: 1px solid #E2E2E2;
border-bottom: 1px solid #E2E2E2;
}
#container-column1 {
border-bottom: 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',
}
}
}
};
Highcharts.setOptions(Highcharts.theme);
Highcharts.chart('container-column1', {
chart: {
type: 'column',
marginRight: 50
},
title: {
text: 'Sales in Q1'
},
subtitle: {
text: 'Data is made up.'
},
xAxis: {
categories: ['January', 'February', 'March']
},
legend: {
enabled: true
},
yAxis: {
labels: {
format: '${text}'
},
title: {
text: ''
}
},
tooltip: {
valueSuffix: ' $'
},
series: ['Product A', 'Product B', 'Product C'].map(name => ({
name,
data: Array.from({
length: 3
}, ()...