Fix charting bug