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. Image for the cookie policy date

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

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

4 Replies

MK Muneesh Kumar G Syncfusion Team December 21, 2013 02:33 PM UTC

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


RB Rodolphe Billottet January 8, 2014 08:57 AM UTC

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;           
}



KV Karthikeyan V Syncfusion Team January 9, 2014 05:41 PM UTC

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.



RB Rodolphe Billottet January 17, 2014 12:07 AM UTC

Thanks.  It's alright now.


Loader.
Live Chat Icon For mobile
Up arrow icon