Line | |
---|
1 | package org.expeditee.items.widgets.charts;
|
---|
2 |
|
---|
3 | import org.expeditee.items.Text;
|
---|
4 | import org.jfree.chart.ChartFactory;
|
---|
5 | import org.jfree.chart.JFreeChart;
|
---|
6 | import org.jfree.chart.plot.PiePlot3D;
|
---|
7 | import org.jfree.util.Rotation;
|
---|
8 |
|
---|
9 | public class Pie3D extends AbstractPie {
|
---|
10 |
|
---|
11 | public Pie3D(Text source, String[] args) {
|
---|
12 | super(source, args);
|
---|
13 | }
|
---|
14 |
|
---|
15 | @Override
|
---|
16 | protected JFreeChart createNewChart() {
|
---|
17 | JFreeChart chart = ChartFactory.createPieChart3D(DEFAULT_TITLE, getChartData(), true, // legend?
|
---|
18 | true, // tooltips?
|
---|
19 | false // URLs?
|
---|
20 | );
|
---|
21 | final PiePlot3D plot = (PiePlot3D) chart.getPlot();
|
---|
22 | plot.setStartAngle(290);
|
---|
23 | plot.setDirection(Rotation.CLOCKWISE);
|
---|
24 | plot.setForegroundAlpha(0.5f);
|
---|
25 | return chart;
|
---|
26 | }
|
---|
27 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.