Bug 59306 - Shifting rows does not shift chart data series references
Summary: Shifting rows does not shift chart data series references
Status: NEW
Alias: None
Product: POI
Classification: Unclassified
Component: SS Common (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks: 60072
  Show dependency tree
 
Reported: 2016-04-11 22:26 UTC by Javen O'Neal
Modified: 2021-02-17 07:16 UTC (History)
0 users



Attachments
Excel file with chart (17.88 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2016-04-11 22:26 UTC, Javen O'Neal
Details
SimpleScatterChart.xls (44.50 KB, application/vnd.ms-excel)
2016-04-11 22:29 UTC, Javen O'Neal
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Javen O'Neal 2016-04-11 22:26:07 UTC
Created attachment 33752 [details]
Excel file with chart

Shifting rows that are part of a chart's data series does not shift the data series cell references.
Comment 1 Javen O'Neal 2016-04-11 22:29:12 UTC
Created attachment 33753 [details]
SimpleScatterChart.xls
Comment 2 Javen O'Neal 2016-04-12 00:19:47 UTC
Tried to write a unit test for this, then discovered XSSFChart is pretty incomplete. Without using the CTChart* classes, it is possible to add data series to a chart but not query existing data series.

/lang=jython
from java.io import File
from org.apache.poi.ss.usermodel import WorkbookFactory
f = File('SimpleScatterChart.xlsx')
wb = WorkbookFactory.create(f, None, True)
sheet1 = wb.getSheet('Sheet1')
chart1 = wb.getSheet('Chart1')
sheet1scatter = sheet1.createDrawingPatriarch().getCharts()[0]
chart1scatter = chart1.createDrawingPatriarch().getCharts()[0]