PhpSpreadsheet icon indicating copy to clipboard operation
PhpSpreadsheet copied to clipboard

ReferenceHelper should update Chart references on insert/delete row/column

Open MarkBaker opened this issue 2 years ago • 0 comments

This is:

- [X] a bug report
- [ ] a feature request
- [ ] **not** a usage question (ask them on https://stackoverflow.com/questions/tagged/phpspreadsheet or https://gitter.im/PHPOffice/PhpSpreadsheet)

What is the expected behavior?

Cell references and formula in Chart definitions should be updated on insert/delete of rows/columns.

What is the current behavior?

Cell references and formula in Chart definitions are not updated on insert/delete of rows/columns.

What are the steps to reproduce?

Please provide a Minimal, Complete, and Verifiable example of code that exhibits the issue without relying on an external Excel file or a web server:

<?php

require __DIR__ . '/vendor/autoload.php';

// Create new Spreadsheet object
$spreadsheet = new \PhpOffice\PhpSpreadsheet\Spreadsheet();

// add code that show the issue here...

If this is an issue with reading a specific spreadsheet file, then it may be appropriate to provide a sample file that demonstrates the problem; but please keep it as small as possible, and sanitize any confidential information before uploading.

What features do you think are causing the issue

  • [ ] Reader
  • [ ] Writer
  • [ ] Styles
  • [ ] Data Validations
  • [ ] Formula Calculations
  • [X] Charts
  • [ ] AutoFilter
  • [ ] Form Elements

Does an issue affect all spreadsheet file formats? If not, which formats are affected?

Xlsx (the only format that supports Charts at present)

Which versions of PhpSpreadsheet and PHP are affected?

All

MarkBaker avatar Mar 23 '23 15:03 MarkBaker