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

How to show stacked boolean series

6 Answers 54 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 14 Jul 2018, 07:19 AM

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

Sort by
0
Martin Ivanov
Telerik team
answered on 16 Jul 2018, 10:45 AM
Hello Robert,

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
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
Robert
Top achievements
Rank 1
answered on 24 Jul 2018, 08:03 AM

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

 

 

 

 

0
Martin Ivanov
Telerik team
answered on 25 Jul 2018, 01:02 PM
Hello 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
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
Robert
Top achievements
Rank 1
answered on 30 Jul 2018, 04:25 AM

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.

0
Robert
Top achievements
Rank 1
answered on 30 Jul 2018, 04:26 AM

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.

 

0
Martin Ivanov
Telerik team
answered on 30 Jul 2018, 09:04 AM
Hello Robert,

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
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
ChartView
Asked by
Robert
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Robert
Top achievements
Rank 1
Share this question
or