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.
Syncfusion Feedback

Programatically Change Line Chart Series Interior Brush

Thread ID:

Created:

Updated:

Platform:

Replies:

123369 Mar 10,2016 09:53 PM UTC Mar 11,2016 09:42 AM UTC UWP 1
loading
Tags: SfChart
Vincent Fusca
Asked On March 10, 2016 09:53 PM UTC

'd like to display multiple series on the same chart.  When the user taps the chart, I'd like to highlight one or two series, and grey out the rest.  The user could then compare the series of interest to the trends of other series.

Something to the effect of:

        private void SfChart_Tapped(object sender, TappedRoutedEventArgs e)
        {
            if (series1 isActive) 
                { 
                   //Highlights two series
                     series1.Interior.Brush.Color  = Colors.Gray;
                     series2.Interior.Brush.Color  = Colors.Red;
                     series3.Interior.Brush.Color  = Colors.Red;
                {
   
             else if (series2 isActive)
                {
                     series2.Interior.Brush.Color  = Colors.Gray;
                     series3.Interior.Brush.Color  = Colors.Gray;;
                     series4.Interior.Brush.Color  = Colors.Red;
                {
             else
                {
                     series4.Interior.Brush.Color  = Colors.Gray;
                     series1.Interior.Brush.Color  = Colors.Red;
                {
        }

Not sure if this is a function built into some other aspect of syncfusion charts or what the appropriate properties are for the chart objects to achieve this behavior.


Sumathi Jayaraj [Syncfusion]
Replied On March 11, 2016 09:42 AM UTC

Hi Vincent,

Thanks for contacting Syncfusion Support.

SfChart allows user to highlight the series using ChartSelectionBehavior. We are able to highlight the series, while moving the mouse or mouse clicked (tap, in case of touch device) on the series. Multiple selection supports to highlight one or more series in chart. 

We have prepared a sample and it can be downloaded from the following location. 

Sample: SelectionSample

Please refer to the below link for more information.
Documentation Link: http://help.syncfusion.com/uwp/sfchart/interactive-features#selection 

Regards,
Sumathi J

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.

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

;