Welcome to yasplot.sourceforge.net we need a logo as you see.
If you feel capable to do it, please send a mail to Alcee.
Thanks, and enjoy.





Documentation

Yasplot XML Configuration File


First of all a XML tree needs a root. You can give it the name you want, in this example the root name is : Graph1.

the root node :


<name></name> : a string for the name of the graph.
<debug></debug> : optionnal, a boolean to enable the debugging. default value = 0.
<ymin></ymin>,
<ymax></ymax>
: optionnal, force the y-coordinnate extremum. default value = the extremum of all the curves.
<xmin></xmin>,
<xmax></xmax>
: optionnal, force the x-coordinnate extremum. default value = the extremum of all the curves.
<CurveCfg></CurveCfg> : new node for curves' configuration (one at least)
<CaptionCfg></CaptionCfg> : new node for the caption's configuration (only one)
<ImageCfg></ImageCfg> : new tree configuration for the image configuration

the CurveCfg node :


<Curve></Curve> : new node for each curve

the Curve node


<name></name> : string for the name of the curve (print in the caption)
<lineColor></lineColor> : string for the color of the curve(defined in <ImageCfg>)
<lineStyle></lineStyle> : string for the style of the curve's line (dash, or not, dot, ...)
<dataFileName></dataFileName> : filename where to find the curve's data


the CaptionCfg node :


<name></name> : string for the name of the caption
<color></color> : string for the color of the caption
<textColor></textColor> : string for the color of the caption's text


the ImageCfg node :


<name></name> : optionnal, string for the name of the image
<file></file> : filename where to write the image. default value = "NoName".
<height></height> : not optionnal, integer for height of the image
<width></width> : not optionnal, integer for the width of the image
<extension></extension> : optionnal, string for the type of the image file (PNG, JPEG, ...)
<lang></lang> : optionnal, string for the language used in the image file. default value = "english"
<fontFile></fontFile> : optionnal, TTF file if you want to use freetype font. slowly.
<bgColor></bgColor> : not optionnal, string for the color of the image's background.
<transparentColor></transparentColor> : optionnal, string for the transparent color if you want one.
<titleDateFormat></titleDateFormat>: optionnal, strptime format string (see: man strptime), the title's format of the image. default value = "%m/%d/%Y %H:%M:%S".
<periodDayFormat></periodDayFormat>: optionnal, strptime format string (see: man strptime), the format of string X-graduation of the daily graph. default value = "%H:%M".
<periodWeekFormat></periodWeekFormat>: optionnal, strptime format string (see: man strptime), the format of string X-graduation of the weekly graph. default value = "%m/%d".
<periodMonthFormat></periodMonthFormat>: optionnal, strptime format string (see: man strptime), the format of string X-graduation of the monthly graph. default value = "%m/%d".
<periodYearFormat></periodYearFormat>: optionnal, strptime format string (see: man strptime), the format of string X-graduation of the yearly graph. default value = "%m/%Y".
<ColorCfg></ColorCfg>: new node for the colors' configuration.


the ColorCfg node :


<color></color> : new node for the colors' definition.


the color node :


<name></name> : string for the name of the color.
<R></R> : 0 <= integer <= 255 for the red part.
<G></G> : 0 <= integer <= 255 for the green part.
<B></B> : 0 <= integer <= 255 for the blue part.


Configuration file example



<?xml version="1.0" encoding="UTF-8"?>
<Graphe1>
<name>Graphe1</name>
<debug>0</debug>
<!--<ymin>82.256</ymin>
<ymax>82.965</ymax>-->
<CurveCfg>
  <Curve>
   <name>day</name>
   <lineColor>blue</lineColor>
   <lineStyle>3</lineStyle>
   <dataFileName>../data/dayss.dat</dataFileName>
  </Curve>
  <!--<Curve>
   <name>Week</name>
   <lineColor>green</lineColor>
   <lineStyle>2</lineStyle>
   <dataFileName>../data/week.dat</dataFileName>
  </Curve>-->
  <!--<Curve>
   <name>Month</name>
   <lineColor>purple</lineColor>
   <lineStyle>2</lineStyle>
   <dataFileName>../data/month.dat</dataFileName>
  </Curve>-->
</CurveCfg>
<CaptionCfg>
  <name>caption1</name>
  <color>black</color>
  <textColor>black</textColor>
</CaptionCfg>
<!--width and height MUST be defined before ColorCfg -->
<ImageCfg>
  <name>image1</name>
  <file>image1.png</file>
  <height>250</height>
  <width>1000</width>
  <extension>0</extension>
  <lang>french</lang>
  <!--<fontFile>/usr/share/fonts/truetype/msttcorefonts/Verdana.ttf</fontFile>-->
  <bgColor>white</bgColor>
  <!--<transparentColor>white</transparentColor>-->
  <!--<titleDateFormat>%d/%m/%Y</titleDateFormat>-->
  <periodDayFormat>%Hh</periodDayFormat>
  <ColorCfg>
   <!-- no more 256 colors definitions (limite libGD) -->
   <color>
    <name>white</name>
    <R>255</R>
    <G>255</G>
    <B>255</B>
   </color>
   <color>
    <name>black</name>
    <R>0</R>
    <G>0</G>
    <B>0</B>
   </color>
   <color>
    <name>purple</name>
    <R>255</R>
    <G>0</G>
    <B>255</B>
   </color>
   <color>
    <name>red</name>
    <R>255</R>
    <G>0</G>
    <B>0</B>
   </color>
   <color>
    <name>blue</name>
    <R>0</R>
    <G>0</G>
    <B>255</B>
   </color>
   <color>
    <name>green</name>
    <R>0</R>
    <G>255</G>
    <B>0</B>
   </color>
  </ColorCfg>
</ImageCfg>
</Graphe1>

For any question, please feel free to contact Alcee

Sourceforge Powered