How to change chart dataContainer in v7?

Hi:

I had a chart defined in v6.10 where I changed the Datasource depending on an option chosen:

pieProducts.setDatasource(offerStatsDs);

or

pieProducts.setDatasource(productStatsDs);

When I change to v7 Data Containers, how do I do this? The only thing I can find is setDataProvider(), but a CollectionContainer is not a DataProvider.

In answer to my own question, I think I finally found it buried in the code:

pieProducts.setDataProvider(new CollectionDataProvider(productStatsDc));

I was not able to find any reference to this in the documentation. Maybe it should be added somewhere?

Hi,

It is mentioned in Charts documentation: Connecting Data - CUBA Platform. Displaying Charts And Maps

We will add a new example to clarify this.

Thank you. I completely missed that in the docs.