Stellar magnetic activity provides substantial information on the magnetic dynamo and the coronal heating process. We present a catalog of X-ray activity for about 6000 stars, based on the Chandra and Gaia DR2 data. We also classified more than 3000 stars as young stellar objects, dwarf stars, or giant stars. By using the stars with valid stellar parameters and classifications, we studied the distribution of X-ray luminosity (L_X_) and the ratio of X-ray-to-bolometric luminosities (R_X_), the positive relation between L_X_, R_X_, and hardness ratio, and the long-term X-ray variation. This catalog can be used to investigate some important scientific topics, including the activity-rotation relation, the comparison between different activity indicators, and the activities of interesting objects (e.g., A-type stars and giants). As an example, we use the catalog to study the activity-rotation relation, and find that the young stellar objects, dwarfs, and giants fall on a single sequence in the relation R_X_ versus Rossby number, while the giants do not follow the relation R_X_ versus P_rot_^-2^R^-4^ valid for dwarfs.