Chris Deering
Chris Deering

Reputation: 77

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?

Upvotes: 1

Views: 1654

Answers (1)

Ben Leitner
Ben Leitner

Reputation: 1532

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.

Upvotes: 3

Related Questions