This is a migrated thread and some comments may be shown as answers.

Line chart with date series mapping points outside of range

5 Answers 22 Views
Charts
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 04 Dec 2013, 08:05 PM
I have a line chart using a date series, and for some reason it is mapping points outside of the data range. 

My data starts Nov. 1st, but if I view the chart by week the first week shown is 10/27. If I view by month it shows October and November. This is a problem because I'm using onSeriesClick() to update data elsewhere on the page to reflect the clicked range.

How can I make sure Kendo limits the chart range to the dates in my object?

5 Answers, 1 is accepted

Sort by
0
Iliana Nikolova
Telerik team
answered on 06 Dec 2013, 11:54 AM
Hello Greg,

By design when Kendo UI Chart with date axis is used the data is aggregated for a particular period and the categoryAxis labels start from the first point for the period (therefore "weeks" baseUnit shows October - the week which includes Nov. 1st starts from October). If you wish to display only the dates from a particular range you could use a categoryAxis with type "category".

Regards,
Iliana Nikolova
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
David
Top achievements
Rank 1
answered on 06 Dec 2013, 04:30 PM
Iliana,

That makes sense, but why do I see October when I have the baseUnit defined as months:?

0
Iliana Nikolova
Telerik team
answered on 10 Dec 2013, 12:40 PM
Hello Greg,

I believe October is rendered because there is a record for this month in the data set (simple jsBin example). Could you please check this suggestion?

Regards,
Iliana Nikolova
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
David
Top achievements
Rank 1
answered on 10 Dec 2013, 02:32 PM
Iliana,

As I mentioned before, the data set begins on November 1st. There is no record for October.
0
Iliana Nikolova
Telerik team
answered on 10 Dec 2013, 04:03 PM
Hello Greg,

I am not able to reproduce this issue too - the dates are rendered as expected (jsBIn example). Is it possible to provide an isolated runnable example which I can test locally? Thank you in advance for your time and cooperation.

Regards,
Iliana Nikolova
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Charts
Asked by
David
Top achievements
Rank 1
Answers by
Iliana Nikolova
Telerik team
David
Top achievements
Rank 1
Share this question
or