Code: Select all
Dim Doc As Object
Dim Charts As Object
Dim Chart as Object
Dim Rect As New com.sun.star.awt.Rectangle
Dim RangeAddress(0) As New com.sun.star.table.CellRangeAddress
Doc = StarDesktop.CurrentComponent
Charts = Doc.Sheets(0).Charts
Rect.X = 8000
Rect.Y = 1000
Rect.Width = 10000
Rect.Height = 7000
RangeAddress(0).Sheet = 0
RangeAddress(0).StartColumn = 0
RangeAddress(0).StartRow = 0
RangeAddress(0).EndColumn = 8
RangeAddress(0).EndRow = 1
Charts.addNewByName("MyChart", Rect, RangeAddress(), True, True)
Chart = Charts.getByName("MyChart").embeddedObject
Chart.Diagram = Chart.createInstance("com.sun.star.chart.LineDiagram")
Chart.Diagram.Wall.FillColor = RGB(255,255,255)
Chart.Diagram.HasXAxisGrid = True
Chart.Diagram.HasYAxisGrid = True
Chart.Diagram.YAxis.Min = 0
Chart.Diagram.YAxis.Max = 100
Chart.Diagram.DataRowSource = com.sun.star.chart.ChartDataRowSource.ROWS
Chart.HasLegend = False
Chart.Diagram.HasXAxisTitle = True
Chart.diagram.XAxisTitle.String = "Tests"
Chart.Diagram.HasYAxisTitle = True
Chart.Diagram.YAxisTitle.String = "Result Value"
Chart.Title.String = "From Row 2"
Chart.ChartStatistics.MeanValue = True
Chart.ChartStatistics.ErrorBarStyle = 2
When formatted as
Code: Select all
com.sun.star.chart.ChartStatistics.MeanValue = True
From reading the API and looking at the other properties that I have used that works I thought that one of these two would work. How do you format this?
Thanks in advance.