org.sonar.api.charts
Class AbstractChart
java.lang.Object
  
org.sonar.api.charts.AbstractChart
- All Implemented Interfaces: 
 - Chart, Extension, ServerExtension
 
public abstract class AbstractChart
- extends Object
- implements Chart
  
An extension point to generate JFreeChart charts
- Since:
 
  - 1.10
 
 
 
 
 
| Methods inherited from interface org.sonar.api.charts.Chart | 
getKey | 
 
FONT_SIZE
public static final int FONT_SIZE
- See Also:
 - Constant Field Values
 
OUTLINE_COLOR
public static final Color OUTLINE_COLOR
GRID_COLOR
public static final Color GRID_COLOR
COLORS
public static final Color[] COLORS
AbstractChart
public AbstractChart()
getPlot
protected abstract org.jfree.chart.plot.Plot getPlot(ChartParameters params)
 
 
hasLegend
protected boolean hasLegend()
 
 
generateImage
public BufferedImage generateImage(ChartParameters params)
- Generates a JFreeChart chart using a set of parameters
- Specified by:
 generateImage in interface Chart
 
- Parameters:
 params - the chart parameters
- Returns:
 - the generated chart
 
 
 
toString
public String toString()
- Overrides:
 toString in class Object
 
 
configureColors
protected void configureColors(org.jfree.data.Values2D dataset,
                               org.jfree.chart.plot.CategoryPlot plot,
                               String[] colorsHex)
- Helper to set color of series. If the parameter colorsHex is null, then default Sonar colors are used.
 
 
 
Copyright © 2009-2010 SonarSource SA. All Rights Reserved.