Hello
I'm using KendoUI for JQuery and i'm having troubles to display two series of data (with some special requirements).
All my attempts to find the solution failed. Hope you can help me.
I have two series of objects (with date and value field - date is the category), which starts and ends at the same time, but one serie has only every other value. We measure one values in some interval (for example day) and other in double the interval (every two days).
For example
- Serie 1 has objects with dates (categories) for every day: 1.1.2020, 2.1.2020, 3.1.2020, 4.1.2020, 5.1.2020, 6.1.2020, .....
- Serie 2 has objects with dates (categories) for every other day: 1.1.2020, 3.1.2020, 5.1.2020, 7.1.2020, .....
What i need is line graph with possible gaps where days (categories) will be lined up.
Only thing i managed to do is this: dojo - attached image current.png
What i want is attached image expected.png
Every help is welcome.
Thanks
7 Answers, 1 is accepted
So i find the problem, but now i have another one.
The problem i had was because of Kendo version. When i tried to recreate the problem from scratch (with most recent version), hten it worked as expected.
Now the values are lined up how i want them, but shared hover tooltip is showing wrong values for the second serie (the every other day serie). It looks like it don't take into account category, but it takes the order of the values.
Example - data same as in first post:
- If i hover first value, then it shows categories: s1=1.1.2020, s2=1.1.2020 - this is correct
- If i hover second value, then it shows categories: s1=2.1.2020, s2=3.1.2020 - this is wrong. I expect the second category to be empty
- If i hover third value, then it shows categories: s1=3.1.2020, s2=5.1.2020 - this is wrong. I expect the second category to be 3.1.2020 (same as the first one)
Here is the dojo
Can someone helpo me with this?
Thanks
Hi,
I have updated the Chart configuration so the tooltip is showing the values as you describe. Below are the changes made to the configuration:
- removed the seriesDefaults.missingValues option
- included categoryAxis.majorTicks.skip option to the second axis
- included categoryAxis.labels.step option to the second axis
After the applied modifications the values shown in the tooltip were as you described. Check out the updated dojo below for reference:
https://dojo.telerik.com/uXEpuYow/6
Let me know how the updated sample works for you.
Regards,
Viktor Tachev
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.
Hi
Unfortunatelly i need the missingValues to be gap. This is my main problem here i think.
I was debugging the code and i found that the points are fetched by index of the category from primary plot.
So i think that what i want is not possible. I guess i need to work around that.
Nevertheless thants for the help. :)
Hi,
I tried the behavior with missingValues set to gap and it also works as described. Check out the updated dojo below and let me know how it works for you.
https://dojo.telerik.com/uXEpuYow/8
Regards,
Viktor Tachev
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.
Now the values from second serie are not connected with line.
There are only dots for the values which looks like the values are not continuous.
So this does not work for us unfortunatelly.
Hi,
In this case I suggest setting the value for missingValues to interpolate. With this option the values will be connected with a line. I modified the dojo and the chart seems to behave as described on my end:
https://dojo.telerik.com/uXEpuYow/9
Regards,
Viktor Tachev
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.