@Override protected JFreeChart createChart(final CategoryDataset dataSet) { return createAreaChart(dataSet); }
@Override protected Color[] getColors() { if (useThreeColors()) { return new Color[] {ColorPalette.BLUE, ColorPalette.YELLOW, ColorPalette.RED}; } else { return new Color[] {ColorPalette.BLUE, ColorPalette.RED}; } } }
/** * Returns the sorted list of available graphs. * * @return the available graphs */ @SuppressWarnings("NP") protected List<BuildResultGraph> getAvailableGraphs() { List<BuildResultGraph> availableGraphs = Lists.newArrayList(); availableGraphs.add(new NewVersusFixedGraph()); availableGraphs.add(new PriorityGraph()); availableGraphs.add(new TotalsGraph()); if (hasValidResults()) { availableGraphs.add(new HealthGraph(getLastAction().getHealthDescriptor())); } else { availableGraphs.add(new HealthGraph(new NullHealthDescriptor())); } availableGraphs.add(new DifferenceGraph()); availableGraphs.add(new EmptyGraph()); availableGraphs.add(new NullGraph()); return availableGraphs; }
@java.lang.SuppressWarnings("serial") @SuppressFBWarnings("SIC") @Override protected CategoryItemRenderer createRenderer(final GraphConfiguration configuration, final String pluginName, final ToolTipProvider toolTipProvider) { SerializableUrlGenerator urlGenerator = new CategoryUrlBuilder(getRootUrl(), pluginName); SerializableToolTipGenerator toolTipGenerator = new SerializableToolTipGenerator() { @Override public String generateToolTip(final CategoryDataset dataset, final int row, final int column) { int number = 0; for (int index = 0; index < dataset.getRowCount(); index++) { Number value = dataset.getValue(index, column); if (value != null) { number += value.intValue(); } } return toolTipProvider.getTooltip(number); } }; if (configuration.useBuildDateAsDomain()) { return new ToolTipAreaRenderer(toolTipGenerator); } else { return new AreaRenderer(urlGenerator, toolTipGenerator); } } // CHECKSTYLE:ON
/** * Returns the sorted list of available graphs. * * @return the available graphs */ @SuppressWarnings("NP") protected List<BuildResultGraph> getAvailableGraphs() { List<BuildResultGraph> availableGraphs = Lists.newArrayList(); availableGraphs.add(new NewVersusFixedGraph()); availableGraphs.add(new PriorityGraph()); availableGraphs.add(new TotalsGraph()); if (hasValidResults()) { availableGraphs.add(new HealthGraph(getLastAction().getHealthDescriptor())); } else { availableGraphs.add(new HealthGraph(new NullHealthDescriptor())); } availableGraphs.add(new DifferenceGraph()); availableGraphs.add(new EmptyGraph()); availableGraphs.add(new NullGraph()); if (!GlobalSettings.instance().getNoAuthors()) { availableGraphs.add(new AnnotationsByUserGraph()); } return availableGraphs; }
/** {@inheritDoc} */ @java.lang.SuppressWarnings("serial") @SuppressWarnings("SIC") @Override protected CategoryItemRenderer createRenderer(final GraphConfiguration configuration, final String pluginName, final ToolTipProvider toolTipProvider) { SerializableUrlGenerator urlGenerator = new CategoryUrlBuilder(getRootUrl(), pluginName); SerializableToolTipGenerator toolTipGenerator = new SerializableToolTipGenerator() { /** {@inheritDoc} */ public String generateToolTip(final CategoryDataset dataset, final int row, final int column) { int number = 0; for (int index = 0; index < dataset.getRowCount(); index++) { Number value = dataset.getValue(index, column); if (value != null) { number += value.intValue(); } } return toolTipProvider.getTooltip(number); } }; if (configuration.useBuildDateAsDomain()) { return new ToolTipAreaRenderer(toolTipGenerator); } else { return new AreaRenderer(urlGenerator, toolTipGenerator); } } // CHECKSTYLE:ON
@Override protected Color[] getColors() { if (useThreeColors()) { return new Color[] {ColorPalette.BLUE, ColorPalette.YELLOW, ColorPalette.RED}; } else { return new Color[] {ColorPalette.BLUE, ColorPalette.RED}; } } }
@Override protected JFreeChart createChart(final CategoryDataset dataSet) { return createAreaChart(dataSet); }