Java acxChart V 1.00
Version Française French
Main page
Home
[ aDraw | tCalDate | tListe | tEuroCalc | tCalEvent | tChart | tFunction | tOnglet | tCChat | tCount ]
[ aTicker | aFont | aSearch | tBBar | tMButton tButton tScroll | tPassword | Winmine ]
[ Home | Applets | Servlets | ASP components ]

INDEX



News V 1.00
VERSION 1.00
    This component is the extension of acxImage and of cChart It allows to generate dynamically graphs.
    If you wish further possibilities for this component, do not hesitate to contact us.
  • Support of the GIF and PNG format
  • Generation of the image without creating a temporary file.
  • Rotation of the texte
  • ...
Index



Description
acxChart is an ASP Component (Control ActiveX server) allowing to create dynamically a "chart". It runs with any standard graphs formats : bar, line, surface, arc of a circle, ...
It is possible to create this graph from a data base.
This component is written in Java and runs without problem on any PWS or IIS.
Index



Enregistrement
acxChart component is a FreeWare for non commercial sites, it means its use is free. For personal use, I'd like you to add a link to the author (http://www.javaside.com/) and send me the URL of the pages uses the acxChart component.
For professional / commercial use, you have to get a "professional registration". This registration allows you to use acxChart without reference to the author and I will send you back the complete acxChart source code.
If you want to use acxChart in another application, you must get a "professionnal registration".
For more informations about "Professional registration") : R. BERTHOU.

Index



ASP Source
<% 
        ' Declarations
        Dim sFormat     ' Format (gif/png)
        Dim h           ' Component
        Dim img         ' Image

        ' Reading of the parameters
        sFormat = Request.QueryString("format")
        if sFormat <> "png" AND sFormat <> "gif" then
           sFormat = "gif"
        end if

        ' Create component
        Set h = Server.CreateObject("javaside.Rbl.acxChart") 

        ' Init. and definition of the size of the image
        h.init 400, 300
        
        ' Definition of the used fonts
        h.setFontA "Dialog", 0, 8
        h.setFontTitre "Dialog", 1, 12
        h.setFontLegend "Arial", 0, 10

        ' Main data
        h.setCol(2) 
        h.addCol 0, 55255, "Triax2" 
        h.addCol 1, 255,   "Igalite"
        h.setTitle "Test acxChart ASP"
        h.setLegend "Semaine 42", "Nombre d'incidents"
        h.setRotate(true)
        h.setBkColor( -1 )

	' Definitions of the data
        h.addRow("Lun . ; 25 ; 32 ; ")
        h.addRow("Mar . ; 15 ; 21 ;")
        h.addRow("Mer . ; 20 ; 21 ;")
        h.addRow("Jeu . ; 14 ; 15 ;")
        h.addRow("Ven . ; 12 ; 16 ;")
        h.addRow("Sam . ; 15 ; 16 ;")
        h.addRow("Dim . ; 15 ; 17 ;")

	' Definitions iff the presentation
        h.setPress(1)

        ' Building of the image
        h.build(true)

        ' creation of the image at the desired format
        if sFormat = "png" then
        	img = h.getArray(1)
        else
        	img = h.getArray(0)
        end if

        ' Release all ressources
        h.clear()
        Set h = nothing 

        ' ---- Response format -----------
        Response.Expires = 0 
        Response.Buffer = TRUE
        Response.Clear
        Response.contenttype = "image/" & sFormat
        Response.BinaryWrite img
        Response.End
        ' ----- End Response -------------
%>
Index



Functions
This is the list of the open fonctions from your ASP code. Would you please read the samples to see the sequence of the appeals.
NomDescription
init(int w, int h) initialization of the image and definition of its size
setFontA(String sFace, int style, int size)
setFontTitre(String sFace, int style, int size)
setFontLegend(String sFace, int style, int size)
definition of the font (default, Title, Legend)
- sFace : name of the font (Dialog, SansSerif,...)
- style : style of the font (0 Normal, 1 Heavy, 2 Italic, 3 Heavy and Italic)
- size : size of the font (6...24)
setCol(int i) Definition of the number of columns
addCol(int iNb, int iColor, String sName) Definition of a column
iNb : Number of the column
iColor : color of the column
sName : Title / Name of the column
setTitle(String s)Definition of the Title
setLegend(String sX, sY) Definition of the axis Legends Ox et Oy
setRotate(boolean b) Run/Disable the rotation of the text
setBkColor(int iColor) Background color
-1 : transparent
setOrigine(int X, int Y)Modification of the origin Ox, Oy : default (40, 40)
addRow(String s) Add a line as a character sequence defined by a ";" : format
String s : Title of the line
Double d[] : Values
Sample : zz.addRow("Dim . ; 15 ; 17 ;")
setPress(int iPres)Definition of the presentation
  • 0 : Bars
  • 1 : Lines
  • 2 : Circle / Arc
  • 3 : Bar Sum
  • 4 : Not use
  • 5 : Surface
  • 6 : Surface Sum
  • 7 : Point
setXPress(boolean b1, boolean b2, boolean b3)Precision in the presentation
- b1 : Legend
- b2 : bullet de value
- b3 : bInter
setMinMax(double min, double max) modification of the min and max values
setUnit(String s)Definition of the display format of the numbers
build(boolean b) Creation of the image if b is "True" the informations with regard to the axis and legends are also displayed
getArray(int i) Recovery of a bytes table (0 : GIF format / 1 : PNG format)
clearData() Initialization of the data
saveAs(String s) Save the image
readFile(String f)Reading of the data from an external file
Index



History
In construction...

1.00Creation...

Retour Index



Download files
acxChart V 1.0 Francais acxChart_fr.zip (81 KB)      (backup)
acxImage V 1.0 English acxChart_us.zip (81 KB)      (backup)
Index



Install
    The installation of this component on your server is very easy.
    • You have to use Javareg.exe to add the definition of this component on the register base.
    • Then, to get it accessible to the JVM of Microsoft, you'd better copy these classes in c:\winnt\java\trustlib or c:\windows\java\trustlib

    • Example of a script reg.bat which deals with
      ; Javareg acxChart in package Rbl
         javareg /register /class:javaside.Rbl.acxChart /progid:javaside.Rbl.acxChart
      ; build Rbl directory
      ; change c:\windows with your directory (c:\winnt or other)
         mkdir c:\Windows\Java\TrustLib\javaside
         mkdir c:\Windows\Java\TrustLib\javaside\Rbl
         mkdir c:\Windows\Java\TrustLib\javaside\Rbl\util
      ; copy *.class to Rbl directory
         copy *.class c:\Windows\Java\TrustLib\javaside\Rbl
Index



Copyright © 1996..2003, BERTHOU. All right reserved.
Last change : 05 March 2003 18H20