How can I fix this problem (with the Chart component)

You are trying to use the AI2 Charts component on iOS.

According to https://doesappinventorrunonios.com/
it is not yet implemented on iOS.

Either do your testing in Android, or find a different charting alternative from