SGR Generate Graph-EN : Différence entre versions

De BlueWiki
(Paramètres)
Ligne 19 : Ligne 19 :
 
|Pointer to a text array that contains the name of the parameters, this array must have the same size as the array of parameter values ​​of the graph
 
|Pointer to a text array that contains the name of the parameters, this array must have the same size as the array of parameter values ​​of the graph
  
Les valeurs possible de paramètre du graphe sont les suivantes :
+
Possible values ​​of the parameter of the graph are the following:
 
# - "Titre" or "Title" : graph title
 
# - "Titre" or "Title" : graph title
 
# - "Orientation du graphe" or "GraphOrientation" : Orientation of the x-axis
 
# - "Orientation du graphe" or "GraphOrientation" : Orientation of the x-axis

Version du 8 décembre 2013 à 02:05

French version

Paramètres


Parameters Type Parameter # Description


Name of Graph's parameters Pointer caption 1 Pointer to a text array that contains the name of the parameters, this array must have the same size as the array of parameter values ​​of the graph

Possible values ​​of the parameter of the graph are the following:

  1. - "Titre" or "Title" : graph title
  2. - "Orientation du graphe" or "GraphOrientation" : Orientation of the x-axis
  3. - "Titre axe abscisses" or "abscissaName" : Name of the x-axis
  4. - "Titre des ordonnés" or "ordinateName" : Names of the y-axis
  5. - "Affichage de la légende" or "ShowLegend" : Display the legend "yes" or "no"
  6. - "Couleur de fond du graphe" or "GraphBGColor" : Background color of the graph
  7. - "ForcingScalesToZero" : Zero forcing scales "Yes" ou "no"
  8. - "Police du graphe" or "GraphFont" : Font legends and scales
  9. - "alignement du titre" or "TitleAlignement" : Title Alignment 0,1,2,3
Parameter values ​​of the graph pointer caption 2 Pointer to the array of parameter values this array must be the same size as the previous


Series names pointer caption 3 Pointer to the array of the labels series
ordinate pointer caption 4 Pointer to the array of values ​​of the ordinates
Values pointer caption 5 Pointer to 2D array of values ​​for series (numérique array)
Drawing curves parameters pointer caption 6 Pointer to the array of 2D text tracing parameters

1.Curve Type

  • "Aire" or "Area"
  • "Aire empilée" or "Area stacked"
  • "Aire proportionelle" or "Percentage Area"
  • "Aire enveloppe" or "Area range"
  • "Barre" or "Bar"
  • "Barre empilée" or "Stacked bar"
  • "Barre proportionnelle" or "Stacked percentage bar"
  • "Barre enveloppe" or "Bar range"
  • "Courbe" or "Line"
  • "Courbe empilée" or "Stacked Line"
  • "Point"

2.Color

3.Tracing plan (not active yet)

4.Unit

5.Number of decimals when displaying values

6.marks on values ​​(only for areas and curves) no/square/circle/diamond/star/triangle/inverted triangle

7.Display values

  • no
  • V-InsideTop (only for bars)
  • V-InsideBottom (only for bars)
  • V-Outside
  • H-Outside or yes(default)

8.Size of the display font values

9.Opacity

10.Number of white pixels around the symbols


Specific parameters for curves

11.Start color for the gradient for curves, if you specify a start value gradient for a curve, you must specify a color gradient to end, if you do not do it, the gradient will not be displayed

12.End color for the gradient for curves


Values 2 pointer caption 5 Pointer to the actual 2D array of values ​​for the second sets of curves "envelope" type
Graph Picture caption Retour Image including the SVG code

Description

Sample Code

ARRAY TEXT($nom_courbe;5)
ARRAY TEXT($ordonnée;12)
ARRAY REAL($value;5;12)

ARRAY TEXT($DataGrapheName;0)
ARRAY TEXT($DataGraphe;0)
APPEND TO ARRAY($DataGrapheName;"Title")
APPEND TO ARRAY($DataGraphe;"Sales")  // 1 - Titre du graphe

APPEND TO ARRAY($DataGrapheName;"GraphOrientation")
APPEND TO ARRAY($DataGraphe;"vertical")  // orientation of the X axis

