I need a highcharts chart that creates a mobile-friendly timeline. I am using xrange for my series, here are the settings:
{
chart: {
inverted: true,
height: '500px',
backgroundColor: '',
plotBackgroundColor: '',
style: {
fontFamily: 'Open Sans'
}
},
xAxis: {
max: 24,
min: 0,
endOnTick: true,
lineWidth: 1,
gridLineWidth: 0,
lineColor: 'transparent',
gridLineColor: 'transparent',
tickLength: 0,
title: {
text: ''
},
startOnTick: true,
labels: {
style: {
color: '#ffffff',
fontWeight: '600'
},
},
tickInterval: 1
},
yAxis: {
title: {
text: ''
},
labels: {
enabled: false
},
gridLineWidth: 0,
categories: ['']
},
series: [
{
type: 'xrange',
borderColor: 'gray',
borderRadius: 0,
states: {
inactive: {
opacity: 1
}
},
data: scheduleData,
dataLabels: {
enabled: true,
formatter: function() {
let style = `color: ${
this.point.name === 'charging' ? 'black' : 'white'
}; font-weight: bold;`
return `<span style="${style}">${this.point.name}</span>`
}
}
}
]
}
I need the width of the data to take up the entire graph. I have tried many different things with pointWidth
, clip, and many other highcharts settings but nothing seems to be working.