Set and current value
Ultima
by Sascha
HTML
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/highcharts-more.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>
<script src="https://code.highcharts.com/modules/dumbbell.js"></script>
<script src="https://code.highcharts.com/modules/lollipop.js"></script>
<figure class="highcharts-figure">
<div id="container"></div>
</figure>
CSS
.highcharts-figure, .highcharts-data-table table {
min-width: 360px;
margin: 1em auto;
}
#container {
height: 150px;
}
.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;
}
JavaScript
Highcharts.chart('container', {
chart: {
marginLeft: 180, // Keep all charts left aligned
spacingTop: 15,
spacingBottom: 15,
height: 120,
marginRight: 90,
type: 'line'
},
legend: {
padding: 1,
align: 'left',
verticalAlign: 'top',
layout: 'vertical',
itemStyle: {
fontSize: '10px',
fontWeight: 'normal'
}
},
credits: {
enabled: false
},
exporting: {
enabled: false
},
title: {
text: ''
},
subtitle: {
text: ''
},
xAxis: {
categories: ['01:00', '02:00', '03:00', '04:00', '05:00', '06:00', '07:00', '08:00', '09:00', '10:00', '11:00', '12:00']
},
yAxis: {
title: {
text: ''
},
min: 230,
max: 255
},
plotOptions: {
line: {
dataLabels: {
enabled: true
},
enableMouseTracking: false
}
},
series: [{
type: 'area',
step: 'left',
name: 'Set Weight Tr1',
connectNulls: true,
data: [240, null, null, null, 250, null, null, 250, null, null, null, 250]
},
{
type: 'line',
name: 'Measured Weight Tr1',
data: [237, 234, 236, 237, 236, 248, 246, 245, 249, 247, 245, 246]
}
]
});