List of usage examples for org.jfree.chart.plot SpiderWebPlot setURLGenerator
public void setURLGenerator(CategoryURLGenerator generator)
From source file:org.pentaho.plugin.jfreereport.reportcharts.RadarChartExpression.java
protected void configureChart(final JFreeChart chart) { super.configureChart(chart); //Create the stroke for the primary (= real) data series... final Stroke thick = new BasicStroke(thicknessprimaryseries); //...and apply that stroke to the series final SpiderWebPlot webPlot = (SpiderWebPlot) chart.getPlot(); webPlot.setLabelFont(Font.decode(getLabelFont())); if (StringUtils.isEmpty(getTooltipFormula()) == false) { webPlot.setToolTipGenerator(new FormulaCategoryTooltipGenerator(getRuntime(), getTooltipFormula())); }// www . j av a 2s .c om if (StringUtils.isEmpty(getUrlFormula()) == false) { webPlot.setURLGenerator(new FormulaCategoryURLGenerator(getRuntime(), getUrlFormula())); } final CategoryDataset categoryDataset = webPlot.getDataset(); final int count = categoryDataset.getRowCount(); for (int t = 0; t < count; t++) { if (categoryDataset.getRowKey(t) instanceof GridCategoryItem) { continue; } webPlot.setSeriesOutlineStroke(t, thick); } //Set the spiderweb filled (or not) webPlot.setWebFilled(radarwebfilled); //Set the size of the datapoints on the axis webPlot.setHeadPercent(headsize); //Set the color of the fake datasets (gridlines) to grey for (int t = 0; t < count; t++) { if (categoryDataset.getRowKey(t) instanceof GridCategoryItem) { webPlot.setSeriesPaint(t, Color.GRAY); } } }