我想要改變數據點的大小,這些數據點的製作如下所示。LibreOffice Calc XYDiagram in BASIC:設置數據點的大小
Dim Rect As New com.sun.star.awt.Rectangle
Dim RangeAddress(0) As New com.sun.star.table.CellRangeAddress
Rect.X = 0
Rect.Y = 6666 * (x/3)
Rect.Width = 16500
Rect.Height = 6666
RangeAddress(0).Sheet = 0
RangeAddress(0).StartColumn = x+1
RangeAddress(0).StartRow = 1
RangeAddress(0).EndColumn = x+2
RangeAddress(0).EndRow = y-1
ThisComponent.Sheets(0).Charts.addNewByName(mode, Rect, RangeAddress(), False, False)
ThisComponent.Sheets(0).Charts.getByName(mode).embeddedObject.Diagram _ = ThisComponent.Sheets(0).Charts.getByName(mode).embeddedObject.createInstance("com.sun.star.chart.XYDiagram")
ThisComponent.Sheets(0).Charts.getByName(mode).embeddedObject.Diagram.HasXAxisTitle = True
ThisComponent.Sheets(0).Charts.getByName(mode).embeddedObject.Diagram.XAxisTitle.String ="Ratio"
ThisComponent.Sheets(0).Charts.getByName(mode).embeddedObject.Diagram.HasYAxisTitle = True
ThisComponent.Sheets(0).Charts.getByName(mode).embeddedObject.Diagram.YAxisTitle.String ="Cost"
ThisComponent.Sheets(0).Charts.getByName(mode).embeddedObject.Diagram.getDataRowProperties(1).lines = false
ThisComponent.Sheets(0).Charts.getByName(mode).embeddedObject.HasLegend = False
ThisComponent.Sheets(0).Charts.getByName(mode).embeddedObject.HasMainTitle = True
ThisComponent.Sheets(0).Charts.getByName(mode).embeddedObject.Title.String = mode
此代碼將正確生成一個XY散點圖,但積分太大。鑑於數據的性質,我正在繪製圖形,我希望代碼能夠自動縮小點,而不是改變生成的每個圖形的大小。有誰知道如何編輯數據點大小?我搜索了幾天,但我找不到它,似乎沒有多少人使用libreoffice calc basic。