Fixed bug that made ChartDialog ignore its code parameter