Page 1 of 1

[Issue] Formatting data series on Stock chart

PostPosted: Wed Jan 16, 2019 10:06 pm
by TropicWill
I have a stock chart (type 1) with two data series, each with high, low and average (shown as closing) daily values. I format the first series to colour [chart 2] and line thickness 0.1 cm; and the second series to colour [chart 4] and line thickness 0.1 cm. The chart looks just as I want it and prints correctly too. I save the spreadsheet but when I come back to it the next day to add another day's data, the format for the second series is changed to the default black with a 0 thickness line although the first series is unchanged. I have corrected the format a number of times, tried deleting and re-creating the chart but the behaviour persists. Is there anything else I can try?

Re: Formatting data series on Stock chart

PostPosted: Thu Jan 17, 2019 1:02 am
by robleyd
Are you saving the spreadsheet in the native .ods format, or in some foreign format such as .xls? If so, try using the native format.

Also, see [Tutorial] Differences between Writer and MS Word files

Re: Formatting data series on Stock chart

PostPosted: Thu Jan 17, 2019 2:26 am
by TropicWill
In .ods .

Re: Formatting data series on Stock chart

PostPosted: Fri Jan 18, 2019 7:41 pm
by MrProgrammer
Hi, and welcome to the forum. I haven't used that chart type myself, but I can attempt to reproduce the difficulty you've experienced. And maybe I'll have an idea for a solution.

Attach a document demonstrating the situation (remove confidential information then use Post Reply, not Quick Reply, and don't attach a picture instead of the document itself).

Re: Formatting data series on Stock chart

PostPosted: Fri Jan 18, 2019 9:48 pm
by TropicWill
Thank you for your offer. I attach part of the spreadsheet with the chart data and the chart itself (I've taken out the source for the data).
It is possible to amend the colour and thickness of the second set of data but the changes do not persist when the file is saved and re-opened.

Re: Formatting data series on Stock chart

PostPosted: Fri Jan 18, 2019 10:06 pm
by gerard24
I can reproduce with your file.

Seems to be an (unsolved) old bug : Bug 69698 - FILESAVE: Line width & color of Stock Chart not properly saved.
I don't know if there is a bug report also for OpenOffice....

Re: Formatting data series on Stock chart

PostPosted: Sat Jan 19, 2019 10:45 pm
by TropicWill
Interesting to learn that it is an old "bug".
I have had a look at the xml generated for the chart and it appears that there is a difference in treatment of stock charts in OpenOffice compared with the OASIS Standard OpenDocument 1.2 .
The Standard describes one stock value represented by up to 4 series (see the defined values for <chart:class> at 19.15.1).
OpenOffice extends this to a number of stock values, each represented by up to 4 series.
The Standard defines additional drawing elements with their own styles (<chart:stock-gain-marker>, <chart:stock-loss-marker> and <chart:stock-range-line>) which are children of <chart:plot-area> only, unlike the styles for other chart types which can also be children of <chart:series> within <chart:plot-area>. So the Standard does not provide a way to save more than one set of stock drawing styles, and OpenOffice uses default values for those not saved.
It seems to me that the OpenOffice implementation is more generally useful (my compliments to the design team) but I do not know how to suggest that the Standard be revisited. To allow the stock-drawing elements to be children of <chart:series> as well as <chart:plot-area> would seem to give scope for more than one stock without making existing files non-compliant.

Meantime I will continue to correct the colours each time I want that particular chart.