Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.

Tue Sep 28, 2021 11:45 am

Hello,

I am trying to implement custom error bars with a range specified as follows. It does not seem to be working. Can you please confirm?

CellRange errorplusrange = xlWorkSheet.Range[listchartseries[i].PlusFrom.x, listchartseries[i].PlusFrom.y, listchartseries[i].PlusTo.x, listchartseries[i].PlusTo.y];
CellRange errorminusrange = xlWorkSheet.Range[listchartseries[i].MinusFrom.x, listchartseries[i].MinusFrom.y, listchartseries[i].MinusTo.x, listchartseries[i].MinusTo.y];
var eb = oSeries.ErrorBar(true,errorplusrange, errorminusrange );
oSeries.Format.MarkerStyle = ChartMarkerType.Square;
oSeries.Format.MarkerSize = 4;
oSeries.ErrorBarsY.HasCap = true;
eb.HasCap = true;

Standard Error Bars do work. Thanks.

veenakanade
 
Posts: 5
Joined: Tue Sep 14, 2021 12:27 pm

Wed Sep 29, 2021 6:39 am

Hello Veena,

Thanks for your inquiry.
Please refer to the following code snippet to add custom error bars.
Code: Select all
            var eb = oSeries.ErrorBar(true, ErrorBarIncludeType.Both);
            eb.Type = ErrorBarType.Custom;
            eb.PlusRange = errorplusrange;
            eb.MinusRange = errorminusrange;

Sincerely,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2766
Joined: Wed Jun 27, 2012 8:50 am

Thu Sep 30, 2021 9:41 am

Hello Veena,

Has this issue been solved? Any feedback will be appreciated.

Sincerely,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2766
Joined: Wed Jun 27, 2012 8:50 am

Wed Oct 06, 2021 1:47 pm

Yes, the above code helped. Thank you so much.

veenakanade
 
Posts: 5
Joined: Tue Sep 14, 2021 12:27 pm

Thu Oct 07, 2021 1:19 am

Hello,

Thanks for your feedback, and glad to hear that the issue has been solved.

If you encounter any problems when using the Spire.Xls, please feel free to contact us.

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Return to Spire.XLS