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 { get; set; }
public double Low { get; set; }
public double High { get; set; }
}
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);
}
}