Programmatically toggle the visibility of the series in graph

Hi,

I have a graph with 6 series in it. Loaded/populated at page load.

I know that we can set the toggle of the series by setting `ToggleSeriesVisibility = true` on ChartLegend and user can tap on the legend to toggle the visibility of the series.

Now the new requirement came in that:

1. When the page loads, display only one series, hide other 5 series but still show all the 6 legends
2. User will tap on the legends to show the other series on the graph.

How can i achieve this? i want to hide the series while still showing the legends at page load.

Thanks

7 Replies

DV Divya Venkatesan Syncfusion Team February 28, 2018 03:29 PM UTC

Hi Adil, 
 
Thanks for using Syncfusion products., 
 
You can hide the series at load time by setting IsVisible property of ChartSeries as false as shown in the below code snippet. 
 
Code snippet: 
 
Xaml: 
 
<chart:LineSeries IsVisible="False" /> 
 
C#: 
 
lineSeries.IsVisible = false; 
 
Please let us know if you need any further assistance. 
 
Regards, 
Divya Venkatesan 
 



AH ahraza March 5, 2018 08:22 AM UTC

Thanks Divya


DV Divya Venkatesan Syncfusion Team March 5, 2018 08:58 AM UTC

Hi Adil,

You are welcome. Please get back to us if you need any other assistance.

Regards,
Divya Venkatesan



AH ahraza March 5, 2018 11:22 AM UTC

I have posted another question, which hasn't been answered yet, can you take a look it please?

https://www.syncfusion.com/forums/136227/is-it-possible-to-achieve-this-ui-requirement-using-sfcalendar-control


MS Mugundhan Saravanan Syncfusion Team March 6, 2018 11:36 AM UTC

Hi Adil,

Sorry for the inconvenience.

We have provided the solution for the query in the forum 136227. Please follow the same for further queries.
Please let us know us know if you need any further assistance.

Regards,
Mugundhan S.


AH ahraza March 6, 2018 01:26 PM UTC

Thank you Mugundhan, i'll take a look at it.


MS Mugundhan Saravanan Syncfusion Team March 7, 2018 10:40 AM UTC

 Hi Adil,

Thanks for the update.

Please let us know if you need any further assistance.

Regards,
Mugundhan S.


Loader.
Up arrow icon