fixing mode set when transitioning between chart types