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

Additional Data in Lightswitch Silverlight SfChart

Thread ID:

Created:

Updated:

Platform:

Replies:

123227 Feb 27,2016 10:33 AM UTC Feb 29,2016 12:09 PM UTC LightSwitch Silverlight 1
loading
Tags: SfChart
Alexander M
Asked On February 27, 2016 10:33 AM UTC

Hi,
i want to add additional series in an existing SfChart in a Lightswitch Silverlight Client. I tried the following but it seems that there is an error.
Your help would be appreciated!

Regards,
Alex

partial void CurveSetListDetail_Created()
{
    var gdpChart = this.FindControl("CurveItemCollection1");
    gdpChart.ControlAvailable += gdpChart_ControlAvailable;
}
 
 
public class CurveItem
{
    public double Week { getset; }
    public double Low { getset; }
    public double High { getset; }
}
 
void gdpChart_ControlAvailable(object sender, ControlAvailableEventArgs e)
{
    var sfChart = (Syncfusion.UI.Xaml.Charts.SfChart)e.Control;
    if (sfChart != null && sfChart.Series != null)
    {
        RangeAreaSeries series1 = new RangeAreaSeries();
      
        var Curve = new ObservableCollection<CurveItem> {
            new CurveItem() { Week = 1, Low = 5, High = 10 },
            new CurveItem() { Week = 2, Low = 6, High = 11 },
            new CurveItem() { Week = 3, Low = 7, High = 12 },
            new CurveItem() { Week = 4, Low = 8, High = 13 },
            new CurveItem() { Week = 5, Low = 9, High = 14 },
            new CurveItem() { Week = 6, Low = 10, High = 15 },
            new CurveItem() { Week = 10, Low = 15, High = 20 }
        };
        
        series1.ItemsSource = Curve;
        series1.ShowTooltip = true;
        series1.Label = "Soll";
 
        sfChart.Series.Add(series1);
    }
}

Santhiya Arulsamy [Syncfusion]
Replied On February 29, 2016 12:09 PM UTC

Hi Alexander,

Thanks for contacting Syncfusion Support.

In your code sample, need to mention the property names which represents the axes values. Please find the following code sample for your reference.

[C#]

series.ItemsSource = Curve;

//Gets or sets a string that represents the X values of a series.

series.XBindingPath = "Week";

//Gets or sets the string that describes high value in Y-axis.

series.High = "High";

//Gets or sets the string that describes low value in Y-axis.

series.Low = "Low";

 


 Thanks,

 Santhiya A


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

;