Forum Discussion
DRay
08-12-2025Admin
Hello simon_geoghegan​,
Thank you for reaching out.
Can you try below script and let me know if this is what you were looking for?
====
widget.on('ready', function() {
try {
if (widget.chart && widget.chart.xAxis && widget.chart.xAxis[0]) {
widget.chart.xAxis[0].update({
labels: {
rotation: -45, // Change to -90 for vertical
align: 'right',
style: {
fontSize: '12px'
}
}
});
}
} catch (e) {
console.error('Axis rotation error:', e);
}
});
======
How to Customize:
- rotation: -45 → for slanted labels
- rotation: -90 → for vertical labels
- fontSize → change the font size as needed
How to install the script:
- Edit the widget (Bar chart, Column chart, etc.).
- Click the three-dot menu > Edit Script.
- Paste the code above.
- Save and refresh the widget.