JSFiddle - React, Tailwind, and code Playground
Last visit to an operator store by type of service offered
by pepperdigital
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: 310px; height: 400px; margin: 0 auto"></div>
JavaScript
Highcharts.chart('container', {
chart: {
type: 'bar'
},
credits: {
enabled: false
},
exporting: {
enabled: true
},
colors: ['#DDEFE8','#9DD4CF','#6FC2B4','#00ABAB','#0097A9','#007680','#004F59'],
title: {
text: ''
},
tooltip: {
formatter: function () {
return this.series.name +
'<br><b>' + this.y + '%</b>';
}
},
legend: {
enabled: true,
reversed: true
},
xAxis: {
categories: [
'To obtain help or advice with technical issues',
'To get information about contract/tariffs or query my bill',
'To renew my contract or purchase a mobile phone',
'To get information about mobile phones']
},
yAxis: {
min: 0,
max: 100,
labels: {
format: '{value}%'
},
title: {
text: ''
}
},
plotOptions: {
series: {
stacking: 'normal'
}
},
series: [
{
name: 'Do not know',
data: [4,4,4,4]
},
{
name: 'Never',
data: [39,41, 28, 26]
},
{
name: 'Longer ago',
data: [20,18, 22, 20]
},
{
name: 'Last 2 years',
data: [9, 8,16, 13]
},
{
name: 'Last 12 months',
data: [12, 11, 14, 15]
},
{
name: 'Last 6 months',
data: [11, 11, 13, 15]
},
{
name: 'Last month',
data: [5,6,4,7]
}]
});