I am having trouble getting the right date object when trying to change the AxisLabel :
dateAxis.renderer.labels.template.adapter.add("text", function(text, target) {
var date = target.dataItem.date, //Date Object "2020/01/01"
labelText = text; // "Jul" for July
return text;
});
Here, target.dataItem.date gives me a date Object with only the year initialized, with the month being set to January everytime, whereas the text parameter gives me "Jul" for July. Why is the date object not correct ?
**** EDIT ****
Here is a codepen of my problem, which in fact occurs when the chart width is too narrow so the dateAxis shows only years : https://codepen.io/XxSven/pen/rNadEPG