Welcome Guest Search | Active Topics |

Wrong range on DateTimeAxis with single datapoint
msand
#1 Posted : Monday, June 22, 2015 3:30:39 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 6/22/2015(UTC)
Posts: 3

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

We just purchased a couple of licenses for jqChart MVC in version 3.9.1.0 and there seems to be an issue with the DateTimeAxis under certain circumstances:

When there is only one datapoint in the series, the axis goes from 2012 to 2018 and the single bar spans a lot more ticks than it should do.
Also, because of the big range, when selecting "hours" for interval-type the browser hangs (probably because it is busy generating ticks).

Setting a manual min/max-Value on the DateTimeAxis fixes that, but it seems to me that jqChart should be able to do that automatically.

I created a jsFiddle demonstrating the issue: http://jsfiddle.net/201vausp/3/

Thank you!
Regards,
Michael
Dragan
#2 Posted : Tuesday, June 23, 2015 2:42:22 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 Michael,

If you remove the intervalType and interval options of the bottom axis, the ticks will be correct. When there is only one data point it is difficult to choose a good range. In your case jqChart calculates a big range, but you set intervalType to months.
Best Regards,
Dragan Matek
jqChart Inc.
msand
#3 Posted : Tuesday, June 23, 2015 6:10:48 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 6/22/2015(UTC)
Posts: 3

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

Without any interval options, the ticks are still not correct, there are just fewer of them.
But the bar still sits in the middle of the 5-year-range and looks like it spans 2 years, instead of sitting at a specific tick (like in the second chart I provided with explicit min/max values).


In our application the user can choose how they want to group their data (hour, day, week, month, year) and we map that to the intervalType.
Now if a user has only data for a single month, we show them one bar and want a single tick for that bar.
jqChart behaves like that for more than one datapoint and it seems like it should do that for one point as well.
In my tests it was sufficient to set min/max-range 60 seconds before/after the single datapoint, regardless of intervalType.

I have that workaround in place now, but please look into this for the next release.

Thanks!
Users browsing this topic
Guest
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.085 seconds.