You cannot reproduce the error because you carelessly read its description.
I wrote that an error occurs if a legend is added to the chart.
You have provided a sample with no legend.
Give the series a name and include a legend for the graph.
Get a runtime error if the data source is empty.
However, it doesn't matter anymore. I'm tired of endless defects in your controls, working with them is a constant search for workarounds since 90% of the elements more complex than buttons do not work properly. This is confirmed by hundreds of posts from other users on this forum. It is very ugly to release a product and bring it to a usable condition with the help of your customers at their expense. Good luck.