Bug 132779 - Toggle on/off data series in legend of charts
Summary: Toggle on/off data series in legend of charts
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Chart-Enhancements
  Show dependency treegraph
 
Reported: 2020-05-06 15:13 UTC by Chris
Modified: 2022-12-27 16:43 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris 2020-05-06 15:13:01 UTC
It would be very useful if charts would allow to toggle on/off data series (e.g. with a checkbox in the legend, or by clicking on the legend items) so that you could focus on a few series only, particularly if you combine multiple series into a chart and some of them are overlapping.


examples:

https://jsfiddle.net/beaver71/00q06vjp/ - click on the legend items (The requested solution doesn't need to be interactive and re-scale on each change.)
https://www.arction.com/lightningchart-js-interactive-examples/examples/lcjs-example-0000-lineSeries.html - click on the legend items
https://www.contextures.com/excelchartsinteractive.html similar result for Excel, but not very userfriendly
Comment 1 Heiko Tietze 2020-09-02 08:55:55 UTC
Sounds reasonable. Probably not possible per attribute (CC Regina: ODF doesn't have such hidden flag, does it?) but with fill/line color same as background and 100% transparency it should be not visible too.

There is "Show data label" that can be accomplished by "[x] Show Data Serie". We somehow need to save the previous fill/line settings (also in the document) and should hide the attributes as it might be confusing to see the background changing to white when switching Show off.

Would be definitely nicer to have the on/off flag.
Comment 2 Regina Henschel 2020-09-02 10:41:29 UTC
(In reply to Heiko Tietze from comment #1)
> Sounds reasonable. Probably not possible per attribute (CC Regina: ODF
> doesn't have such hidden flag, does it?) but with fill/line color same as
> background and 100% transparency it should be not visible too.
> 
> There is "Show data label" that can be accomplished by "[x] Show Data
> Serie". We somehow need to save the previous fill/line settings (also in the
> document) and should hide the attributes as it might be confusing to see the
> background changing to white when switching Show off.
> 
> Would be definitely nicer to have the on/off flag.

There exists no attribute hide/show in ODF. But you can use the chart properties chart:symbol-type and chart:data-label-foo and the graphic properties draw:fill and draw:line. They can all be set to "none". A toggle need not be in the legend, but can be at the series directly. One problem is, to keep the previous settings, so that they can be restored. Another problem is to decide, what state is to be stored. All properties are available via API, so a solution as extension is possible too.
Comment 3 Guy Rouillier 2022-09-27 10:40:11 UTC
I found this issue via a search. I'm looking for this same feature.  I have a chart I maintain for my retirement accounts.  It shows the delta by month for each account by percentage of balance, so I can compare performance among the accounts.  As you might imagine, retirement funds overlap greatly in their investments, so they tend to go up and down together, though by different degrees.

So, sometimes I like to get a couple of them "out of the way" on this chart, so I can look at the relative performance of just a couple major ones.  A checkbox in the legend would be ideal.