Both Panasonic ZS100 and Canon G7 X MII have 20.0 MP resolution sensors but Panasonic ZS100's sensor is 1 (13.2 x 8.8 mm ) and Canon G7 X MII's sensor is 1" (13.2 x 8.8 mm ).
Since Canon G7 X MII's has a larger sensor area with the same resolution, this means that it also has a larger pixel area hence better light collecting capacity for a given aperture compared to Panasonic ZS100.
Below you can see the ZS100 and G7 X MII sensor size comparison.
Panasonic ZS100 and Canon G7 X MII have sensor sizes so they will provide same level of control over the depth of field when used with same focal length and aperture.