Gaia Data Release 2: Variable stars in the colour-absolute magnitude diagram