RCHART TUTORIAL, Chapter 1
Copyright 2003, J4L
Components (http://www.java4less.com)
Go bak to contents
RChart , first steps.
Installation
The installation of RChart is very simple:
- download the evaluation version from http://www.java4less.com.
- Unzip the file you have downloaded in an empty directory. Make sure you
unzip also the subdirectories.
Note about the evaluation version: the evaluation version has the following
restrictions:
- it plots a maximum of 8 values.
- it plots a maximum of 3 series
- it displays always the "RChart demo" text in the legend.
In order to install the purchased version you must unzip the following files
in an empty directory:
- rchart.zip. This file contains the main files.
- rchartVB.zip. This file contains RChart Visual Builder (if you have purchased
it)
- rchagl.zip (or rchaglsr.zip) This file contains RChart Gold version (if
you have purchased it). It will overwritte the rchart.jar file.
- rchasr.zip: This file contains the source code (if you have purchased it).
You need to unzip it if you want to recompile the applet using Mini-chart.
Note: it could happen that you still see the evaluation version in your
browser even after installing the registered version. This can happen if your
server or browser has cached the evaluation version. In this case we recommend
to delete all copies of rchart.jar, delete the browser's cache and temporary
files, restsart your computer and install the registered version again.
Where
to start
As starting point we recommend you not to create a chart from scratch but to
take one of the examples we provide and start working by modifying them. We
provide examples for:
- RChart running as applet (see examples.html in the evaluation version).
- RChart running as servlet (see subdirectory examples in the evaluation
version).
- And charts created using Java[TM] code (see CharApp.java in the evaluation
version). In this case you can also create the parameters and build the chart
using the chartLoader class (see Javadoc[TM]).
In all cases the fastest way of changing and testing parameters is by using
RChart Visual Builder.
Format
of the parameters
There are some parameters that have a special format:
- Colors: valid values are: RED,BLUE,GREEN,BLACK,GRAY,LIGHTGRAY,WHITE,DARKGRAY,YELLOW,ORANGE,CYAN
and MAGENTA. You can also use the RGB numeric value of a color as parameter.
For example "0xFF0000" is red (RGB format), "00x00FF00"
is green and so on.
- Line styles have the format <width>|<color>|<style>.
Style can be LINE, DASHED or DOTS. Example: "0.2|RED|LINE"
- Fonts have the format <font name>|<style>|<size>.
Style can be PLAIN, ITALIC or BOLD. Example: "Arial|BOLD|12"
- Fill style: like color.
- List of values. List of values a separated by "|"
You can define transparency in Fill and line styles using an additional parameter:
- Line styles have the format <width>|<color>|<style>|<transparency>
- Fill style: <color>|<transparency>
where <transparency> is a value between 0 (full transparent) and 1 (opaque).
We recommend 0.5.
Note 1: transparency will only work for jdk 1.2 or later (previous versions
will ignore it).