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

Two category axis on Categorical chart (or workaround)

3 Answers 106 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Andrei
Top achievements
Rank 1
Andrei asked on 07 Aug 2012, 08:45 AM
Hello!

Story:
I want to compare two sets of data created for two periods of time (periods have same length).
As I find out in the kendo doc I can create two X axis for scatter chart. This is the thread that inspire me
The best result I could get is (you can try this here: http://jsfiddle.net/yXXCM/):
https://www.dropbox.com/s/2qbdhz8ek5keh0j/day-large-no-hours.PNG (is it possible to inline the images into the post?)
It is quite nice I would say. I is not perfect as labels are not match dots on the chart (that is because the label is not a day, it is a day + some hours: http://jsfiddle.net/RK26K/).
( You can notice labels' template for the second x axis (template: "#= kendo.toString(new Date(value + 1728000000), 'hh:mm dd MMM') #"). The "magic number" 1728000000 is a difference between periods calculated on the server. It is surely a hack, but it is the only way I found :) )

But unfortunately this chart looks really nasty for small period of time and for week/month charts:
https://www.dropbox.com/s/xqkcwr2l94tklr5/day-small.PNG
https://www.dropbox.com/s/qamzyx3pqsix4jv/week.PNG
https://www.dropbox.com/s/98lg7asn4b2tb3w/month.PNG
Just look on 3 junes, 3 July and no August (the third dot) of months chart.


Question:
Actually, the problem is that X/Y chart is not the one that can help me.
I definitely need a categorical chart. Category is a day or a week or a month in my case. But looks like categorical carts doesn't support two categories axis. Is that true?

Could anyone help me with that %&^$^& cart? :)
Probably there is a workaround for my problem.

Thanks,
Andrei.

3 Answers, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 09 Aug 2012, 01:18 PM
Hi,

There's no workaround for adding another category axis at the moment.

We're working on providing built-in support for multiple category axes. Stay tuned.

Regards,
Tsvetomir Tsonev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Andrei
Top achievements
Rank 1
answered on 09 Aug 2012, 02:02 PM
:(
Thanks for the answer Tsvetomir.


I am just wondering if I can show two charts one on top of the other and then hide everything but the X axis of the first chart :)
Something like "chart: {visible: false}, axis: {visible: true}"

Is it possible?
Thanks,
Andrei.

0
Andrei
Top achievements
Rank 1
answered on 09 Aug 2012, 02:51 PM
Found a workaround!!!!!!!!!!!!


Same idea as above but now I hide everything but the axis using "margin-top:-180px" on the first chart and "overflow: hidden" on the parent container.

It is really a hack but it works for me :)
Thanks guys for such a great chart library!

Regards,
Andrei.
Tags
Charts
Asked by
Andrei
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Andrei
Top achievements
Rank 1
Share this question
or