Hi,
Thanks for your inquiry.
I have checked your scenario a bit. Well, I think since your data is dynamic (you might not know how much rows would be in your data source when you process the markers to fill the data into the cells, etc.) you should create a range using Aspose.Cells APIs dynamically for your smart markers cell(s). For example, you will paste a marker in the cell A2 i.e. &=Tab1.Field1, now you create a range for that marker e.g. you may create a range based on the A1:A2 cell area/range, see the sample code segment here:
//…
Worksheet worksheet = workbook.getWorksheets().get(0);
Range range = worksheet.getCells().createRange(“A1”, “A2”);
range.setName(“TestRange”);
You will also create your chart but set the data series based on that range source data. E.g
//…
int index = chart.getNSeries().add("=TestRange", true);
Now that when the markers are processed, new blank rows are inserted first to fill the data into the cells/range which would be also extended, the chart would be updated based on the data series data. Similarly you should be able to set/define the category data based on the other range accordingly.
Thank you.