Pretty much the title. Using LibreOffice Calc 7.5.5.2 on Linux. I’ve created a bar chart in a spreadsheet, and I would like to add error bars using data from the sheet. At the moment this is basically what I’ve got:
' Create charts
Charts = Doc.Sheets(4+I).Charts
Rect1.X = 0
Rect1.Y = 9931
Rect1.Width = 10160
Rect1.Height = 10160
RangeAddress1(0).Sheet = 4+I
RangeAddress1(0).StartColumn = 0
RangeAddress1(0).StartRow = 39
RangeAddress1(0).EndColumn = 1
RangeAddress1(0).EndRow = 41
Charts.addNewByName(Cell.String & "_1", Rect1, RangeAddress1(), False, True)
Chart1 = Charts.getByName(Cell.String & "_1").EmbeddedObject
Chart1.HasMainTitle = True
Chart1.Title.String = "Control vs ARAC"
Chart1.HasLegend = False
Chart1.Diagram.HasYAxisTitle = True
Chart1.Diagram.YAxisTitle.String = "Fold Difference"
' Add in error bars; HOW TF DOES THIS WORK
Chart1.setPropertyValue(ErrorBarRangePositive, "D40:D42")
Chart1.setPropertyValue(ErrorBarRangeNegative, "C40:C42")
Chart1.setPropertyValue(ErrorBarStyle, com.sun.star.chart.ErrorBarStyle.FROM_DATA)
The last three lines are the part where I’m running into trouble. It’s not causing any errors, but there is no sign of any effect whatsoever when I add/remove those lines. Clearly I’m missing something here, but I’ve been staring at this for 2 days and I’m totally stumped. If anyone has any insights into what I’m doing wrong, it would be greatly appreciated