APPEND TO ARRAY($DataGrapheName;"abscissaName")
APPEND TO ARRAY($DataGraphe;"Period")  // Name of the X axis

APPEND TO ARRAY($DataGrapheName;"ordinateName")
APPEND TO ARRAY($DataGraphe;"Euro (€)")  // Name of the y axis values

APPEND TO ARRAY($DataGrapheName;"ShowLegend")
APPEND TO ARRAY($DataGraphe;"yes")  // Display the legend

APPEND TO ARRAY($DataGrapheName;"GraphBGColor")
APPEND TO ARRAY($DataGraphe;"White")  // Graph background color

APPEND TO ARRAY($DataGrapheName;"ForcingScalesToZero")
APPEND TO ARRAY($DataGraphe;"yes")  // Zero forcing scales

APPEND TO ARRAY($DataGrapheName;"GraphFont")
APPEND TO ARRAY($DataGraphe;"Arial")  // Font for all the graph

 //Setting the different curves
ARRAY TEXT($info_courbe;5;12)  //Number of curves multiplied by their 12 parameters
$info_courbe{1}{1}:="Courbe"  //type
$info_courbe{1}{2}:="dodgerblue"  //Color
$info_courbe{1}{3}:="2"  //Drawing order
$info_courbe{1}{4}:="Euro (€)"  //Unity
$info_courbe{1}{5}:="0"  //Nbre de décimales
$info_courbe{1}{6}:="Carré"  //Symbol values (Only for curve, point and area) no/circle/diamond/star/triangle/inverted triangle/square
$info_courbe{1}{7}:="no"  //Display values
$info_courbe{1}{8}:="no"  //Font size for values
$info_courbe{1}{9}:="75"  //Opacity


$info_courbe{2}{1}:="aire"
$info_courbe{2}{2}:="gold"
$info_courbe{2}{3}:="2"
$info_courbe{2}{4}:="Euro (€)"
$info_courbe{2}{5}:="0"
$info_courbe{2}{6}:="No"
$info_courbe{2}{7}:="Yes"
$info_courbe{2}{9}:="60"


$info_courbe{3}{1}:="Aire"
$info_courbe{3}{2}:="orchid"
$info_courbe{3}{3}:="2"
$info_courbe{3}{4}:="Euro (€)"
$info_courbe{3}{5}:="0"
$info_courbe{3}{6}:="No"
$info_courbe{3}{7}:="Yes"
$info_courbe{3}{8}:="24"
$info_courbe{3}{9}:="50"


$info_courbe{4}{1}:="Barre"
$info_courbe{4}{2}:="Orange"
$info_courbe{4}{3}:="3"
$info_courbe{4}{4}:="Euro (€)"
$info_courbe{4}{5}:="0"
$info_courbe{4}{6}:="Yes"
$info_courbe{4}{7}:="No"
$info_courbe{4}{8}:="24"
$info_courbe{4}{9}:="75"


$info_courbe{5}{1}:="barre"
$info_courbe{5}{2}:="red"
$info_courbe{5}{3}:="1"
$info_courbe{5}{4}:="Euro (€)"
$info_courbe{5}{5}:="0"
$info_courbe{5}{6}:="no"
$info_courbe{5}{7}:="No"
$info_courbe{5}{9}:="75"

$nom_courbe{1}:="Revenue"
$nom_courbe{2}:="Revenue Y-1"
$nom_courbe{3}:="Target revenue"
$nom_courbe{4}:="Spread with previous year"
$nom_courbe{5}:="Other data"


 //Generation and filling data
For ($i;1;12)
$ordonnée{$i}:=String($i)+"/ 2013"
End for 

For ($i;1;12)
$Value{1}{$i}:=(Random%(301))-150
$Value{2}{$i}:=(Random%(601))+100
$Value{3}{$i}:=(Random%(51))+350
$Value{4}{$i}:=$Value{2}{$i}-$Value{1}{$i}
$Value{5}{$i}:=(Random%(601))-100
End for 

TheGraphe:=SGR_Generate_Graph (->$DataGrapheName;->$DataGraphe;->$nom_courbe;->$ordonnée;->$value;->$info_courbe)