com.approximatrix.charting.render
Class RadarChartRenderer

java.lang.Object
  extended by com.approximatrix.charting.render.AbstractChartRenderer
      extended by com.approximatrix.charting.render.RadarChartRenderer
All Implemented Interfaces:
Renderer

public class RadarChartRenderer
extends AbstractChartRenderer

This renderer creates a Radar chart.

Version:
1.0
Author:
tbee

Field Summary
private static float[] DOT1
           
private  boolean drawGrid
           
protected  int estimated_grid_steps
           
protected  java.awt.Color gridColor
          The color of grid lines
protected  java.awt.Stroke gridStroke
          The stroke to use for drawing grids
private static int LABEL_BUFFER
           
 
Fields inherited from class com.approximatrix.charting.render.AbstractChartRenderer
bounds, coord, listener, model, rcm, stopFlag
 
Constructor Summary
RadarChartRenderer(ChartDataModel model)
          Creates new RadarChartRenderer
RadarChartRenderer(CoordSystem cs, ChartDataModel model)
          Creates new RadarChartRenderer
 
Method Summary
private  double[] getScaling()
          Returns the max and min values in the model
 boolean isDrawGrid()
          Returns whether the grid is being drawn on the radar plot
 void renderChart(java.awt.Graphics2D g)
          Finally renders the Object in the Graphics object.
 void setDrawGrid(boolean value)
          Enables or disables drawing a grid in the radar plot
 
Methods inherited from class com.approximatrix.charting.render.AbstractChartRenderer
addRenderChangeListener, clearRenderChangeListeners, fireRenderChangeEvent, getBounds, getChartDataModel, getCoordSystem, getPreferredSize, getRowColorModel, getTransform, interruptRendering, removeRenderChangeListener, render, resetStopFlag, setBounds, setChartDataModel, setCoordSystem, setRowColorModel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LABEL_BUFFER

private static final int LABEL_BUFFER
See Also:
Constant Field Values

DOT1

private static final float[] DOT1

gridStroke

protected java.awt.Stroke gridStroke
The stroke to use for drawing grids


gridColor

protected java.awt.Color gridColor
The color of grid lines


estimated_grid_steps

protected int estimated_grid_steps

drawGrid

private boolean drawGrid
Constructor Detail

RadarChartRenderer

public RadarChartRenderer(ChartDataModel model)
Creates new RadarChartRenderer

Parameters:
model - the DataModel that should be rendered

RadarChartRenderer

public RadarChartRenderer(CoordSystem cs,
                          ChartDataModel model)
Creates new RadarChartRenderer

Parameters:
cs - the ClassicCoordSystem used to translate values into points
model - the DataModel that should be rendered
Method Detail

renderChart

public void renderChart(java.awt.Graphics2D g)
Finally renders the Object in the Graphics object.

Specified by:
renderChart in class AbstractChartRenderer
Parameters:
g - the Graphics2D object in which to render

getScaling

private double[] getScaling()
Returns the max and min values in the model

Returns:
a two element array of the max and min values

setDrawGrid

public void setDrawGrid(boolean value)
Enables or disables drawing a grid in the radar plot

Parameters:
value - true to draw grid and tick labels, false to skip drawing

isDrawGrid

public boolean isDrawGrid()
Returns whether the grid is being drawn on the radar plot

Returns:
true if the grid and labels are drawn, false otherwise