# Revision history [back]

Hello,

Having worked a bit with charts in the past (Charts in Base forms and Inserting Chart using pyuno), about a year ago and in conjunction with the Python chart in Writer task, I worked some on charts in Writer in general.

I can start off be saying, in agreement with others, that there is no method I have seen to 'click, click, click, OK' or copy/paste anything to get what you are looking for.

I did dig out the tasks I had put together but remembered I had stopped on the documentation as it would easily have taken 20-50 pages just to put down some of my initial thoughts. I also stopped any further development since it appeared there is not a big calling for this.

The process in some ways is simple - place (or copy) a chart onto document. For the data, place an empty OLE spreadsheet. Create a link (Sheet->Link to External Data...) for updates. The somewhat difficult part is explaining the necessary macro code. It's not a lot but can vary depending upon what is being done.

Have pieced together a bit of what I had previously done and posted it below. This particular sample uses a listener (macro) to know when data has been changed in the Calc file. As was already mentioned, automatic updates are NOT the way to go. They will cause havoc with trying to work with the document. I have another method which does not use a listener but still requires macro coding. The code is mainly to move the data from the updated OLE object to the chart itself. The sample is a simple one.

Diagrams in the document are not identical to sample as the sample includes some minor enhancements.

Calc file ----------- DataForWriter.ods

The Write macro UpdateChart is where the data is moved and has a few comments as to where this is being done.

The other sample I had mentioned is more elaborate allowing different data to be charted based upon radio button selection. It also includes a data backup OLE object so the document can be given out without the chart and it will still operate with the saved data.

One final note, the OLE sheet object can be hidden behind the chart so it is out of view. It is currently not hidden for accessibility.

(Still have reservations about posting - has not been thoroughly tested recently)

Hello,

Having worked a bit with charts in the past (Charts in Base forms and Inserting Chart using pyuno), about a year ago and in conjunction with the Python chart in Writer task, I worked some on charts in Writer in general.

I can start off be saying, in agreement with others, that there is no method I have seen to 'click, click, click, OK' or copy/paste anything to get what you are looking for.

I did dig out the tasks I had put together but remembered I had stopped on the documentation as it would easily have taken 20-50 pages just to put down some of my initial thoughts. I also stopped any further development since it appeared there is not a big calling for this.

The process in some ways is simple - place (or copy) a chart onto document. For the data, place an empty OLE spreadsheet. Create a link (Sheet->Link to External Data...) for updates. The somewhat difficult part is explaining the necessary macro code. It's not a lot but can vary depending upon what is being done.

Have pieced together a bit of what I had previously done and posted it below. This particular sample uses a listener (macro) to know when data has been changed in the Calc file. As was already mentioned, automatic updates are NOT the way to go. They will cause havoc with trying to work with the document. I have another method which does not use a listener but still requires macro coding. The code is mainly to move the data from the updated OLE object to the chart itself. The sample is a simple one.

Diagrams in the document are not identical to sample as the sample includes some minor enhancements.

Calc file ----------- DataForWriter.ods

The Write macro UpdateChart is where the data is moved and has a few comments as to where this is being done.

The other sample I had mentioned is more elaborate allowing different data to be charted based upon radio button selection. It also includes a data backup OLE object so the document can be given out without the chart and it will still operate with the saved data.

One final note, the OLE sheet object can be hidden behind the chart so it is out of view. It is currently not hidden for accessibility.

(Still have reservations about posting - has not been thoroughly tested recently)

Edit:

Decided if going this far.... well here is the other sample: TestLinkedChartExtra.odt

This sample has two OLE sheets. You can see one near the chart top & the other at the bottom. Only the top sheet needs a link and it is not necessary to have this 'updated every x...'.

Hello,

Having worked a bit with charts in the past (Charts in Base forms and Inserting Chart using pyuno), about a year ago and in conjunction with the Python chart in Writer task, I worked some on charts in Writer in general.

I can start off be saying, in agreement with others, that there is no method I have seen to 'click, click, click, OK' or copy/paste anything to get what you are looking for.

I did dig out the tasks I had put together but remembered I had stopped on the documentation as it would easily have taken 20-50 pages just to put down some of my initial thoughts. I also stopped any further development since it appeared there is not a big calling for this.

The process in some ways is simple - place (or copy) a chart onto document. For the data, place an empty OLE spreadsheet. Create a link (Sheet->Link to External Data...) for updates. The somewhat difficult part is explaining the necessary macro code. It's not a lot but can vary depending upon what is being done.

Have pieced together a bit of what I had previously done and posted it below. This particular sample uses a listener (macro) to know when data has been changed in the Calc file. As was already mentioned, automatic updates are NOT the way to go. They will cause havoc with trying to work with the document. I have another method which does not use a listener but still requires macro coding. The code is mainly to move the data from the updated OLE object to the chart itself. The sample is a simple one.

Diagrams in the document are not identical to sample as the sample includes some minor enhancements.

Calc file ----------- DataForWriter.ods

The Write macro UpdateChart is where the data is moved and has a few comments as to where this is being done.

The other sample I had mentioned is more elaborate allowing different data to be charted based upon radio button selection. It also includes a data backup OLE object so the document can be given out without the chart and it will still operate with the saved data.

One final note, the OLE sheet object can be hidden behind the chart so it is out of view. It is currently not hidden for accessibility.

(Still have reservations about posting - has not been thoroughly tested recently)

Edit:

Decided if going this far.... well here is the other sample: TestLinkedChartExtra.odt

This sample has two OLE sheets. You can see one near the chart top & the other at the bottom. Only the top sheet needs a link and it is not necessary to have this 'updated every x...'.

x...'. Use the same sample Calc file.