My JavaScript code needs to be converted to TypeScript for proper functionality.
categoryAxis.renderer.labels.template.adapter.add("dy", function(dy, target) {
if (target.dataItem && target.dataItem.index % 2 === 0) {
return dy + 25;
}
return dy;
});
The error is occurring on 2 == 2
.