[pseudo-PATCH] Enhanced vertical scaling for chart2

walt w41ter at gmail.com
Tue May 29 07:07:00 PDT 2012


Hi list :)

commit 635b51d9ca8184cb791101b86a2e7f1ac280acf6
Author: Vladimir Glazounov
Date:   Tue May 22 18:08:41 2007 +0000

    INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED
    2005/04/29 12:21:55 dr 1.1.2.3: #i30426# enhanced linear scaling

+        /*  If minimum equals maximum, or if minimum is less than 5/6 of
+            maximum, set minimum to 0. */
+        if( (fTempMinimum == fTempMaximum) || (fTempMinimum / fTempMaximum < 5.0 / 6.0) )


The commit I quoted above was done to maintain compatibility with MS Office.

MS apparently got complaints that auto-scaling for column charts is inappropriate
for the typical use case, where most people expect the bottom of the column to be
zero.

But IMO it really doesn't/shouldn't apply to stock charts, where most people
(including me) absolutely do *not* expect the bottom of the chart to be zero,
not ever.

So, my proposed patch (to be submitted soon) would simply exempt stock charts
from that test added by Vladimir in 2007.

I don't know the LO code very well, so I'd like someone to point me to some
examples of how to test for the chart type, and I'll try to work up a real
patch for you.

Thanks for any hints!



More information about the LibreOffice mailing list