Reputation: 9376
I've been doing some work with charts4j. They have a lot of great examples with code (https://code.google.com/p/charts4j/). However I can't seem to figure out how to scale the pie chart. I can re-size the chart with the .setSize call, but that doesn't change the size of the actual pie. It just gives me more white-space. Is there any way to make the pie bigger/smaller? How do you do it? Thanks.
Slice s1 = Slice.newSlice(30, Color.newColor("951800"), "Featured", "Featured");
Slice s2 = Slice.newSlice(70, Color.newColor("01A1DB"), "Not-Featured", "Not-Featured");
PieChart refChart = GCharts.newPieChart(s1, s2);
refChart.setSize(650, 200);
refChart.setThreeD(true);
String refURL = refChart.toURLString();
Upvotes: 1
Views: 834
Reputation: 9376
Charts4j sends you a link to a picture that you can use. It's not quite the same but you can just scale the picture in the css. It works well enough for my purposes.
Upvotes: 1