Transform Pivot - Rotate Column Headers
Hi All,
Is there any widget level code that would rotate column headers so that they can be displayed similar to the below:
I have found various bits of script code online but these seem to relate more to changing font colours etc.
Any help would be greatly appreciated!
Regards,
Simon
simon_geoghegan
Posted 1 year ago·Last reply 11 months ago
12 comments
simon_geoghegan
OP11 months agoHiDRay
I was able to get some 3rd party help through our vendor and have managed to get what I needed.
Apologies, should have marked this as resolved.
Regards
Simon
DRay
·11 months agoNo problem. I'm glad you are up and running!
DRay
·11 months agoIf you can share the solution here so others who have the same questions can benefit, that would great! I understand if you can't though.
DRay
·11 months agoHi simon_geoghegan,
Were you able to get this resolved?
simon_geoghegan
OP1 year agoHi DRay - we dont have an account team. We're a customer of a 3rd party that uses Sisense as its analytics option within the system we have procured.
We have a "builder license" and can create our own visuals etc. but I think anything wider than that (such as having an account team etc.) isnt something we have.
I have raised a ticket with our vendor instead and asked if they can support with the code needed.
Regards,
Simon
DRay
·1 year agoThank you for getting back to me. Have you reached out to your account team yet? If not, I can reach out to them for you.
simon_geoghegan
OP1 year ago · EditedHi DRay
Apologies for the delay. I have just tried that but unfortunately get an "Access Denied" message:
Regards,
Simon
DRay
·1 year agoHi simon_geoghegan,
Are you able to access the support portal? https://community.sisense.com/category/support/discussions/SupportPortal
simon_geoghegan
OP1 year agoThanks DRay - apologies but i'm not sure how to open a support case i'm afraid. Are you able to advise?
simon_geoghegan
OP1 year ago · EditedHi DRay , thanks for your reply.
Unfortunately that hasn't worked for me. Have applied but the hospital names within the pivot table below have remained the same I'm afraid.
DRay
·1 year agoOk. Thank you for trying.
Can you open a support case for this? They will probably want to look at browser logs to figure out why that's not working.
DRay
·1 year agoHello 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:
How to install the script: