Charts modification through OOBasic or VB
-
- Posts: 5
- Joined: Thu Jun 08, 2023 11:15 pm
Charts modification through OOBasic or VB
I need to change the chart shape from bar to Cylinder is there any possible ways to do so
Abishek M
OpenOffice 4.1
Windows 10
OpenOffice 4.1
Windows 10
Re: Charts modification through OOBasic or VB
You can manipulate charts in OpenOffice using the Apache OpenOffice's BASIC or Visual Basic for Applications (VBA). However, it's worth noting that while Apache OpenOffice can handle VBA scripts, it primarily uses its own language called OpenOffice Basic (OOBasic).
For more detailed information and examples, I recommend checking out the Apache OpenOffice BASIC Programming Guide at https://wiki.openoffice.org/wiki/Docume ... ide/Charts. This guide provides comprehensive information about programming with OOBasic in OpenOffice.
For more detailed information and examples, I recommend checking out the Apache OpenOffice BASIC Programming Guide at https://wiki.openoffice.org/wiki/Docume ... ide/Charts. This guide provides comprehensive information about programming with OOBasic in OpenOffice.
OpenOffice 4.1.14
OS
OS
Re: Charts modification through OOBasic or VB
If the chart is index 0 in the drawpage of a Writer document - you change the diagram type and set it to 3d like this:
Diagram types here:
https://www.openoffice.org/api/docs/com ... le-ix.html
Code: Select all
oChartDoc = thiscomponent.drawpage.getbyindex(0).getEmbeddedObject()
oDiagram = oChartDoc.createInstance( "com.sun.star.chart.BarDiagram" )
odiagram.Dim3D = true
oChartDoc.setDiagram( oDiagram )
https://www.openoffice.org/api/docs/com ... le-ix.html
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
-
- Posts: 5
- Joined: Thu Jun 08, 2023 11:15 pm
Re: Charts modification through OOBasic or VB
I Need to get chart like this through VB
Abishek M
OpenOffice 4.1
Windows 10
OpenOffice 4.1
Windows 10
Re: Charts modification through OOBasic or VB
If you can create it in the normal way in a document. Use an object inspector like MRI to see what its properties are and change it using the code I posted.
https://github.com/hanya/MRI/releases
Cylinder isn't a type of diagram according to that link I posted - its not there - so use MRI to find out what it is to put instead of com.sun.star.chart.BarDiagram.
https://github.com/hanya/MRI/releases
Cylinder isn't a type of diagram according to that link I posted - its not there - so use MRI to find out what it is to put instead of com.sun.star.chart.BarDiagram.
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
Re: Charts modification through OOBasic or VB
Duplicate of viewtopic.php?t=110089
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)