File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/LineAndShapeRenderer.java
|
|
File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/StatisticalLineAndShapeRenderer.java
|
Method name: void drawItem(Graphics2D, CategoryItemRendererState, Rectangle2D, CategoryPlot, CategoryAxis, ValueAxis, CategoryDataset, int, int, int)
|
|
Method name: void drawItem(Graphics2D, CategoryItemRendererState, Rectangle2D, CategoryPlot, CategoryAxis, ValueAxis, CategoryDataset, int, int, int)
|
Number of AST nodes: 18
|
|
Number of AST nodes: 18
|
|
1 | if (pass == 0 && getItemLineVisible(row, column)) {↵ | | 1 | if (getItemLineVisible(row, column)) {↵
|
2 | if (column != 0) {↵ | | 2 | if (column != 0) {↵
|
|
3 | Number previousValue = dataset.getValue(row, column - 1);↵ | | 3 | Number previousValue = statData.getValue(row, column - 1);↵
|
4 | if (previousValue != null) {↵ | | 4 | if (previousValue != null) {↵
|
|
5 | // previous data point...↵ | | 5 | // previous data point...↵
|
6 | double previous = previousValue.doubleValue();↵ | | 6 | double previous = previousValue.doubleValue();↵
|
7 | double x0;↵ | | 7 | double x0;↵
|
8 | if (this.useSeriesOffset) {↵ | | 8 | if (getUseSeriesOffset()) {↵
|
9 | x0 = domainAxis.getCategorySeriesMiddle(↵ | | 9 | x0 = domainAxis.getCategorySeriesMiddle(↵
|
10 | dataset.getColumnKey(column - 1),↵ | | 10 | dataset.getColumnKey(column - 1),↵
|
11 | dataset.getRowKey(row), dataset,↵ | | 11 | dataset.getRowKey(row), dataset,↵
|
12 | this.itemMargin, dataArea,↵ | | 12 | getItemMargin(), dataArea,↵
|
13 | plot.getDomainAxisEdge());↵ | | 13 | plot.getDomainAxisEdge());↵
|
14 | }↵ | | 14 | }↵
|
15 | else {↵ | | 15 | else {↵
|
16 | x0 = domainAxis.getCategoryMiddle(column - 1,↵ | | 16 | x0 = domainAxis.getCategoryMiddle(column - 1,↵
|
17 | getColumnCount(), dataArea,↵ | | 17 | getColumnCount(), dataArea,↵
|
18 | plot.getDomainAxisEdge());↵ | | 18 | plot.getDomainAxisEdge());↵
|
19 | }↵ | | 19 | }↵
|
20 | double y0 = rangeAxis.valueToJava2D(previous, dataArea,↵ | | 20 | double y0 = rangeAxis.valueToJava2D(previous, dataArea,↵
|
21 | plot.getRangeAxisEdge());↵ | | 21 | plot.getRangeAxisEdge());↵
|
|
22 | Line2D line = null;↵ | | 22 | Line2D line = null;↵
|
23 | if (orientation == PlotOrientation.HORIZONTAL) {↵ | | 23 | if (orientation == PlotOrientation.HORIZONTAL) {↵
|
24 | line = new Line2D.Double(y0, x0, y1, x1);↵ | | 24 | line = new Line2D.Double(y0, x0, y1, x1);↵
|
25 | }↵ | | 25 | }↵
|
26 | else if (orientation == PlotOrientation.VERTICAL) {↵ | | 26 | else if (orientation == PlotOrientation.VERTICAL) {↵
|
27 | line = new Line2D.Double(x0, y0, x1, y1);↵ | | 27 | line = new Line2D.Double(x0, y0, x1, y1);↵
|
28 | }↵ | | 28 | }↵
|
29 | g2.setPaint(getItemPaint(row, column));↵ | | 29 | g2.setPaint(getItemPaint(row, column));↵
|
30 | g2.setStroke(getItemStroke(row, column));↵ | | 30 | g2.setStroke(getItemStroke(row, column));↵
|
31 | g2.draw(line);↵ | | 31 | g2.draw(line);↵
|
32 | }↵ | | 32 | }↵
|
33 | }↵ | | 33 | }↵
|
34 | } | | 34 | }
|