简体   繁体   中英

How do I change the font size of my labels on pie charts and row charts in dc.js?

I am looking to make the font size bigger for the labels on row charts and pie charts, but I am not sure how to. Does anyone have any suggestions for how I can go about this?

In your CSS file include

.dc-chart .pie-slice {
  font-size: /* Put the size you want here */;
}

.dc-chart g.row text {
  font-size: /* Put the size you want here */;
}

In the future, if you're using chrome you can use the chrome developer tools by right clicking and then selecting "Inspect Element." Then you can find out what you have to change and play around with different values.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM