Highcharts Demo
author(s):
Rafal Sebestjanski
by Rajesh Danabal
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/dumbbell.js"></script>
<script src="https://code.highcharts.com/modules/lollipop.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script src="https://code.highcharts.com/modules/accessibility.js"></script>
<script src="https://code.highcharts.com/modules/export-data.js"></script>
<div id="container-lollipop"></div>
<div id="container-column"></div>
CSS
.highcharts-figure, .highcharts-data-table table {
min-width: 320px;
max-width: 800px;
margin: 1em auto;
}
.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;
}
.ld-label {
width:200px;
display: inline-block;
}
.ld-url-input {
width: 500px;
}
.ld-time-input {
width: 40px;
}
JavaScript
Highcharts.chart('container-lollipop', {
chart: {
type: 'lollipop'
},
legend: {
enabled: false
},
title: {
text: 'Lollipop chart with error bar'
},
tooltip: {
shared: true
},
xAxis: {
type: 'category'
},
yAxis: {
title: {
text: 'Population'
}
},
series: [{
name: 'lollipop',
data: [{
name: 'Lollipop',
low: 1427647786
}]
},{
name: 'lollipop-error',
type: "errorbar",
data: [[1837647786, 1227644786] ]
}]
});
Highcharts.chart('container-column', {
chart: {
type: 'column'
},
legend: {
enabled: false
},
title: {
text: 'Column chart with error bar'
},
tooltip: {
shared: true
},
xAxis: {
type: 'category'
},
yAxis: {
title: {
text: 'Population'
}
},
series: [{
name: 'column',
data: [{
name: 'Column',
y: 1427647786
}]
},{
name: 'column-error',
type: "errorbar",
data: [[1837647786, 1227644786] ]
}]
});