refactored GuiChart class