reader.py 724 B

1234567891011121314151617181920212223242526272829
  1. from __future__ import absolute_import
  2. # Copyright (c) 2010-2019 openpyxl
  3. """
  4. Read a chart
  5. """
  6. def read_chart(chartspace):
  7. cs = chartspace
  8. plot = cs.chart.plotArea
  9. chart = plot._charts[0]
  10. chart._charts = plot._charts
  11. chart.title = cs.chart.title
  12. chart.display_blanks = cs.chart.dispBlanksAs
  13. chart.visible_cells_only = cs.chart.plotVisOnly
  14. chart.layout = plot.layout
  15. chart.legend = cs.chart.legend
  16. # 3d attributes
  17. chart.floor = cs.chart.floor
  18. chart.sideWall = cs.chart.sideWall
  19. chart.backWall = cs.chart.backWall
  20. chart.pivotSource = cs.pivotSource
  21. chart.pivotFormats = cs.chart.pivotFmts
  22. chart.idx_base = min(s.idx for s in chart.series)
  23. return chart