Bug 62925 - FORMATTING: enhancement: implement "chart styles"
Summary: FORMATTING: enhancement: implement "chart styles"
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: high enhancement
Assignee: Not Assigned
URL: https://wiki.documentfoundation.org/C...
Whiteboard: BSA VOTE
Keywords:
: 40813 46173 62540 74408 90490 90936 96542 118832 (view as bug list)
Depends on:
Blocks: Calc-Styles Chart-Enhancements
  Show dependency treegraph
 
Reported: 2013-03-30 05:46 UTC by bugquestcontri
Modified: 2023-09-06 19:20 UTC (History)
26 users (show)

See Also:
Crash report or crash signature:


Attachments
proposed new chart style : StairsToTotal (17.49 KB, image/png)
2013-08-10 06:07 UTC, bugquestcontri
Details
Mockup for chart style (66.70 KB, image/png)
2018-04-29 07:48 UTC, Heiko Tietze
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bugquestcontri 2013-03-30 05:46:54 UTC
Problem description: 
When a new chart needs to be created it always starts up with the default and hast to tune to the personal or company format needs. This takes always a lot of time, thus a loss on productivity.

Solution;
Add "Chart-Styles" to Calc, which allow creating and saving formats for several chart styles. In one chart-style all possible features of a chart should be customizable.


I can be contacted for discussions and tests
Operating System: Windows XP
Version: 3.6.5.2 release
Comment 1 A (Andy) 2013-03-30 07:39:08 UTC
I agree, this would be a very good idea.  More standard chart types would also be very good like bar of pie chart, etc.
Comment 2 bugquestcontri 2013-03-30 09:33:35 UTC
@A - Thanks for looking into this matter. Feel free to add also more standard charts. This makes customization already a bit easier. However, with the styles, LibO would beat MSO with a great functionality. I just keep fingers crossed for dev manpower.
Comment 3 Gerry 2013-04-27 22:21:17 UTC
Bug 62540 describes something very similar. IMHO it is not exactly an exact duplicate, but it might make sense to join the two bug entries. 

I put Francisco of that bug entry to this one here in CC.


