implemented initializing chart with passed values