use of org.jfree.chart.axis.CategoryAnchor in project SIMVA-SoS by SESoS.
the class CategoryPlot method drawDomainGridlines.
/**
* Draws the domain gridlines for the plot, if they are visible.
*
* @param g2 the graphics device.
* @param dataArea the area inside the axes.
*
* @see #drawRangeGridlines(Graphics2D, Rectangle2D, List)
*/
protected void drawDomainGridlines(Graphics2D g2, Rectangle2D dataArea) {
if (!isDomainGridlinesVisible()) {
return;
}
CategoryAnchor anchor = getDomainGridlinePosition();
RectangleEdge domainAxisEdge = getDomainAxisEdge();
CategoryDataset dataset = getDataset();
if (dataset == null) {
return;
}
CategoryAxis axis = getDomainAxis();
if (axis != null) {
int columnCount = dataset.getColumnCount();
for (int c = 0; c < columnCount; c++) {
double xx = axis.getCategoryJava2DCoordinate(anchor, c, columnCount, dataArea, domainAxisEdge);
CategoryItemRenderer renderer1 = getRenderer();
if (renderer1 != null) {
renderer1.drawDomainGridline(g2, this, dataArea, xx);
}
}
}
}
Aggregations