Bug 82584 - CHART: Option to allow a zero/negative Minimum value when scaling an axis logarithmically
Summary: CHART: Option to allow a zero/negative Minimum value when scaling an axis log...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
Version:
(earliest affected)
4.3.0.4 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Chart-Enhancements
  Show dependency treegraph
 
Reported: 2014-08-13 21:48 UTC by Doug
Modified: 2019-03-18 22:32 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
screen shot of sample chart and pop up box (53.94 KB, image/png)
2014-08-13 21:48 UTC, Doug
Details
ODS containing 1 chart with non-linear x scale in LOv4322. (32.04 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-10-11 11:49 UTC, Owen Genat (retired)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Doug 2014-08-13 21:48:30 UTC
Created attachment 104587 [details]
screen shot of sample chart and pop up box

1.  Create scatterplot chart with numeric x axis with at least one x value of zero or less.  (see attached screenshot)
2.  Right click x axis to format axis.
3.  In dialog box Scale --> check box Logarithmic Scale
4.  Manually change the minimum x-scale from 1 to 0 (so that it displays the data on the chart).

*EXPECTED* RESULT:  LO should keep the same relative logarithmic scale as when the minimum axis value is 1, but shift absolute values so that a value of 0 would be displayed in the position that 1 previously was displayed, a value of 4 in the location where 5 previously was displayed,etc.  In this way, the visual gaps of out of range values can be eliminated in the chart (what logarithmic scale is useful to do), while being faithful to  correct absolute data values.

ACTUAL RESULT:  (BUG)  LO pops up error message saying that logarithmic chart cannot display values of zero or lower.  (See screenshot).  This means that logarithmic scale cannot be used to display data that includes 0 values or lower.


LO should be able to display values of zero or lower on logarithmic *visual* scale.  LO should be able to create this visual effect regardless of the absolute values, by calculating the visual effect using a variable axis-intercept (adding or subtracting from absolute values to produce visual effect).  An artful solution would give user granular control of logarithmic slope and intercept through dialog box (although that would involve more than check box).
Comment 1 m.a.riosv 2014-08-14 00:10:18 UTC
Hi Doug,
IMO that LibreOffice doesn't meet your wishes, it doesn't mean it is a bug.

If you like, you can change the importance from normal to enhancement.

Have tried to do what you are asking, calculating the new X values in another column?

Please test using 1E-307 instead 0 for the first X value, with the minimum to automatic.
Comment 2 Doug 2014-08-14 01:55:07 UTC
Hi m.a.riosy:  I was puzzled by your response because this has hallmarks of bug more than enhancement, and in any event merits a report.  And then I cross-checked with the commercial alternative and see it functions in similar way albeit with a warning message about scaling of values near zero.  In response to your comments:

1.  My specific application requires using the exact values.  Fuzzy values will cause problems.

2.  A value of 1E-307 would be as out of range on a logarithmic scale as a value of 1E+307, and would undo the benefit of a logarithmic scale.  Would result in straight line across entire chart.

3.  The default "automatic" lower bound is 1 for logarithmic scaling, so by default the 1E-307 value would not be charted; would require manual override (which, as noted above, would be a bad idea)

4.  Doing an offset externally in the data would be reflected on the axis without internal LO handling.  That is, if I had a -100 value to chart, and I charted it by adding +101 to all of the values, the axis (and data labels) will say the value is 1, rather than -100.  The user-formatting option is the closest kind of thing to overriding that, but seems directed to a different purpose.  The expected behavior was that it would be plotted like 1 but the axis and data label would show -100.  Maybe can kluge something together re: datalabels, but the axis just won't work without internal LO handling.

5.  Logarithmic scaling is the only nonlinear option in LO for charting gappy data without excluding outliers altogether.  


Yes, I understand that there may be higher-priority issues for LO-- for example, Calc crashed on me even in the 15 minutes I was testing your suggestions.  Based on the fact that LO has achieved parity with the commercial alternative on this particular feature, I'll reclassify as an enhancement request.  However, it's weak functionality in both products, and LO Chart in particular does not seem to be stopping at parity (which is the reason I am using it).
Comment 3 Owen Genat (retired) 2014-10-11 11:49:38 UTC
Created attachment 107714 [details]
ODS containing 1 chart with non-linear x scale in LOv4322.

In the attached, editing the X-axis shows it initially displaying a Minimum value of -2000. This is the default value determined by Calc given the data, I have merely unchecked the Automatic option. Checking the Logarithmic scale option results in the reported error.

I am a bit uncertain to what degree this is an enhancement or bug. I feel it is mostly likely more of an enhancement than a bug, although the developers may need to have a closer look at what is occurring here to make a clearer judgement.
Comment 4 Owen Genat (retired) 2014-10-11 11:54:22 UTC
Status set to NEW. Summary amended for clarity. Platform set to All/All.