diff options
author | Jozsef Szakacs <zmx3@citromail.hu> | 2018-12-17 11:42:23 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2019-01-01 22:38:25 +0100 |
commit | b8d2d78974fcb3e95de87dd98103e5bc015b7687 (patch) | |
tree | ed64440ae13a2b9de26b604f3fb6db95c37d3196 /chart2 | |
parent | f6206244eba41a77bfe0629b2a16b6670f47aa6f (diff) |
tdf#114141 draw the top of the zero height 3D bars
in bar charts, instead of leaving an empty place
at the zero data point.
Note: This is an initial workaround for the
interoperability problem. We need a new LibreOffice
chart option or setting to support both ways of data
visualization.
Change-Id: I5c04a265ffe1392f659097054ab11a23374e88b7
Reviewed-on: https://gerrit.libreoffice.org/65269
Tested-by: Jenkins
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/view/charttypes/BarChart.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/chart2/source/view/charttypes/BarChart.cxx b/chart2/source/view/charttypes/BarChart.cxx index 42741fb37a2e..b3d27a933d7a 100644 --- a/chart2/source/view/charttypes/BarChart.cxx +++ b/chart2/source/view/charttypes/BarChart.cxx @@ -685,6 +685,11 @@ void BarChart::createShapes() fLogicBarHeight = 0.0; } + // tdf#114141 to draw the top of the zero height 3D bar + // we set a small positive value, here the smallest one for the type double (DBL_MIN) + if( fLogicBarHeight == 0.0 ) + fLogicBarHeight = DBL_MIN; + //sort negative and positive values, to display them on different sides of the x axis bool bPositive = fLogicBarHeight >= 0.0; double fLowerYValue = bPositive ? fPositiveLogicYForNextSeries : fNegativeLogicYForNextSeries; |