summaryrefslogtreecommitdiff
path: root/drawing.go
diff options
context:
space:
mode:
Diffstat (limited to 'drawing.go')
-rw-r--r--drawing.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/drawing.go b/drawing.go
index ea75e82..3ce1282 100644
--- a/drawing.go
+++ b/drawing.go
@@ -1000,10 +1000,17 @@ func (f *File) drawPlotAreaValAx(formatSet *formatChart) []*cAxs {
if formatSet.YAxis.Maximum == 0 {
max = nil
}
+ var logBase *attrValFloat
+ // Follow OOXML requirements on
+ // [https://github.com/sc34wg4/OOXMLSchemas/blob/2b074ca2c5df38b18ac118646b329b508b5bdecc/Part1/OfficeOpenXML-XMLSchema-Strict/dml-chart.xsd#L1142-L1147]
+ if formatSet.YAxis.LogBase >= 2 && formatSet.YAxis.LogBase <= 1000 {
+ logBase = &attrValFloat{Val: float64Ptr(formatSet.YAxis.LogBase)}
+ }
axs := []*cAxs{
{
AxID: &attrValInt{Val: intPtr(753999904)},
Scaling: &cScaling{
+ LogBase: logBase,
Orientation: &attrValString{Val: stringPtr(orientation[formatSet.YAxis.ReverseOrder])},
Max: max,
Min: min,