Read about our upcoming Code of Conduct on this issue

This instance will be upgraded to Heptapod 0.28.1 on 2022-01-26 at 16:00 UTC+1 (a few minutes of down time)

Commit ca138237 authored by CharlieC's avatar CharlieC
Browse files

Use the series index base from an existing chart.

Resolves #1233, resolves #1210

--HG--
branch : 2.6
parent 8e3529f4f6b1
......@@ -84,6 +84,7 @@ class ChartBase(Serialisable):
self.pivotSource = None
self.pivotFormats = ()
self.visible_cells_only = True
self.idx_base = 0
def __hash__(self):
......@@ -114,7 +115,7 @@ class ChartBase(Serialisable):
from .chartspace import ChartSpace, ChartContainer
self.plot_area.layout = self.layout
idx_base = 0
idx_base = self.idx_base
for chart in self._charts:
if chart not in self.plot_area._charts:
chart.idx_base = idx_base
......
......@@ -35,6 +35,6 @@ def read_chart(chartspace):
chart.backWall = cs.chart.backWall
chart.pivotSource = cs.pivotSource
chart.pivotFormats = cs.chart.pivotFmts
chart.idx_base
chart.idx_base = min(s.idx for s in chart.series)
return chart
......@@ -34,3 +34,5 @@ def test_read(datadir):
assert chart.pivotSource.name == "[files.xlsx]PIVOT!PivotTable1"
assert len(chart.pivotFormats) == 1
assert chart.idx_base == 0
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment