refactoring (ChartData) to allow XML parsing