Dashboards & Visualizations

Chart X-Axis Label Orientation

Ant1D
Motivator

Hi,

I have a chart which contains many cells. When the chart has finished loading, some of the labels in the X-Axis are changed to include an ellipsis (...) in them as shown in the image below.

alt text

How can I rotate the x-axis labels so that they are at a 90 degrees angle to this default horizontal position?

I believe that the 'layoutTransform' property found here might help: http://www.splunk.com/base/Documentation/4.1.6/Developer/AdvChartingConfig-TextblockLayoutspriteSpri...

There is a method in the 'Transformation matrix' section called 'rotate' which I think I could use but I am not sure how to write the code or how to link it to 'param name="charting.axisLabelsX...".

Please help.

Thanks in advance for your help.

Tags (2)
0 Karma
1 Solution

beaumaris
Communicator

Use this form for the param, which works for us in the Advanced XML for our dashboards:

<param name="charting.axisLabelsX.majorLabelStyle.rotation">90</param>

This was placed immediately after the HiddenChartFormatter declaration. While this does rotate the text, there is still some space constraint being applied since now the ellipses are in the vertically oriented text. So you anyone can tell us how to allow more space for the text in the x-axis labels please let us know.

View solution in original post

beaumaris
Communicator

Use this form for the param, which works for us in the Advanced XML for our dashboards:

<param name="charting.axisLabelsX.majorLabelStyle.rotation">90</param>

This was placed immediately after the HiddenChartFormatter declaration. While this does rotate the text, there is still some space constraint being applied since now the ellipses are in the vertically oriented text. So you anyone can tell us how to allow more space for the text in the x-axis labels please let us know.

neiljpeterson
Communicator

FYI Splunk 6.1 has this built into the GUI

0 Karma

vaishnavi07
Explorer

Hi am using V4.3.4. i used rotation and overflowmode but its not working. pls help.

0 Karma

Ant1D
Motivator

Hi beaumaris, thanks for the info. Your solution also works. I tested on v4.1.3

0 Karma

beaumaris
Communicator

We are running 4.1.4, and the solution there is adding the additional parameter

default

The combination of those 2 parameters rotates the text and displays the full label name in each cell on the x-axis, rather than placing ellipses in the name.

0 Karma

Ant1D
Motivator

Here is the answer: use the param above except replace 'rotation' with 'minimumWidth'

0 Karma

Ant1D
Motivator

Thanks beaumaris. I think I was trying too hard with this one 🙂

I have an answer for the issue that you are experiencing with the ellipsis. I could provide it in a comment here or maybe it would be better to ask it as another question and then I can provide an answer there. Let me know.

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...