Fix a bug in chart view.