SGR DrawMap-EN : Différence entre versions
De BlueWiki
(Page créée avec « Component Command List Version française === Parameters === ») |
(→Code example) |
||
(12 révisions intermédiaires par un utilisateur sont masquées) | |||
Ligne 1 : | Ligne 1 : | ||
− | [[Composant_Graphe_SVG-EN#Commands|Component Command List ]] | + | [[Composant_Graphe_SVG-EN#Commands|Component Command List ]] - [[SGR_DrawMap|Version française]] |
− | + | ||
− | [[SGR_DrawMap|Version française]] | + | |
=== Parameters === | === Parameters === | ||
+ | ---- | ||
+ | {| class="wikitable" | ||
+ | |||
+ | !Parameters | ||
+ | !Type | ||
+ | ! | ||
+ | !Parameter # | ||
+ | !Description | ||
+ | |- | ||
+ | |valign="top"|Name of Graph's parameters | ||
+ | |valign="top"|Pointer | ||
+ | |valign="top"|[[File:in.png|caption]] | ||
+ | |valign="top" align="center"|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 | ||
+ | |||
+ | |||
+ | |- | ||
+ | |valign="top"|Parameter values of the graph | ||
+ | |valign="top"|pointeur | ||
+ | |valign="top"|[[File:in.png|caption]] | ||
+ | |valign="top" align="center"|2 | ||
+ | |Pointer to the text array of parameter values this array must be the same size as the previous | ||
+ | |||
+ | |- | ||
+ | |valign="top"|Limits | ||
+ | |valign="top"|Pointeur | ||
+ | |valign="top"|[[File:in.png|caption]] | ||
+ | |valign="top" align="center"|3 | ||
+ | |Pointer to the array (real) of limit values of level of values | ||
+ | |||
+ | |- | ||
+ | |valign="top"|Colors | ||
+ | |valign="top"|Pointeur | ||
+ | |valign="top"|[[File:in.png|caption]] | ||
+ | |valign="top" align="center"|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 | ||
+ | |||
+ | |- | ||
+ | |valign="top"|ZoneID | ||
+ | |valign="top"|Pointeur | ||
+ | |valign="top"|[[File:in.png|caption]] | ||
+ | |valign="top" align="center"|5 | ||
+ | |Pointer to the array (text) ID table zones to set color | ||
+ | |||
+ | |- | ||
+ | |valign="top"|Values | ||
+ | |valign="top"|Pointeur | ||
+ | |valign="top"|[[File:in.png|caption]] | ||
+ | |valign="top" align="center"|6 | ||
+ | |Pointer to the array (real) to values corresponding to each ID to calculate the color based on limits | ||
+ | |||
+ | |- | ||
+ | |Result | ||
+ | |Image | ||
+ | |[[File:out.png|caption]] | ||
+ | |valign="top" align="center"|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=== | ||
+ | ---- | ||
+ | |||
+ | [[File:CarteSVG.jpg|500px]] | ||
+ | |||
+ | |||
+ | // 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) |
Version actuelle en date du 2 juillet 2014 à 19:42
Component Command List - Version française
[modifier] Parameters
[modifier] Description
This command allows colorizing a base map function of values and color gradients.
Zones are listed by their ID and manipulated from thereof.
[modifier] 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)