auto update initRange with legend checkbox