File path: /jfreechart-1.0.10/src/org/jfree/chart/ChartFactory.java
|
|
File path: /jfreechart-1.0.10/src/org/jfree/chart/ChartFactory.java
|
Method name: JFreeChart createPieChart(String, PieDataset, PieDataset, int, boolean, boolean, boolean, Locale, boolean, boolean)
|
|
Method name: JFreeChart createPieChart(String, PieDataset, PieDataset, int, boolean, boolean, boolean, boolean, boolean, boolean)
|
Number of AST nodes: 10
|
|
Number of AST nodes: 10
|
|
1 | if (greenForIncrease) {↵ | | 1 | if (greenForIncrease) {↵
|
2 | plot.setSectionPaint(key, Color.green);↵ | | 2 | plot.setSectionPaint(key, Color.green);↵
|
3 | } ↵ | | 3 | } ↵
|
4 | else {↵ | | 4 | else {↵
|
5 | plot.setSectionPaint(key, Color.red);↵ | | 5 | plot.setSectionPaint(key, Color.red);↵
|
6 | }↵ | | 6 | }↵
|
7 | if (showDifference) {↵ | | 7 | if (showDifference) {↵
|
8 | series.setValue(key + " (+100%)", newValue);↵ | | 8 | series.setValue(key + " (+100%)", newValue);↵
|
9 | }↵ | | 9 | }↵
|
10 | }↵ | | 10 | }↵
|
11 | else {↵ | | 11 | else {↵
|
12 | double percentChange = (newValue.doubleValue() ↵ | | 12 | double percentChange = (newValue.doubleValue() ↵
|
13 | / oldValue.doubleValue() - 1.0) * 100.0;↵ | | 13 | / oldValue.doubleValue() - 1.0) * 100.0;↵
|
14 | double shade↵ | | 14 | double shade↵
|
15 | = (Math.abs(percentChange) >= percentDiffForMaxScale ? 255↵ | | 15 | = (Math.abs(percentChange) >= percentDiffForMaxScale ? 255↵
|
16 | : Math.abs(percentChange) * colorPerPercent);↵ | | 16 | : Math.abs(percentChange) * colorPerPercent);↵
|
17 | if (greenForIncrease ↵ | | 17 | if (greenForIncrease ↵
|
18 | && newValue.doubleValue() > oldValue.doubleValue()↵ | | 18 | && newValue.doubleValue() > oldValue.doubleValue()↵
|
19 | || !greenForIncrease && newValue.doubleValue() ↵ | | 19 | || !greenForIncrease && newValue.doubleValue() ↵
|
20 | < oldValue.doubleValue()) {↵ | | 20 | < oldValue.doubleValue()) {↵
|
21 | plot.setSectionPaint(key, new Color(0, (int) shade, 0));↵ | | 21 | plot.setSectionPaint(key, new Color(0, (int) shade, 0));↵
|
22 | }↵ | | 22 | }↵
|
23 | else {↵ | | 23 | else {↵
|
24 | plot.setSectionPaint(key, new Color((int) shade, 0, 0));↵ | | 24 | plot.setSectionPaint(key, new Color((int) shade, 0, 0));↵
|
25 | } | | 25 | }
|