|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.java4less.rchart.ChartComponent | +--com.java4less.rchart.Plotter | +--com.java4less.rchart.RadarPlotter
Class used to plot radar charts. The following example shows how to create a radar chart: // data to plot double[] d1={1,2,3,4,5}; double[] d2={2,3,4,4.2,3}; // create data series LineDataSerie data1= new LineDataSerie(d1,new LineStyle(2f,GraphicsProvider.getColor(ChartColor.BLUE),LineStyle.LINE_NORMAL)); data1.drawPoint=true; data1.valueFont=GraphicsProvider.getFont("Arial",ChartFont.BOLD,10); LineDataSerie data2= new LineDataSerie(d2,new LineStyle(2f,GraphicsProvider.getColor(ChartColor.GREEN),LineStyle.LINE_NORMAL)); data2.drawPoint=true; data2.valueFont=GraphicsProvider.getFont("Arial",ChartFont.BOLD,10); data2.fillStyle=new FillStyle(GraphicsProvider.getColor(ChartColor.GREEN)); // create legend Legend l=new Legend(); l.background=new FillStyle(GraphicsProvider.getColor(ChartColor.WHITE)); l.border=new LineStyle(0.2f,GraphicsProvider.getColor(ChartColor.BLACK),LineStyle.LINE_NORMAL); l.addItem("Products",new LineStyle(0.2f,GraphicsProvider.getColor(ChartColor.BLUE),LineStyle.LINE_NORMAL)); l.addItem("Services",new LineStyle(0.2f,GraphicsProvider.getColor(ChartColor.GREEN),LineStyle.LINE_NORMAL)); // create title Title title=new Title("Sales (thousands $)"); // create plotter RadarPlotter plot=new RadarPlotter(); double[] fMaxs={6,6,6,6,6}; double[] fMins={0,0,0,0,0}; String[] factors={"Factor1","Factor2","Factor3","Factor4","Factor5","Factor6"}; plot.factorMaxs=fMaxs; plot.factorMins=fMins; plot.factorNames=factors; plot.backStyle=new FillStyle(GraphicsProvider.getColor(ChartColor.YELLOW)); plot.gridStyle=new LineStyle(0.2f,GraphicsProvider.getColor(ChartColor.BLACK),LineStyle.LINE_DASHED); plot.gridFont=GraphicsProvider.getFont("Arial",ChartFont.PLAIN,10); // create chart using radar plotter com.java4less.rchart.Chart chart=new Chart(title,plot,null,null); chart.back=new FillStyle(GraphicsProvider.getColor(ChartColor.RED)); chart.back.gradientType=FillStyle.GRADIENT_HORIZONTAL; chart.legend=l; // add data series to the chart chart.addSerie(data2); chart.addSerie(data1);
Field Summary | |
FillStyle |
backStyle
back style to fill the chart |
boolean |
drawCircle
if true a circle will be painted around the radarchart |
ChartColor |
factorColor
color used to paint the factors |
ChartColor[] |
factorColors
color of the factor labels |
ChartFont |
factorFont
font used to paint the factors |
double[] |
factorMaxs
maximum values ofd the factors. |
double[] |
factorMins
minimum vaues of the factors. |
java.lang.String[] |
factorNames
names of the factors |
ChartFont |
gridFont
grid's font |
ChartColor |
gridFontColor
grid's font color |
LineStyle |
gridStyle
grid's line style |
ChartColor[] |
pointColors
color of the points. |
double[] |
pointColorScale
ascending list of values used to select the color of the point. |
double |
radiusModifier
modifies the size of thechart. |
java.lang.String |
tickLabelFormat
format of the tick labels |
int |
ticks
number of ticks in scale |
Fields inherited from class com.java4less.rchart.Plotter |
back, backImage, depth, visibleHeight, visibleWidth, XScale, Y2Scale, YScale |
Fields inherited from class com.java4less.rchart.ChartComponent |
height, width, x, y |
Constructor Summary | |
RadarPlotter()
constructor |
Methods inherited from class com.java4less.rchart.Plotter |
addSerie, getCombinable, getNeedsAxis, getSerie, getSeriesCount, plot, plotBackground, replaceSerie, setSerie |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public double radiusModifier
public boolean drawCircle
public java.lang.String[] factorNames
public ChartColor[] factorColors
public double[] factorMins
public double[] factorMaxs
public ChartFont factorFont
public ChartColor factorColor
public LineStyle gridStyle
public ChartFont gridFont
public ChartColor gridFontColor
public int ticks
public java.lang.String tickLabelFormat
public FillStyle backStyle
public ChartColor[] pointColors
public double[] pointColorScale
Constructor Detail |
public RadarPlotter()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |