Sets the start of the X and Y axis in the X-Y charts to 0.

This commit is contained in:
依瑪貓 2016-09-09 10:27:16 +08:00
parent bb2945ba81
commit a3975c9267
2 changed files with 4 additions and 0 deletions

View File

@ -98,6 +98,8 @@ Sub subAddChart (oSheet As Object, oDataXRange As Object, oDataYRange As Object)
oDiagram.getXAxisTitle.setPropertyValue ("String", sTitle) oDiagram.getXAxisTitle.setPropertyValue ("String", sTitle)
sTitle = oDataYRange.getCellByPosition (0, 0).getString sTitle = oDataYRange.getCellByPosition (0, 0).getString
oDiagram.getYAxisTitle.setPropertyValue ("String", sTitle) oDiagram.getYAxisTitle.setPropertyValue ("String", sTitle)
oDiagram.getXAxis.setPropertyValue ("Min", 0)
oDiagram.getYAxis.setPropertyValue ("Min", 0)
oChartDoc.setDiagram (oDiagram) oChartDoc.setDiagram (oDiagram)
oProvider = oChartDoc.getDataProvider oProvider = oChartDoc.getDataProvider

View File

@ -98,6 +98,8 @@ Sub subAddChart (oSheet As Object, oDataXRange As Object, oDataYRange As Object)
oDiagram.getXAxisTitle.setPropertyValue ("String", sTitle) oDiagram.getXAxisTitle.setPropertyValue ("String", sTitle)
sTitle = oDataYRange.getCellByPosition (0, 0).getString sTitle = oDataYRange.getCellByPosition (0, 0).getString
oDiagram.getYAxisTitle.setPropertyValue ("String", sTitle) oDiagram.getYAxisTitle.setPropertyValue ("String", sTitle)
oDiagram.getXAxis.setPropertyValue ("Min", 0)
oDiagram.getYAxis.setPropertyValue ("Min", 0)
oChartDoc.setDiagram (oDiagram) oChartDoc.setDiagram (oDiagram)
oProvider = oChartDoc.getDataProvider oProvider = oChartDoc.getDataProvider