[Solved] Show the signature data in the chart

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
TGV
Posts: 2
Joined: Tue Nov 29, 2016 3:23 pm

[Solved] Show the signature data in the chart

Post by TGV »

Hi!
How make visible label data point in the bar chart at OO basic?
Last edited by Hagar Delest on Wed Nov 30, 2016 10:38 pm, edited 1 time in total.
Reason: tagged [Solved].
OpenOffice 3.1 on Windows Vista / NeoOffice 2.2.3 with MacOS 10.4 / OpenOffice 2.4 on Ubuntu 9.04
FJCC
Moderator
Posts: 9271
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Show the signature data in the chart

Post by FJCC »

I recorded this code with MRI

Code: Select all

  oSheets = ThisComponent.getSheets()
  oObj1 = oSheets.getByIndex(0)
  oCharts = oObj1.getCharts()
  
  oObj2 = oCharts.getByIndex(0)
  oEmbeddedObject = oObj2.getEmbeddedObject()
  oDiagram = oEmbeddedObject.getDiagram()
  
  oDiagram.DataCaption = 0
Setting DataCaption to 0 sets the data label to NONE, a DataCaption of 1 shows the value, and a DataCaption of 2 shows Percent. That is documented here.
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
TGV
Posts: 2
Joined: Tue Nov 29, 2016 3:23 pm

Re: Show the signature data in the chart

Post by TGV »

FJCC wrote:I recorded this code with MRI

Code: Select all

  oSheets = ThisComponent.getSheets()
  oObj1 = oSheets.getByIndex(0)
  oCharts = oObj1.getCharts()
  
  oObj2 = oCharts.getByIndex(0)
  oEmbeddedObject = oObj2.getEmbeddedObject()
  oDiagram = oEmbeddedObject.getDiagram()
  
  oDiagram.DataCaption = 0
Setting DataCaption to 0 sets the data label to NONE, a DataCaption of 1 shows the value, and a DataCaption of 2 shows Percent. That is documented here.
Thanks a lot! It is working!
OpenOffice 3.1 on Windows Vista / NeoOffice 2.2.3 with MacOS 10.4 / OpenOffice 2.4 on Ubuntu 9.04
Post Reply