Creating a 24 Volt battery pack that can become a 36 Volt battery pack by flipping a switch can be done as long as two battery chargers are used to recharge the battery pack. The reason that two battery chargers are needed is because the individual batteries in the pack will discharge at different levels and their Voltages will become unbalanced. So charging the 12 Volt section of the battery pack independently from the 24 Volt section of the battery pack will be required in order to balance the Voltages between all of the batteries when they are finished recharging.
To make a switchable 24/36 Volt battery pack the wiring diagram that we created would need to be followed with the deletion of the fourth battery on the far right. The wiring diagram that you drew and attached would not work because the battery on the far left would short circuit when the switch was closed. The only way I know to make this kind of battery pack would be to follow our wiring diagram. An SPDT On-Off-On switch with three terminals could replace the SPDT On-Off-On switch with six terminals that is shown in our wiring diagram.
The switch in the photo you attached looks like an SPDT On-On switch. This type of switch could be used as the battery pack Voltage change switch long as there was a separate power switch in the circuit to turn the power on and off between the battery pack and controller. If using an SPDT On-On switch it is very important that the switch is a 'break before make' type of switch though, otherwise there would be a short circuit when it was flipped. Unless you know for certain that it is a 'break before make' switch then I would recommend using an SPDT On-Off-On switch instead. The Amp rating of the switch would also need to be suitable for the Amp load of the circuit. For most electric scooter and bike applications a 30 Amp switch is suitable, or a 15 Amp dual pole switch with the two poles connected together as shown in our wiring diagram.
Jamie