File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/BoxAndWhiskerRenderer.java
|
|
File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/BoxAndWhiskerRenderer.java
|
Method name: void drawHorizontalItem(Graphics2D, CategoryItemRendererState, Rectangle2D, CategoryPlot, CategoryAxis, ValueAxis, CategoryDataset, int, int)
|
|
Method name: void drawVerticalItem(Graphics2D, CategoryItemRendererState, Rectangle2D, CategoryPlot, CategoryAxis, ValueAxis, CategoryDataset, int, int)
|
Number of AST nodes: 7
|
|
Number of AST nodes: 7
|
|
1 | if (seriesCount > 1) {↵ | | 1 | if (seriesCount > 1) {↵
|
2 | double seriesGap = dataArea.getHeight() * getItemMargin()↵ | | 2 | double seriesGap = dataArea.getWidth() * getItemMargin()↵
|
3 | / (categoryCount * (seriesCount - 1));↵ | | 3 | / (categoryCount * (seriesCount - 1));↵
|
4 | double usedWidth = (state.getBarWidth() * seriesCount)↵ | | 4 | double usedWidth = (state.getBarWidth() * seriesCount)↵
|
5 | + (seriesGap * (seriesCount - 1));↵ | | 5 | + (seriesGap * (seriesCount - 1));↵
|
6 | // offset the start of the boxes if the total width used is smaller↵ | | 6 | // offset the start of the boxes if the total width used is smaller↵
|
7 | // than the category width↵ | | 7 | // than the category width↵
|
8 | double offset = (categoryWidth - usedWidth) / 2;↵ | | 8 | double offset = (categoryWidth - usedWidth) / 2;↵
|
9 | yy = yy + offset + (row * (state.getBarWidth() + seriesGap));↵ | | 9 | xx = xx + offset + (row * (state.getBarWidth() + seriesGap));↵
|
10 | }↵ | | 10 | }↵
|
11 | else {↵ | | 11 | else {↵
|
12 | // offset the start of the box if the box width is smaller than↵ | | 12 | // offset the start of the box if the box width is smaller than the↵
|
13 | // the category width↵ | | 13 | // category width↵
|
14 | double offset = (categoryWidth - state.getBarWidth()) / 2;↵ | | 14 | double offset = (categoryWidth - state.getBarWidth()) / 2;↵
|
15 | yy = yy + offset;↵ | | 15 | xx = xx + offset;↵
|
16 | } | | 16 | }
|