Rotating the X axis labels
Introduction
In this post we will explain how to rotate the x axis labels.
by default when there's not enough space the labels turn 90 to the right.
Purpose/Benefits
In some cases you need to turn them the other way around for better readability.
Example
Steps
Step 1:
Create a widget with axis labels
Step 2:
Open the widget editor (pencil), edit script (options). Paste the pieces of code below into the script editor. Be sure to change the font within the single quotes to the labels you want for each axis.
widget.on("beforeviewloaded", function(se,ev){ ev.options.xAxis.labels.rotation = 25; ev.options.xAxis.labels.y = 25; })
You might need to "play" a little with the y coordinate value to suite your needs (depends on your starting situation)
The same can be implemented on the yAxis as well. (change xAxis to yAxis)
Step 3:
Hit Save. Refresh the page. Hit Apply.
Enjoy!
-
Like Michal I am also curious about playing around with font-size. Is there specific syntax for this? Even more, I have a numeric X axis with many values (80+) and would like to know if there was a way to display every Nth value. This was something supported in V4 so I'm curious if it's possible in V5?
-
Hi Evan/Michal,
Apologies for the delayed response. I believe the post below is what you are looking for.
https://support.sisense.com/entries/58789440-Column-and-Line-Chart-Formatting
Please sign in to leave a comment.
Comments
7 comments