Hi,
Have an application to chart many time based series all of which have values of 0 and 1 only (On/OFF). Some series do not change over the period while other change a lot. Hence, using a single Y axis means they overlap and the chart is not readable. So ... the desire is to show a stacked (each offset) series on the one chart, the Y scale is kind of irrelevant as each are On/Off only.
So ... how do I make it clear when a series is at 0 (Off) or 1 (ON). It is hard to tell if a horizontal line is 0 or 1 when stacked. My first thought was to use shading. When at 0 a line would be seen and when at 1 a filled bar would be seen. But it looks no range series will work with a linear X axis.
BTW - I can do this spark lines but I'm unable to see how to do it for ChartView series.
Suggestions?
6 Answers, 1 is accepted
It is a bit vague for me how your data is structure and what visualization you want to display. If you show me drawing of the expected result I can think of possible approach for you.
In the meantime I have an idea for a bar visualization that you can try. Basically, you can show a BarSeries with positive values for the 1 values and negative values for the 0 values. Check the attached image. If this is what you are looking for I can point you to the approach that you can use to get this visualization.
Regards,
Martin Ivanov
Progress Telerik
Hello Martin,
Thank you for your response. That image is not what I'm after. I've attached an image of stacked charts created using Sparklines. I do not need the labels. The important thing here is the shading. Without the shading it would be hard to tell if a straight line was always 'ON' or always 'OFF'.
So I want a chart view with many ON/OFF series like these stacked on the one chart. Being on the one chart I can user cross hairs.
I hope that makes it clear.
Rob
Thank you for the new information. If I got this correctly you want to display bar-typed visualization where the colored area (the purple area) means 1, and the empty area (the white spaces) means 0. And also, you want to display several bars in a single chart. Please correct me if I am wrong.
In this case may I ask you what is the type of data that will be plotted on the horizontal axis? Is it going to be datetime or numeric? Also, it could be useful to send me a runnable code that shows how you implement this with the sparkline.
Regards,
Martin Ivanov
Progress Telerik
Hi,
The Y axis data is 1 or 0 values. 1 being ON and 0 being OFF.
The X axis is a double, being milliseconds since start. First data point is always 0ms (start). Each samples are typlically every 4ms but this does vary a little.
See if I can find a postable bit of code to post.
Martin said:
If I got this correctly you want to display bar-typed visualization where the colored area (the purple area) means 1, and the empty area (the white spaces) means 0. And also, you want to display several bars in a single chart. Please correct me if I am wrong.
Yes. You are correct.
Thank you for the additional information. Based on it I've prepared a small example which you can check. Can you try it on your side and let me know if it helps?
Regards,
Martin Ivanov
Progress Telerik