There is another bug which is quite similar to this one, but also has a slight different twist: Bug 39097
Comment 4 Francisco 2013-04-27 23:43:42 UTC
(In reply to comment #3)
> Bug 62540 describes something very similar. IMHO it is not exactly an exact
> duplicate, but it might make sense to join the two bug entries. 
> 
> I put Francisco of that bug entry to this one here in CC.
> 
> 
> There is another bug which is quite similar to this one, but also has a
> slight different twist: Bug 39097

Hi Gerry, thanks for let me join this talk.

Well, in some way, it _is_ a duplicate of what I wanted to report in first place: it is a really slow task to edit format charts in Calc. What could we do? 
· Add chart styles
· Add other customization options for the defaults presets of charts (not only colors)

Then I realized that the problem was a pretty bigger, since not even textboxes drawn inside charts are editable through styles. Then I stated that charts need some improvement in general, though the implementation of styles is a real step fordward in this goal.
Comment 5 Francisco 2013-06-08 18:43:18 UTC
I was vivisecting an ODS file, trying to see how does LibO handle styles for charts, since it's supposed that using ODF, you're using styles even if don't want.
Charts content, as for any object are stored inside dirs "Object #", where there are 3 files: meta.xml, content.xml and styles.xml.

Interestingly, the file styles.xml doesn't store any style, but all styles defined for charts are stored in content.xml around "<office:automatic-styles>"

It seems to be that this feature request will be more difficult to solve
Comment 6 bugquestcontri 2013-06-09 12:48:41 UTC
@Francisco - Thanks for looking into this matter and for your comments. Now I - and I assume that there are many others waiting for this enhancement - can only wait to see if there is a great volunteer who will tackle the topic.

This feature would - to the best of my knowledge - put Impress on the same and maybe even a bit better level than PowerPoint. I remember that there are User styles but this was not very satisfactory; at least for me.
Comment 7 bugquestcontri 2013-08-10 06:07:00 UTC
Created attachment 83915 [details]
proposed new chart style : StairsToTotal

As there are also new chart styles considered I would like to propose the style "Stairs to Total". A style I am using very often instead of stacked column style to emphasis the gain for each step separately.
This is also very often to be seen in chart created by consulting companies.

Current creation requires additional data preparation and a lot of formating work; thus very time consuming.
Comment 8 bugquestcontri 2013-08-10 06:11:28 UTC
Additional to comment 7

I feel that this is a great feature above MS Excel.

In Excel 2003 this style was not available; I missed it a lot. Could a newer Excel version please be checked by someone who also has access to MS Excel >=2007?
Comment 9 Robert Pogson 2013-09-09 12:07:11 UTC
I add my support for this request. I blog and do technical work using a lot of charts. For blogging, I create the charts and then embed them in my website as a fixed number of pixels. On a high-resolution screen, the image is often barely readable using the defaults for titles, axes-labels, legends and data-labels, so I have to adjust fonts repeatedly. It takes more time to manually format the chart than it does to gather the data for the spreadsheet and upload the image to the server. It is a major hit and I have to remember the font-sizes for several categories of items and font-faces, or articles with multiple charts look amateurish. It could be just one click to avoid a lot of work and errors.

The newly added ability to export as SVG helps in quality but I still have to work with font-size on one end and pixels on the other...

This is also an accessibility issue in that old eyes like mine need the larger fonts. It's not only about convenience/productivity.

The whole idea of using XML in the file-format is to be able to separate style from content. Not using that philosophy for charts and hard-coding these in the software is something that should be fixed. Now that SVG is well supported, this would make LibreOffice nearly perfect for what I do. If we cannot do this with styling, please let us save and insert from templates. Saving the chart styling in a whole-document template doesn't work because the data-ranges then have to be edited and there might be a dozen of them.
Comment 10 Francisco 2013-09-10 00:02:46 UTC
Could it be a good idea if anybody creates an entry in "Vote vor enhancement" page?
Comment 11 ign_christian 2013-10-03 03:51:35 UTC
If I understand clearly, this report is the same / duplicate to Bug 62540 (which is reported earlier). Shouldn't we merge these to only 1 report?
Comment 12 Stéphane Guillou (stragu) 2013-11-01 07:46:48 UTC
*** Bug 62540 has been marked as a duplicate of this bug. ***
Comment 13 Stéphane Guillou (stragu) 2013-11-01 07:57:04 UTC
As Francisco suggested, I added this bug to the Vote for Enhancement page on the wiki: https://wiki.documentfoundation.org/Vote_for_Enhancement#Bug_62925_-_FORMATTING:_enhancement:_please_add_.22chart_styles.22_to_the_styles_of_Calc

Feel free to add your vote.
Comment 14 Cor Nouws 2013-11-01 08:32:16 UTC
(In reply to comment #0)
> When a new chart needs to be created it always starts up with the default
> and hast to tune to the personal or company format needs. 

You can copyk&paste an existing one often and then drag a new data-range to it.

Nevertheless: a very useful enhancement request!

Cheers,
Cor
Comment 15 Francisco 2013-11-23 14:24:22 UTC
(In reply to comment #14)
> (In reply to comment #0)
> > When a new chart needs to be created it always starts up with the default
> > and hast to tune to the personal or company format needs. 
> 
> You can copyk&paste an existing one often and then drag a new data-range to
> it.
> 
> Nevertheless: a very useful enhancement request!
> 
> Cheers,
> Cor

That's not so easy: you must have already in the same spreadsheet a chart formatted in the way you want. You cannot copy a formatted chart from another file (though maybe you can insert that one sheet).

But yes, that's is what we do now ;-)
Comment 16 bugquestcontri 2013-11-24 12:26:25 UTC
As I needed create a larger number of charts in a company format, I looked here to see how things are developing. 

Thanks to all who worked and work on this enhancement. I can offer testing if needed.
Comment 17 Cor Nouws 2014-02-03 11:26:37 UTC
*** Bug 74408 has been marked as a duplicate of this bug. ***
Comment 18 bugquestcontri 2014-02-06 14:15:31 UTC
I would like to vote for this and other enhancement request I found here
https://wiki.documentfoundation.org/Vote_for_Enhancement#fdo.2336815_-_Advanced_printing_capabilities_of_comments

However, also reading the explanation "Please add a short comment (1 line) starting with # at the end of the list you want to support and sign with -- ~~~~ . Good arguments have more influence than numerous votes." I cannot figure what I need to do. 

Can I please have some voting-for-dummies advice?
Comment 19 Francisco 2014-02-06 14:51:06 UTC
(In reply to comment #18)
> I would like to vote for this and other enhancement request I found here
> https://wiki.documentfoundation.org/Vote_for_Enhancement#fdo.2336815_-
> _Advanced_printing_capabilities_of_comments
> 
> However, also reading the explanation "Please add a short comment (1 line)
> starting with # at the end of the list you want to support and sign with --
> ~~~~ . Good arguments have more influence than numerous votes." I cannot
> figure what I need to do. 
> 
> Can I please have some voting-for-dummies advice?

# Be sincere

# Be concise but clear, not everyone could be experiencing your situation, nor have the time to read a testament

# Don't be selfish, remember, you may need a feature, while other people would prefer another.

# Don't use adjectives to exaggerate your request

# Etc.?
Comment 20 Gerry 2014-03-24 17:00:33 UTC
I created a page for this bug "Chart Styles" on the Documentfoundation wiki in order to collect ideas and updates with regards to this bug:
https://wiki.documentfoundation.org/Chart_styles

Furthermore, there is some important movement: German and Swiss cities and institutions fund dvelopment on this feature and they just opened a tender:
http://www.osb-alliance.de/working-groups/projekte/wichtige-funktionalitaeten-bei-loaoo/ (in German language)
Comment 21 Stéphane Guillou (stragu) 2014-03-25 01:49:51 UTC
There is also a pdf in English that details the enhancements: http://www.osb-alliance.de/fileadmin/Working_Groups/OfficeInteroperability/Project2/SpecificationMajorFeatureImprovements_final.pdf
Comment 22 bugquestcontri 2014-06-20 13:12:16 UTC
This is excellent news! 
I hope we get this feature soon. 
I willl keep fingers crossed that budget will be provided.
Comment 23 Jean-Baptiste Faure 2014-07-22 19:02:27 UTC
*** Bug 46173 has been marked as a duplicate of this bug. ***
Comment 24 raal 2015-04-29 17:10:29 UTC
*** Bug 90936 has been marked as a duplicate of this bug. ***
Comment 25 Robert Orzanna 2015-04-29 19:20:37 UTC
My request was referenced to be fitting to the discussion here. I also very much like the request for pre-defined chart styles. I would ask you to consider a pre-defined pattern style that can be applied to an entire chart so that colourblind people have it easier to read the chart. 

Example of a pattern I am referring to: http://support.sas.com/kb/45/addl/fusion_45663_1_fillpatterns1.png
Comment 26 Buovjaga 2017-06-10 18:24:02 UTC
*** Bug 40813 has been marked as a duplicate of this bug. ***
Comment 27 Heiko Tietze 2018-04-29 07:48:12 UTC
Created attachment 141754 [details]
Mockup for chart style

We have access to properties from the sidebar. So option a) could be to place a control for style selection on top likewise it's done for text styles. Drawback is that many properties are shown dependent on context, e.g. Line Style of grid lines, Line Style of bars and Line Style of the background. So what we can do here, is to clean up and show all together and rename and combine it properly.

Option b) is to introduce a second deck for chart styles similar to the styles in Writer. Wouldn't be as prominent as it should be though the adoption to chart styles in Writer might be easier. Issue is that still not all chart properties are active in edit mode: for example the chart background color can be set to none and the overall chart property for area to something else (becomes active when not in edit mode).

For simplicity I would suggest to go with option b) and have a new sidebar deck for chart styles including Fill Format Mode and New Style as known from Writer ignoring the non-edit-mode properties.
To apply the style on creation we could introduce a fifth step in the chart wizard where the user can select the style.

Supposed workflow for bug 90490 is to create a new style based on the current selection and modify it. Since we do not have a all-in-one edit dialog yet as requested in bug 90687 this wont work (for now).
Comment 28 Gerry 2018-04-29 11:31:04 UTC
It's great to see some movement on the development of chart styles. Thanks in advance.

If I look at different chart style implementations, e.g. Stata and Excel, chart styles can determine a number of different elements:

* the color scheme (of results and text) or hatching scheme (of results)
* the existence, color and thickness of borders (e.g. border lines around bars in a bar chart)
* the background color
* the existence borders around the chart area and legend
* the existence, position and text size/font of a legend
* the existence, position and text size/font of a title and or subtitle
* the existence, position and text size/font of notes below a chart

Of course, one probably cannot implement all these elements at the beginning, but please keep in mind that chart styles can comprise a number of different elements.

For more information see also: https://wiki.documentfoundation.org/Chart_styles
Comment 29 Cor Nouws 2018-04-29 12:45:39 UTC
Hi Heiko,

(In reply to Heiko Tietze from comment #27)

> We have access to properties from the sidebar. So option a) could be to
> place a control for style selection on top likewise it's done for text

You mean a seventh option top left in the tool bar of Styles and Formatting?

> styles. Drawback is that many properties are shown dependent on context,
> ...

But that does not prevent styles to be listed and changed with a properties dialog?

Possibly I misunderstand you :)
Comment 30 Heiko Tietze 2018-04-29 15:40:41 UTC
(In reply to Gerry from comment #28)
> Of course, one probably cannot implement all these elements at the
> beginning, but please keep in mind that chart styles can comprise a number
> of different elements.

We have to follow the ODF specs that defines what styles are. There is a volunteer interested in doing the work - that's why we have progress here - and he wanted to implement styles and not just a color swatch, for example.

(In reply to Cor Nouws from comment #29)
> You mean a seventh option top left in the tool bar of Styles and Formatting?

The styles "switcher" is the topmost control at the properties deck in Writer, affecting all the properties below. Don't get the "seventh" option thing.
 
> But that does not prevent styles to be listed and changed with a properties
> dialog?

Don't talk about a dialog at this moment. Imagine a style "Yellow" that changes the background color of the chart but you have the series selected. This unclear situation bothers me, and made me prefer the extra deck.
Comment 31 Cor Nouws 2018-04-29 18:21:54 UTC
(In reply to Heiko Tietze from comment #30)

> The styles "switcher" is the topmost control at the properties deck in
> Writer, affecting all the properties below. Don't get the "seventh" option
> thing.

The panel Styles and Formatting now has six buttons top left.
But I see you mean the panel Properties. Sorry.
Why that one, and not Styles and Formatting?
The latter also exists in Calc and Impress/Draw.
In the properties panel, the properties shown are the ones of the place where the cursor is. That can the the styles properties, but may also be direct formatting. So the properties controls do not directly change a style.

> Don't talk about a dialog at this moment. Imagine a style "Yellow" that
> changes the background color of the chart but you have the series selected.
> This unclear situation bothers me, and made me prefer the extra deck.

I expect a chart style to be a set of properties - as written in comment #28.
So style "yellow" should have more impact than only the background.
Comment 32 Pedro 2018-04-29 19:17:41 UTC
Looks nice. I would like just to suggest that Data Range and Data series could be merged in the same tab.
Comment 33 Heiko Tietze 2018-06-27 08:15:46 UTC
Input from UX has been given, now waiting for devs
Comment 34 V Stuart Foote 2018-07-18 22:40:18 UTC
*** Bug 118832 has been marked as a duplicate of this bug. ***
Comment 35 Gagandeep Singh 2019-04-05 11:58:36 UTC
Hi,

I want to work on this feature as GSOC project and for the same I have been talking to Markus Mohrhard, he has given me pointers to the logical handling of the styles in chart2 module.

For the GUI part after reading the comments I see that the sidebar implementation is preferred of chart styles. Can I get some documentation regarding how sidebar in libreoffice works.

I see sidebar code in sfx2 and svx, though a bit more detail would help me with my proposal in understanding the capabilities of sidebar for this task.


Thanks in Advance !!
Comment 36 Heiko Tietze 2019-04-06 06:08:27 UTC
(In reply to Gagandeep Singh from comment #35)
> I want to work on this feature as GSOC project...

That's great to hear. Sorry that I cannot help with the code pointer (adding the all-knowing Samuel for that) for sidebar but please consider this too [1], although not _style_ related in narrow sense. 

[1] https://design.blog.documentfoundation.org/2015/04/16/insertchart/
Comment 37 Gagandeep Singh 2019-04-09 01:23:32 UTC
(In reply to Heiko Tietze from comment #36)
> (In reply to Gagandeep Singh from comment #35)
> > I want to work on this feature as GSOC project...
> 
> That's great to hear. Sorry that I cannot help with the code pointer (adding
> the all-knowing Samuel for that) for sidebar but please consider this too
> [1], although not _style_ related in narrow sense. 
> 
> [1] https://design.blog.documentfoundation.org/2015/04/16/insertchart/

Hi,

I have been discussing with Markus about this, and we have come to a conclusion that the logical level handling of the chart style is most important currently, and I myself have realized the scope of that part of the project added with  including import/export of styles from files. Thus, I will probably be implementing a very limited ui in sidebar deck offering only a selection list for styles to be chosen from.

Sorry, but I asked this question only through my ignorance. Still looking forward to an exciting summer working on the chart styles :)
Comment 38 Heiko Tietze 2019-04-09 05:48:55 UTC
(In reply to Gagandeep Singh from comment #37)
> I have been discussing with Markus about this, and we have come to a
> ...the logical level handling of the chart style is most important
> ...
> I will probably be implementing a very limited ui in sidebar deck

Excellent, happy to review all aspects from UX POV. The actual UI is a "piece of cake", much more important is to have a clean implementation and scope. Eg. styles should be created, modified, deleted but also saved, loaded and ideally shared per extension. And before this step you have to solve all the internal handling, which might be good enough for a nice summer.
Comment 39 Zak McKracken 2020-06-02 11:27:28 UTC
I'm quite interested in having styles for charts, as that could make LO a lot more efficient to work with. I'm usually quite busy generating plots, rather than discussing software, but I'm finding myself with a few weeks' time, so I'd be interested in helping out if/where I can.

I've not programmed anything in C++ (but am reasonably seasoned in Python, including GUI programming, if that helps at all), and I've been using all sorts of graphing software in the past, from Excel annd openOffice 1.0 through Libreoffice 6, Paraview, Fieldview, Tecplot, Matplotlib, Gnuplot ... so I'd like to think I have some capacity to compare their implementations of formatting templates.

I'm not sure where the process is at the moment, and if the below helps (if not, feel free to ignore), but I thought it might be useful to give some more examples of how this works in other software, both as an inspiration and maybe also as an indication of how useful a feature it can be.

Tecplot is one of the biggest players in the scientific plotting market, so I think taking a look and learning from them is reasonable. And actually, I think it's fairly straightforward to improve on their approach, although it's reasonably good, in that it stores plots as "layout" files, which contain the formatting separate from the data (and can even have it in separate files), and allows replacing a layout but keeping the data, or replacing data and keeping the layout. Layouts are specified in some kind of scripting language (the same it used for user scripts), which can include formatting of non-existent elements. Although this is (sadly!) not officially supported, the default formatting choices are stored in a user-editable file and with a little trial & failure, a user can edit this to include their most frequent formatting choices. This used to be a huge time saver for me until the next version broke compatibility...).
pros:
* keep data, change layout
* can be used to get good defaults
* layout can have settings for all plot types and elements, independent of whether they're visible in a particular plot. So if you format a line plot, then switch to scatter, the line-plot formatting is still there.
cons:
* editing global defaults is tedious
* layout choices are specific: Over-loading another layout changes only elements present when layout was specified (i.e. if there are 3 data series in the data but only 2 in the layout, the third will use global default style -- a layout can't specify "all plotted lines have thickness X", except in global defaults)


Another example: Matplotlib, the core plotting library for Python. It has next to no GUI, and is used via Python code, but I like the principle it uses. In most cases when I used it (and having been confined to Python 2.0 with no time to read the docs properly), I always copied a bunch of formatting code around to get consistent looks for my plots (still a time saver vs. having to remember the arguments for plotting functions...), but in current implementation, style sheets are a blessing:
https://matplotlib.org/3.2.0/gallery/style_sheets/style_sheets_reference.html
They define all possible elements (or a subset of them), and allow visually consistent plots of all kinds without specifying the same formatting choices for all of them over and over again. There's a set of style sheets that comes with matplotlib, but the user can make and specify their own.
This means that I can generate publication-ready plots much quicker, and if different forms of publication require different formatting, that's only one update to the style sheet, and re-running the script to generate the charts. Very little work, and no way to accidentally forget to change that one axis label...

Pros:
* ... everything. I think this is my favourite implementation of styles for plots. Matplotlib can control pretty much anything ever using them (as far as I have explored it so far). If someone made all matplotlib functionality available in a good GUI with saving/loading of graphs and data, that would be my favourite graphing software, by a long shot.

Cons:
* ...small nitpicks. I've written too much already.


Feel free to contact me if you think I can make some useful contribution.
Comment 40 redwdc 2021-05-12 18:01:38 UTC
Just to add my 2 cents.

1) The current general layout for the "Chart Wizard" is fine, though it may need to be resized for any extra layouts and/or have tabs added.

2) It would be nice to be able use one line point style and/or select which of multiple point styles are used.  This may require an extra tab or a popup or something like that.  (To be very extravagant add custom graphics for line points.)

3) Be able to define which font/s is/are used.  This should be on it's own tab.

4) Be able to re-open the "Chart Wizard" by the right click context menu on an existing chart.

5) Save chart layouts as templates.  This could either be in the wizard or as on option on the right click context menu.
Comment 41 Stéphane Guillou (stragu) 2023-09-06 16:22:06 UTC
Looking at the scope and the duplicates, I am making the summary more general as it doesn't affect Calc only.
Given the number of duplicates, I am upping the priority to "high".
Comment 42 Stéphane Guillou (stragu) 2023-09-06 16:32:38 UTC
*** Bug 90490 has been marked as a duplicate of this bug. ***
Comment 43 Stéphane Guillou (stragu) 2023-09-06 16:32:56 UTC
*** Bug 96542 has been marked as a duplicate of this bug. ***