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.
Unfortunately, activation email could not send to your email. Please try again.

How to highlight the horizontal base line (y=0) for a performance chart

Thread ID:

Created:

Updated:

Platform:

Replies:

115023 Dec 19,2013 12:49 AM Jan 16,2014 07:07 PM WPF 4
loading
Tags: Chart
Rodolphe Billottet
Asked On December 19, 2013 12:49 AM

Hi,

My application display real time performance chart.

Values upper the "y=0" line have outperformed, and of course underperformed  under the "y=0"  line.

So it is important to identify easily the base horizontal line (y=0).

As I have real time data, I need to have a dynamic range which increase all along the day to display all the data.

 

How can I highlight the y=0 line.  Ideal with a different color (lighter as my chart is dark)  or with a thicker line, but only that line. I want to keep the other line as it is.

I have attache a sample with an image of what I want.

 

Best regards,

Rodolphe

 



Highlighted_ZeroLine_57c38455.zip

Muneesh Kumar G [Syncfusion]
Replied On December 21, 2013 09:33 AM

Hi Rodolphe,

Thanks for using Syncfusion products.

We can achieve your requirement by setting StripLine as per the below code snippet.

Code Snippet [XAML]:

<syncfusion:ChartAxis.StripLines>

<syncfusion:ChartStripLine x:Name="strip1" Interior="DarkGray" Offset="60"  Width="1"/>

</syncfusion:ChartAxis.StripLines>

 

We have prepared a sample based on this and you can find the sample under the following location:

Please let us know if you have any queries.

Regards,

Muneesh Kumar G.

 



ZeroLine_d03c8ba3.zip

Rodolphe Billottet
Replied On January 8, 2014 03:57 AM

Hi Muneesh, happy new year

 

Thanks for your reply.

Having a constant Offset does not work in my case as my chart is real time and with an AutoSetRange.

But I have made it dynamic using RangeChanged event like below and it seems to work well.

 

void SecondaryAxis_RangeChanged(object sender, ChartAxisRangeArgs e)
{
            strip1.Offset = -e.NewValue.Start;           
}


Karthikeyan V [Syncfusion]
Replied On January 9, 2014 12:41 PM

Hi Rodolphe,

Thanks for the update.

We have analyzed your code and this is a correct way to change dynamic for offset about your requirement. Could you please let us know whether you require any other assistance from us?

Thanks,

Karthikeyan V.


Rodolphe Billottet
Replied On January 16, 2014 07:07 PM

Thanks.  It's alright now.


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.

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.

;