Welcome Guest Search | Active Topics |

Prevent Axis Labels from Rendering in two lines
Pooya
#1 Posted : Wednesday, June 20, 2012 2:18:26 AM(UTC)
Rank: Member

Groups: Registered
Joined: 9/17/2011(UTC)
Posts: 23

Thanks: 2 times
Was thanked: 0 time(s) in 0 post(s)
Hi,

Sometimes in DateTime Axis labels render in two row. is there any parameter to disable it?


Thanks
Pooya
Dragan
#2 Posted : Wednesday, June 20, 2012 4:19:43 AM(UTC)
Rank: Advanced Member

Groups: Administrators, DataVizJavaScript, jQueryChart, jQueryDV, MvcChart, Registered
Joined: 1/3/2011(UTC)
Posts: 483

Thanks: 0 times
Was thanked: 87 time(s) in 87 post(s)
Hi Pooya,

The labels are rendered in more than one row for preventing overlapping between them. If you don’t want this behavior, you can set some labels rotation angle. Something like:

Code:
    axes: [
                    {
                        type: 'dateTime',
                        location: 'bottom',
                        labels: { angle: 1 },
Best Regards,
Dragan Matek
jqChart Inc.
Pooya
#3 Posted : Wednesday, June 20, 2012 6:04:09 AM(UTC)
Rank: Member

Groups: Registered
Joined: 9/17/2011(UTC)
Posts: 23

Thanks: 2 times
Was thanked: 0 time(s) in 0 post(s)
Hi,

Is there any way to solve the problem by showing less labels. this way both overlapping and two row labels should solved.
I test your solution but overlapping become annoying.

By the way, as always your fast replies are unique and wonderful.

Best Regards
Pooya
Dragan
#4 Posted : Wednesday, June 20, 2012 6:17:08 AM(UTC)
Rank: Advanced Member

Groups: Administrators, DataVizJavaScript, jQueryChart, jQueryDV, MvcChart, Registered
Joined: 1/3/2011(UTC)
Posts: 483

Thanks: 0 times
Was thanked: 87 time(s) in 87 post(s)
Hi,

Yes, the overlapping is annoying. You can show fewer labels, but you need to calculate the interval and the intervalType of the date axis manually.

I believe for your case the best solution is to display rotated labels. 45 or 30 degrees angle.
Best Regards,
Dragan Matek
jqChart Inc.
Users browsing this topic
Guest (2)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

FlatEarth Theme by Jaben Cargman (Tiny Gecko)
Powered by YAF 1.9.4 | YAF © 2003-2010, Yet Another Forum.NET
This page was generated in 0.083 seconds.