handling switching between chart and gauge added