XAxis label is cutting


#1

I am drawing a line series using Category Axix setting to Xaxis. I am displaying weekly, monthly and yearly data on user selection.
For week and month the Xaxix labels are displaying fine as there are 7 and 5 points need to be added respectively.
Problem occures with yearly data which has 12 points and I am adding text labels as Jan. Feb,… Dec.
The Dec text gets cut off.
I minimised the font size also I tried giving full width and played with padding and margin values. Still Dec gets cut off.

Any suggestion?

Thanks & Regard
Nilesh


#2

Hello Nilesh,
Have you tried setting a rangePaddingLow and RangePaddingHigh on your xAxis? Code similar to the following should help:

xAxis.setRangePaddingLow(.2);
xAxis.setRangePaddingHigh(.2);

A double value between 0.0 and 1.0 should help you obtain the extra space you need to avoid the label being cut.
Let us know how you get on.
Yours,
Kai.


#3

Tried. Still not working.

g.


#4

Hi Nilesh,

What values have you used for rangePaddingLow and rangePaddingHigh in the above chart? Have you tried increasing the value to increase the padding?

Kind regards,

Alison


#5

Yes I tried various values within the range 0.2 to 1.5.


#6

Hi Nilesh,

If you’re using a category axis then a rangePaddingHigh value of 1 should be sufficient, as the value is in data terms, where 1 is the space between each category. Please could you clarify what value you were using in the screenshot above?

You may need to adjust the font size in order to fit all the labels on the axis.

If you can show us all the code you’re using to set up and style your chart, or even better, if you could provide us with a working sample showing your issue, then we should be able to help you. (If you prefer not to make the code public then please feel free to email us at info@shinobicontrols.com).

Kind regards,

Alison