Component Command List - Version française
Parameters
Parameters
|
Type
|
|
Parameter #
|
Description
|
Name of Graph's parameters
|
Pointer
|
|
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:
General parameters of the graph
- "Police du graphe" ou "GraphFont" : Title and legends font font (default : arial)
- "SVGFile" ou "Fichier SVG" : path to the base map in the "resource" 4D folder
- "ShowLegend" ou "Affichage d'une légende" : display a legend
- "LegendLanguage" ou "Langue de la légende" : legend language, French or English (default: french)
- "GraphBGColor" ou "Couleur de fond du graphe" : Background color of the table
- "GraphBGColor2" ou "Couleur 2 de fond du graphe" : Second background color of the graph, if you specify a second color which is different from the first you will get a gradient
Title parameters
- "Titre" or "Title" : graph title
- "alignement du titre" ou "TitleAlignement" : Title Alignment 0,1,2,3
- "TitleFontSize" ou "Taille de la police du titre" : Title font size
- "TitleFontStyle" ou "Style de la police du titre" : Title font style (ex (bold+italic))
- "TitleFontColor" ou "Couleur de la police du titre" : Title font color
- "TitleVerticalOffSet" or "Décalage vertical du titre" : Vertical offset in px for fine adjustment of its position
|
Parameter values of the graph
|
pointeur
|
|
2
|
Pointer to the text array of parameter values this array must be the same size as the previous
|
Limits
|
Pointeur
|
|
3
|
Pointer to the array (real) of limit values of level of values
|
Colors
|
Pointeur
|
|
4
|
Pointer to the array (text) colors to be applied to the representation, you must define one more color than you have specified limit values
|
ZoneID
|
Pointeur
|
|
5
|
Pointer to the array (text) ID table zones to set color
|
Values
|
Pointeur
|
|
6
|
Pointer to the array (real) to values corresponding to each ID to calculate the color based on limits
|
Result
|
Image
|
|
7
|
Image including SVG code
|
Description
This command allows colorizing a base map function of values and color gradients.
Zones are listed by their ID and manipulated from thereof.
Code example
// Method : Exemple_carte1
// Description
//
//
// Parameters
// ----------------------------------------------------
ARRAY TEXT($DataGrapheName;0)
ARRAY TEXT($DataGraphe;0)
APPEND TO ARRAY($DataGrapheName;"Title")
APPEND TO ARRAY($DataGraphe;"Répartition géographique des ventes") // 1 - Titre du graphe
APPEND TO ARRAY($DataGrapheName;"SVGFile")
APPEND TO ARRAY($DataGraphe;"Fond_de_carte_France"+Folder separator+"departements.svg")
APPEND TO ARRAY($DataGrapheName;"GraphFont")
APPEND TO ARRAY($DataGraphe;"Arial") // Police des légendes et des échelles
APPEND TO ARRAY($DataGrapheName;"GraphBGColor")
APPEND TO ARRAY($DataGraphe;"LightBlue:30") // Couleur du fond
APPEND TO ARRAY($DataGrapheName;"ShowLegend")
APPEND TO ARRAY($DataGraphe;"Oui") // Affichage de la légende
APPEND TO ARRAY($DataGrapheName;"LegendLanguage")
APPEND TO ARRAY($DataGraphe;"English") // Affichage de la légende
ARRAY REAL($valeur_limite;3)
$valeur_limite{1}:=30
$valeur_limite{2}:=60
$valeur_limite{3}:=90
ARRAY TEXT($couleur;3)
$couleur{0}:="aquamarine"
$couleur{1}:="deepskyblue"
$couleur{2}:="dodgerblue"
$couleur{3}:="midnightblue"
ARRAY REAL($Value;95)
ARRAY TEXT($ZoneID;95)
For ($i;1;95)
$ZoneID{$i}:=String($i;"00")
$Value{$i}:=(Random%(101))
End for
$ZoneID{20}:="2A"
INSERT IN ARRAY($ZoneID;21;1)
$ZoneID{21}:="2B"
INSERT IN ARRAY($Value;21;1)
$Value{21}:=$Value{20}
TheGraphe:=SGR_DrawMap (->$DataGrapheName;->$DataGraphe;->$valeur_limite;->$couleur;->$ZoneID;->$Value)