How can I create a chart with dynamic data series?

I am looking for a way to create a dynamic chart in Calc, so that it automatically increases or decreases the rows evaluated depending on the number of rows populated in my source data sheet. This source data sheet may change regularly - i.e. one week it may contain 50 rows; the next week 125 rows and so on.

I’ve tried:

  • Define a Name with a range. The range can be changed with a macro, but i’ve not found the way for call that name inside the chart.
  • Modify with a macro the range of the series but i only can change the range of one of the series.

Anyone can help me please?

{UPDATE}
OK, now I have a chart that automatically increases or decreases the rows evaluated depending on the number of rows populated in a pivot table. Now the problem is that some data in the pivot table isn’t show because is repeated. Is there any way to show repeated data in a pivot table?

Thank you

OP: @Manel

Hi @Manel,

Still looking for an Answer to your Question?

Please post a copy of your spreadsheet so that we can take a look at what you’re trying to do with Calc.

Thanks!

Refer the answer here and in particular my comment beneath it.