  In our recent catalogue of BY Draconis (BY Dra) variables based on Zwicky
Transient Facility data, we found traces of a period gap in the period-colour
diagram. We combined our BY Dra database with catalogues from the {\sl Kepler}
and K2 surveys, revealing a prominent period gap. Here, we use this combined
ZTF-{\sl Kepler}-K2 data set to investigate the origin of the period gap
observed for BY Dra stars using chromospheric activity indices. We use low- and
medium-resolution spectra from the LAMOST Data Release 7 to derive magnetic
activity indices for the Ca {\sc ii} H and K and H$\alpha$ emission lines. We
find a strong dependence of chromospheric activity on both stellar mass and
rotation period. For partially convective K-M-type stars, the activity
decreases steeply up to an age of $\sim$700-1000 Myr, subsequently evolving to
the type of low-level saturation associated with spin-down stallation. In
contrast, F-G-type stars with thinner convective envelopes exhibit constant
activity with increasing age. We suspect that the observed steep decrease for
partially convective stars is driven by core-envelope coupling. This mechanism
reduces differential rotation at the core-envelope transition, hence leading to
decreased magnetic activity. Moreover, we derive activity indices for
previously known star clusters and find similar trends as regards their
activity levels as a function of age. In particular, very low-level activity is
observed around the location of the period gap. Therefore, we conclude that the
period gap, defined by the non-detection of variable sources, is driven by a
minimum in chromospheric activity.
