We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Guidance on implementing a chart spanning time

Thread ID:

Created:

Updated:

Platform:

Replies:

145179 Jun 11,2019 12:18 PM UTC Jul 18,2019 05:21 AM UTC Xamarin.Forms 5
loading
Tags: SfChart
Anthony Ramirez
Asked On June 11, 2019 12:18 PM UTC

Hi! πŸ˜„

I have a need to visually display time spent performing different activities throughout the day. Each activity can be performed multiple times a day.

Attached is a screenshot of a similar chart.

I believe this would be a type of bar chart spanning 24 hours on it's X axis (ie the time of day). While the Y axis could be each day.

Any guidance on how this could be achieved is greatly appreciated πŸ™

Thanks!
Ant


Attachment: SleepingChart_38896816.zip

Bharathiraja K [Syncfusion]
Replied On June 12, 2019 11:38 AM UTC

Hi Ramirez, 
 
Greetings from Syncfusion. We have achieved your requirement with chart StripLine feature. The strip line is used to shade the different range of plot area to improve readability of chart. 
 
We have prepared the sample based on your application scenario and it can be downloaded from below link. 
 
In your case we have used DateTimeStripLine to separate the range based on the sleep mode by below. 
 
[C#]: 
DateTimeStripLine stripLine = new DateTimeStripLine() 
            { 
 
                Start = rate.Minimum, 
                WidthType = DateTimeComponent.Minute, 
                Width = rate.SleepRange, 
                FillColor = rate.SleepMode == SleepMode.Awake ? Color.Yellow : rate.SleepMode == SleepMode.DeepSleep ? Color.DarkBlue : rate.SleepMode == SleepMode.LightSleep ? Color.LightBlue : Color.HotPink, 
            }; 
 
            StripLineCollection.Add(stripLine); 
 
To know more about strip lines please refer the below link. 
Hope the above information will help you to achieve your requirement.  
 
Output: 
 
 
 
Regards, 
Bharathi. 


Anthony Ramirez
Replied On June 12, 2019 12:45 PM UTC

WOW! Thanks so much Bharathi πŸ™

That looks like it should be a perfect solution...I will give this a try and let you know. 

You guys ROCK! πŸ˜„πŸŽ‰

Bharathiraja K [Syncfusion]
Replied On June 12, 2019 12:48 PM UTC

Hi Ramirez,  
 
Thanks for your feedback. 
 
Regards, 
Bharathi. 


Anthony Ramirez
Replied On July 18, 2019 12:06 AM UTC

Hi Bharathi!

Just wanted to followup and let you know that this worked perfectly! πŸ˜„ SfChart has proven to be very flexible and feature rich πŸ’ͺ

Many thanks again for your super fast and helpful support πŸ™

All the best!
Ant

Padmini Ramamurthy [Syncfusion]
Replied On July 18, 2019 05:21 AM UTC

Hi Anthony, 
  
Thanks for your appreciation:) and please get back to us if you need any other assistance. 
  
Regards, 
Padmini 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon