I have a strange behavior. the chart (line) is displayed all well, but the X axis labels (dates or time and date) are displayed on the left of the tick and not below it as it should be. I have tried all possible settings, but nothing helps. the tick is displayed in the right location, and the box of the label (colored in red) is displayed in the right location but the content of the label is on the left side. this is the settings for the X axis:
axisX: {
interval: 3600 * 3,
gridColor: 'lightgrey',
tickColor: 'lightgrey',
labelFormatter: e => {
if(e.chart.axisX[0].dataInfo.max - e.chart.axisX[0].dataInfo.min > (86400000 * 5))
return moment(e.value).format('D.M');
else
return moment(e.value).format('HH:mm D.M');
},
crosshair: {
enabled: true,
color: '#244D85',
snapToDataPoint: false,
label: ''
},
lineColor: 'transparent',
labelFontSize: 15,
labelAngle: 0,
margin: 10,
labelBackgroundColor: '#942626',
labelAutoFit:true,
labelWrap: true,
}
I have deliberately set the label background to red , so it will be more visible (the problem). Image is attached to show the problem. Please help, I’m out of ideas.