Bug 59300 - In Bar Charts, allow to specify separate bar widths for each data series
Summary: In Bar Charts, allow to specify separate bar widths for each data series
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Chart-Enhancements
  Show dependency treegraph
 
Reported: 2013-01-13 00:07 UTC by Júlio Reis
Modified: 2018-10-30 22:19 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
This is the effect I'd like to obtain. Taken from the Wordpress Jetpack stats page. (31.04 KB, image/tiff)
2013-01-13 00:07 UTC, Júlio Reis
Details
Test case: superimposed bars, all same width (20.35 KB, application/vnd.oasis.opendocument.spreadsheet)
2013-01-13 00:09 UTC, Júlio Reis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Júlio Reis 2013-01-13 00:07:32 UTC
Created attachment 72934 [details]
This is the effect I'd like to obtain. Taken from the Wordpress Jetpack stats page.

All of the bars on a bar chart series are of the same width. We can vary the width, but only for all series. I'd like to be able to set different widths per series. The effect I was looking after is the one attached below (from Jetpack).
Comment 1 Júlio Reis 2013-01-13 00:09:57 UTC
Created attachment 72935 [details]
Test case: superimposed bars, all same width

In the file attached, I've superimposed the columns and I'd like to change the column widths per series: I'd make 'unique visitors' narrowest, then 'visits', and then pageviews the widest.
Comment 2 Júlio Reis 2013-01-13 00:12:31 UTC
Sorry, I messed up the file types in my previous attachments. First file is a TIFF, second is an ODS.
Comment 3 Owen Genat (retired) 2013-11-23 03:51:15 UTC
I am confirming this enhancement. Status set to NEW. Version set to Inherited From OOo. The type of layered / superimposed column chart indicated in the attachment to comment #0 has never been available and requires that the ODF v1.2 specification be amended to include it. ODF v1.2, Part 1, 19.15.1, pp.329-331 (relating to bar charts) states:

> The chart:class attribute specifies a chart type. [...] The defined values for the 
> chart:class attribute are: 
> [...]
> ● chart:bar – The values given by a chart:values-cell-range-address attribute on a
> <chart:series> element are interpreted as y-coordinates within a Cartesian coordinate
> system with horizontal x-axis and vertical y-axis. The accessory x-coordinates are generated
> from the positions in the y-value sequence starting with 1.0. The first y value gets an x value
> 1.0. The second y value is associated with an x value of 2.0 and so forth. The
> <chart:categories> element> can be used to define labels for the x-axis. Where
> chart:three-dimensional="true" a left handed three-dimensional Cartesian coordinate
> system is used with horizontal x-axis and vertical y-axis (prior to any 3D scene
> transformations).
> Where chart:deep="true" the z-coordinates are generated from the order of the series
> elements starting with 1.0. The first series has an associated z-coordinate of 1.0. The second
> series has a z-coordinate 2.0 and so forth. The series names are used as labels at the z-axis.
> Bars are displayed for each data point starting at the x-axis and ending at the indicated y-
> coordinate (see chart:origin for more details). In case of chart:stacked="true" the
> bar starts at the previous series instead of the x-axis. The width and exact position of the bars
> along the x-axis is influenced by the attributes chart:gap-width, chart:overlap,
> chart:group-bars-per-axis, chart:stacked and chart:percentage. In case of
> chart:three-dimensional="false" the bars are simple rectangles.
> Where chart:three-dimensional="true" the shape of the bars are defined by a
> chart:solid-type attribute. A chart:vertical attribute indicates whether the positions
> of x- and y-axis should be swapped, resulting in a horizontal y-axis and vertical x-axis. The
> bars are filled as indicated by the fill attributes of the series and points. A border is drawn as
> specified by the line attributes.

I would imagine something like an alternative to the chart:stacked attribute (e.g., chart:superimposed) would be required. ODF v1.2, Part 1, 20.52, p.703:

> The chart:stacked attribute specifies the accumulation of the series values per category. Each
> value is in addition to the other values in the same category.
> This attribute is evaluated for chart styles that are applied to a <chart:plot-area> element.
> The defined values for the chart:stacked attribute are:
> ● false: series values should not be accumulated by category.
> ● true: series values should be accumulated by category. Bars in bar charts are stacked on
>   top of each other.

If this request further requires the ability "to specify separate bar widths for each data series" then the option may need to be more complicated. Do any other charts offer this level of flexibility?
Comment 4 Owen Genat (retired) 2013-11-23 04:08:13 UTC
(In reply to comment #3)
> I would imagine something like an alternative to the chart:stacked attribute
> (e.g., chart:superimposed) would be required. 

A further examination indicates it may be able to be worked around using the chart:gap-width (20.22) and chart:overlap (20.40) attributes, although I am uncertain to what degree this would be possible within ODF constraints.