make sure legend text is updated with new commands

Currently the legend text stays even after user run a new experiment with a different command.

This change make sure the chart legend text is updated with the correct command text