Reputation: 2428
I'm using d3pie.js as in the basic example and trying to increase labels font size in the following way:
var pie = new d3pie("#myPie", {
header: {
title: {
text: "A very simple example pie"
}
},
labels: {
outer: {
fontSize: 20
}
},
data: {
content: [
{ label: "JavaScript", value: 264131 },
{ label: "Ruby", value: 218812 },
{ label: "Java", value: 157618},
]
}
});
but it does not work. So, how I can specify font size and style?
Upvotes: 2
Views: 1230
Reputation: 389
Use mainLabel
instead of outer
, like this:
var pie = new d3pie("#myPie", {
...
"labels" : {
"mainLabel": {
"fontSize": 15
}
},
...
});
See d3pie-generator for other options.
Upvotes: 2