Several things in our handling of data labels on charts should be improved;
- Setting datalabel.Position can cause corrupt workbooks. It should be limited based on chart-type or throw when set to something that will cause corrupt workbook.
- Series, XSeries and Data Label Range are essentially the same structure and should be unifed as a class/method for mapping range data to a chart.
- Series[0].Datalabel.SetRange() does not set the runs or field items in the TextBody xml item. eg. type = EXCELRANGE
- this should be done to ensure older versions of excel can open the file. It has a very perculiar behaviour when Value, Category and Data Label Range are set.
- SeriesDataLabel should have easier access to Series
- DataLabel(s) have A Lot of different entry points both in the xml and in epplus. The overall structure should be more user-friendly if possible. (e.g. Chart.Datalabel, chart.series[0].datalabel, chart.series[0].datalabel.datalabels[0]. As well as EX versions)
- Verify the entry-points respect the hierarchical rules of specific beats general but that they are initialized to parent values.
- Verify all charts actually implement data labels if they have them in Excel.
Several things in our handling of data labels on charts should be improved;