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
close icon

How to draw SFLineSeries on SFStackingAreaSeries???

Hi..

I have drawn the Line series on Stacking area series as attached image..

But i want the Stacked area series to cover complete chart..

Is anyone knows how to do the same??

Thanx in Adv.

1 Reply

KV Karthikeyan V Syncfusion Team March 17, 2015 10:24 AM UTC

Hi Chinmay,

Thank you for using Syncfusion products.

We have analyzed your requirement and it can be achieved by changing the series rendering order. Please find the code snippet in below.

Code snippet [Objective C]:

-(SFSeries *) chart:(SFChart *)chart seriesAtIndex:(NSInteger)index

{

if (index == 0) {

SFStackingAreaSeries * series = [[SFStackingAreaSeries alloc]init];

series.label = @"Precipitation";

return series;

}

else if (index == 1){

SFStackingAreaSeries * series = [[SFStackingAreaSeries alloc]init];

series.label = @"High";

return series;

else{

SFLineSeries * series = [[SFLineSeries alloc]init];

series.label = @"Low";

return series;

}

}

Code snippet [Swift]:

func chart(chart: SFChart!, seriesAtIndex index: Int) -> SFSeries! {

if(index == 0){

var series : SFStackingAreaSeries = SFStackingAreaSeries();

series.label = "Precipitation";

return series;

}

else if(index == 1){

var series : SFStackingAreaSeries = SFStackingAreaSeries();

series.label = "High";

return series;

}

else{

var series : SFLineSeries = SFLineSeries();

series.label= "Low";

return series;

}

}

We have prepared a sample that tried to meet your requirement. Please download the sample from the following location.

Sample : http://www.syncfusion.com/downloads/support/forum/118521/SeriesOrderingSample-334258389.zip

Note: We couldn’t find any attachment in your previous update, if we have misunderstood your requirement. Please provide us more information about your requirement. This would help us to proceed further

Please let us know, if the sample helps.

Thanks,

Karthikeyan V.



Loader.
Live Chat Icon For mobile
Up arrow icon