RCHART TUTORIAL, Chapter 8

Copyright 2003, J4L Components (http://www.java4less.com)

Go bak to contents


Radarchart configuration

This is a complete example of a radar chart:

 
Parameters
Description
Equivalent Java[TM] class/property
  WIDTH=390
HEIGHT=300
TITLECHART=Costs analysis
SERIE_1=Product A
SERIE_2=Product B
SERIE_TYPE_1=RADAR
SERIE_TYPE_2=RADAR SERIE_FONT_1=Arial|PLAIN|8 SERIE_FONT_2=Arial|PLAIN|8 SERIE_DATA_1=12|73|50|95 SERIE_DATA_2=20|41|60|10 SERIE_STYLE_1=0.2|BLUE|LINE SERIE_STYLE_2=0.2|GREEN|LINE SERIE_FILL_1=BLUE
SERIE_POINT_1=true
SERIE_POINT_2=true SERIE_POINT_COLOR_1=BLUE SERIE_POINT_COLOR_2=GREEN RADARCHART_BACK=WHITE RADARCHART_BORDER=0.2|BLACK|LINE RADARCHART_FAKTOR_COLOR=BLACK RADARCHART_FAKTOR_FONT=Arial|PLAIN|12 RADARCHART_FAKTOR_MAX=100|100|100|100 RADARCHART_FAKTOR_MIN=0|0|0|0 RADARCHART_FAKTOR_NAMES=R & D|Distribution|Marketing|other RADARCHART_GRID=0.2|GRAY|DASHED RADARCHART_GRID_FONT=Arial|PLAIN|8 RADARCHART_GRID_FONT_COLOR=GRAY RADARCHART_RADIUS=0.8 CHART_BORDER=0.2|0x0|NORMAL CHART_FILL=0xccffcc

Size
Size
Title

Name of series
Name of series
Radarchart type
Radarchart type
Fonts
Fonts
Values to plot (series 1).

Values to plot (series 2).
Style of lines
Style of lines
Serie 1 should be filled (blue area)
Draw points
Draw points
Color of points
Color of points
Background of chart area
Border of radarchart
Color of fonts
Font
Max. values of the axis (faktors)
Min. values of the axis (faktors)
Names of the axis (faktors)

Style of grid.
Font of gid labels
Color of grid labels
Size of radarchart (default is 0.9)
Chart's border
Chart's background

radarPlotter=new RadarPlotter();

 

serie1=new LineDataSerie(values,lstyle);
serie2=new LineDataSerie(values,lstyle);

serie1.valueFont=new Font(...);

 

 

serie1.fillStyle=FillStyle(Color.Blue);
serie1.drawPoint=true;

serie1.pointColor= Color.Blue;

radarPlotter.backStyle=new FillStyle(...);
radarPlotter.border=new LineStyle(...);
radarPlotter.faktorColor=java.awt.Color.black;
radarPlotter.faktorFont=new Font(...);
radarPlotter.faktorMaxs={100,100,100,100};
radarPlotter.faktorMins={0,0,0,0};
radarPlotter.faktorNames={"R & D", ....};

radarPlotter.gridStyle=new LineStyle(...);
radarPlotter.gridFont= new Font(...);
radarPlotter.gridFontColor=java.awt.Color.gray;
radarPlotter.radiusModifier=0.8;

 

It is also possible to have more than 4 factors (axis). In the following example we have a new axis called "NEW" whose scale is different from the others, 0 to 200.

 
Parameters
Description
Equivalent Java[TM] class/property
  SERIE_DATA_1=12|73|50|95|120 SERIE_DATA_2=20|41|60|10|20 RADARCHART_FAKTOR_MAX=100|100|100|100|200 RADARCHART_FAKTOR_MIN=0|0|0|0|0 RADARCHART_FAKTOR_NAMES=R & D|Distribution|Marketing|other|NEW

Values to plot (series 1).
Values to plot (series 2).
Max. values of the axis (faktors)
Min. values of the axis (faktors)
Names of faktors

See above

 

It is also possible to have a circular radar chart using the following parameters:

 
Parameters
Description
Equivalent Java[TM] class/property
 

RADARCHART_CIRCLE=TRUE
RADARCHART_TICKS=4 RADARCHART_FAKTOR_COLOR=0xff0000 RADARCHART_FAKTOR_FONT=Dialog|ITALIC|12

Circular chart
Number of lines in grid
(defualt is 5)
Color of faktors' names is RED
Font os faktors' names

radarPlotter.drawCircle=true;
radarPlotter.ticks=4;

 

You can use different colors for each factor name using the following parameter:

 
Parameters
Description
Equivalent Java[TM] class/property
 

RADARCHART_FAKTOR_COLORS=RED|BLUE|GREEN|GRAY|BLACK

List of colors

radarPlotter.faktorColors

 

The following 2 parameters allows you to change the color of the points, depending on the value:

 

Example:

 
Parameters
Description
Equivalent Java[TM] class/property
 

RADARCHART_POINT_COLORS_SCALE=20|40|60|80 RADARCHART_POINT_COLORS=0xffff00|0xffc800|0xff0000|0xcc3333|0x0

Scale
Colors

radarPlotter.pointColorsScale
radarPlotter.pointColors

values under 20 will have a yellow point, values between 20 and 40 will have an orange color, values beetwen 40 and 60 will have a red color, values beetwen 60 and 80 will have a dark red color and values above 80 will have a black point.