SGR DrawMap-EN : Différence entre versions

De BlueWiki
(Parameters)
(Parameters)
Ligne 39 : Ligne 39 :
  
 
|-
 
|-
|valign="top"|Valeurs des paramètres du graphe
+
|valign="top"|Parameter values ​​of the graph
 
|valign="top"|pointeur
 
|valign="top"|pointeur
 
|valign="top"|[[File:in.png|caption]]
 
|valign="top"|[[File:in.png|caption]]
 
|valign="top" align="center"|2
 
|valign="top" align="center"|2
|Pointeur vers le tableau des valeurs des paramètres ce tableau doit être de même taille que le précédent
+
|Pointer to the text array of parameter values this array must be the same size as the previous
  
  
 
|-
 
|-
|valign="top"|Valeurs limites
+
|valign="top"|Limits
 
|valign="top"|Pointeur
 
|valign="top"|Pointeur
 
|valign="top"|[[File:in.png|caption]]
 
|valign="top"|[[File:in.png|caption]]
 
|valign="top" align="center"|3
 
|valign="top" align="center"|3
|Valeurs limites des palier de valeurs
+
|Pointer to the array (real) of limit values ​​of level of values
  
 
|-
 
|-
|valign="top"|Couleurs
+
|valign="top"|Colors
 
|valign="top"|Pointeur
 
|valign="top"|Pointeur
 
|valign="top"|[[File:in.png|caption]]
 
|valign="top"|[[File:in.png|caption]]
 
|valign="top" align="center"|4
 
|valign="top" align="center"|4
|Couleurs à appliquer à la représentation, vous devez définir une couleur de plus que vous n'avez indiqué de valeurs limites
+
|Pointer to the array (text) colors to be applied to the representation, you must define one more color than you have specified limit values
  
 
|-
 
|-
Ligne 65 : Ligne 65 :
 
|valign="top"|[[File:in.png|caption]]
 
|valign="top"|[[File:in.png|caption]]
 
|valign="top" align="center"|5
 
|valign="top" align="center"|5
|Tableau des ID des zones à mettre en couleur
+
|Pointer to the array (text) ID table zones to set color
  
 
|-
 
|-
|valign="top"|Value
+
|valign="top"|Values
 
|valign="top"|Pointeur
 
|valign="top"|Pointeur
 
|valign="top"|[[File:in.png|caption]]
 
|valign="top"|[[File:in.png|caption]]
 
|valign="top" align="center"|6
 
|valign="top" align="center"|6
|Valeurs correspondant à chaque ID pour calculer la couleur en fonction des valeurs limites
+
|Pointer to the array (real) to values ​​corresponding to each ID to calculate the color based on limits
  
 
|-
 
|-
|Résultat
+
|Result
 
|Image
 
|Image
 
|[[File:out.png|caption]]
 
|[[File:out.png|caption]]
 
|valign="top" align="center"|7
 
|valign="top" align="center"|7
|Image incluant le code SVG
+
|Image including SVG code
  
 
|}
 
|}

Version du 2 juillet 2014 à 20:39

Component Command List - Version française

Parameters


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:


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 caption 2 Pointer to the text array of parameter values this array must be the same size as the previous


Limits Pointeur caption 3 Pointer to the array (real) of limit values ​​of level of values
Colors Pointeur caption 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 caption 5 Pointer to the array (text) ID table zones to set color
Values Pointeur caption 6 Pointer to the array (real) to values ​​corresponding to each ID to calculate the color based on limits
Result Image caption 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


CarteSVG.jpg


 // User (OS) : Paul Kuhn - BlueCompany
 // Date  : 08/11/13, 10:42:04
 // ----------------------------------------------------
 // Method : Exemple_carte1
 // Description
 // 
 //
 // Parameters
 // ----------------------------------------------------

TABLEAU TEXTE($DataGrapheName;0)
TABLEAU TEXTE($DataGraphe;0)
AJOUTER A TABLEAU($DataGrapheName;"Title")
AJOUTER A TABLEAU($DataGraphe;"Répartition géographique des ventes")  // 1 - Titre du graphe

AJOUTER A TABLEAU($DataGrapheName;"SVGFile")
AJOUTER A TABLEAU($DataGraphe;"Fond_de_carte_France"+Séparateur dossier+"departements.svg")

AJOUTER A TABLEAU($DataGrapheName;"GraphFont")
AJOUTER A TABLEAU($DataGraphe;"Arial")  // Police des légendes et des échelles

AJOUTER A TABLEAU($DataGrapheName;"GraphBGColor")
AJOUTER A TABLEAU($DataGraphe;"LightBlue:30")  // Couleur du fond

AJOUTER A TABLEAU($DataGrapheName;"ShowLegend")
AJOUTER A TABLEAU($DataGraphe;"Oui")  // Affichage de la légende

AJOUTER A TABLEAU($DataGrapheName;"LegendLanguage")
AJOUTER A TABLEAU($DataGraphe;"English")  // Affichage de la légende

TABLEAU REEL($valeur_limite;3)
$valeur_limite{1}:=30
$valeur_limite{2}:=60
$valeur_limite{3}:=90

TABLEAU TEXTE($couleur;3)
$couleur{0}:="aquamarine"
$couleur{1}:="deepskyblue"
$couleur{2}:="dodgerblue"
$couleur{3}:="midnightblue"

TABLEAU REEL($Value;95)
TABLEAU TEXTE($ZoneID;95)
Boucle ($i;1;95)
$ZoneID{$i}:=Chaine($i;"00")
$Value{$i}:=(Hasard%(101))
Fin de boucle 
$ZoneID{20}:="2A"
INSERER DANS TABLEAU($ZoneID;21;1)
$ZoneID{21}:="2B"
INSERER DANS TABLEAU($Value;21;1)
$Value{21}:=$Value{20}

TheGraphe:=SGR_DrawMap (->$DataGrapheName;->$DataGraphe;->$valeur_limite;->$couleur;->$ZoneID;->$Value)