SGR Generate bubbleChart-EN : Différence entre versions

De BlueWiki
(Sample Code)
(Sample Code)
Ligne 102 : Ligne 102 :
 
----
 
----
  
[[File:GrapheBulle1.jpg|700px]]
+
[[File:GrapheBulle1.jpg|800px]]
  
 
Pour obtenir ce graphe il vous faudra utiliser le code ci-dessous
 
Pour obtenir ce graphe il vous faudra utiliser le code ci-dessous

Version du 30 décembre 2013 à 21:28

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:


Title parameters

  • - "Titre" or "Title" : graph title
  • - "alignement du titre" ou "TitleAlignement" : Title Alignment 0,1,2,3
  • - "Police du graphe" ou "GraphFont" : Title font and default font for legend and scale (arial by default)
  • - "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

Paramètres du graphe

  • - "Couleur de fond du graphe" ou "GraphBGColor" : Background color of the graph
  • - "BubbleMaxDiameter" : Maximum diameter of a bubble
  • - "ShowZeroOnHorizontalAxis" : zero of the X axis should be visible
  • - "ShowZeroOnVerticalAxis" : zero of the Y axis should be visible
  • - "ShowHorizontalScaleLine" : Horizontal lines for graduations
  • - "ShowVerticalScaleLine" : Vetical lines for graduations
  • - "ShowBubbleName" : Display bubbles labels
  • - "BubbleFontSize" : bubbles labels font size
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
Legend Pointer caption 3 Pointeur vers un tableau texte des noms des axes
Libelle Pointeur caption 4 Pointer to a text array of the names of axis
Value1 Pointer caption 5 Pointer to an array of values (real) ​​on the X axis
Value2 Pointeur caption 6 Pointer to an array of values (real) ​​on the Y axis
Value3 Pointer caption 7 Pointer to an array of values (real) of the bubble diameter
Colors Pointer caption 8 Pointer to an array (text) of bubbles colors
Graph Picture caption Retour Image including the SVG code

Description



Sample Code


GrapheBulle1.jpg

Pour obtenir ce graphe il vous faudra utiliser le code ci-dessous

 // Nom utilisateur (OS) : Paul Kuhn - BlueCompany
 // ----------------------------------------------------
 // Méthode : Exemple_Bulle
 // Description

TABLEAU TEXTE($DataGrapheName;0)
TABLEAU TEXTE($DataGraphe;0)

AJOUTER A TABLEAU($DataGrapheName;"BubbleMaxDiameter")
AJOUTER A TABLEAU($DataGraphe;"400")  // 1- diametre maximum d'une bulle

AJOUTER A TABLEAU($DataGrapheName;"GraphBGColor")
AJOUTER A TABLEAU($DataGraphe;"White")  // 2 - couleur de fond du graphe

AJOUTER A TABLEAU($DataGrapheName;"Title")
AJOUTER A TABLEAU($DataGraphe;"Evolution du nombres de produits et du CA")  // 3 - Titre du graphe

AJOUTER A TABLEAU($DataGrapheName;"TitleAlignement")
AJOUTER A TABLEAU($DataGraphe;Chaine(Centré))  // 4 - Alignement du Titre du graphe

AJOUTER A TABLEAU($DataGrapheName;"ShowZeroOnHorizontalAxis") 
AJOUTER A TABLEAU($DataGraphe;"non")  // 5 - le zéro de l'axe horizontal doit etre visible

AJOUTER A TABLEAU($DataGrapheName;"ShowZeroOnVerticalAxis")
AJOUTER A TABLEAU($DataGraphe;"oui")  // 6 - le zéro de l'axe vertical doit etre visible

AJOUTER A TABLEAU($DataGrapheName;"ShowHorizontalScaleLine")
AJOUTER A TABLEAU($DataGraphe;"oui")  // 7 - Traits horizontaux pour les graduations

AJOUTER A TABLEAU($DataGrapheName;"ShowVerticalScaleLine")
AJOUTER A TABLEAU($DataGraphe;"oui")  // 8 - Traits verticaux pour les graduations

AJOUTER A TABLEAU($DataGrapheName;"ShowBubbleName")
AJOUTER A TABLEAU($DataGraphe;"oui")  // 9 - Affichage des libellés

AJOUTER A TABLEAU($DataGrapheName;"BubbleFontSize")
AJOUTER A TABLEAU($DataGraphe;"36")  // 10 - taille de la police des libellés

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

TABLEAU TEXTE($legende;0)  // légende des valeurs
AJOUTER A TABLEAU($legende;"Année")
AJOUTER A TABLEAU($legende;"Nbre de produits")
AJOUTER A TABLEAU($legende;"CA")

TABLEAU TEXTE($Libelle;0)
AJOUTER A TABLEAU($Libelle;"Années 80 : les débuts")
AJOUTER A TABLEAU($Libelle;"")
AJOUTER A TABLEAU($Libelle;"Années 90 : la croissance")
AJOUTER A TABLEAU($Libelle;"Années 2000 : l'explosion")
AJOUTER A TABLEAU($Libelle;"Années 2010 : le déclin")

TABLEAU REEL($Value1;0)  // axe horizontal
AJOUTER A TABLEAU($Value1;1980)
AJOUTER A TABLEAU($Value1;1985)
AJOUTER A TABLEAU($Value1;1990)
AJOUTER A TABLEAU($Value1;2000)
AJOUTER A TABLEAU($Value1;2012)

TABLEAU REEL($Value2;0)  // axe vertical
AJOUTER A TABLEAU($Value2;25)
AJOUTER A TABLEAU($Value2;35)
AJOUTER A TABLEAU($Value2;50)
AJOUTER A TABLEAU($Value2;80)
AJOUTER A TABLEAU($Value2;12)

TABLEAU REEL($Value3;0)  // Diametre de la bulle
AJOUTER A TABLEAU($Value3;18000000)
AJOUTER A TABLEAU($Value3;22000000)
AJOUTER A TABLEAU($Value3;32000000)
AJOUTER A TABLEAU($Value3;40000000)
AJOUTER A TABLEAU($Value3;10000000)

TABLEAU TEXTE($Color;0)
AJOUTER A TABLEAU($Color;"lightblue")
AJOUTER A TABLEAU($Color;"Purple")
AJOUTER A TABLEAU($Color;"Pink")
AJOUTER A TABLEAU($Color;"LightGreen")
AJOUTER A TABLEAU($Color;"orange")

TheGraphe:=SGR_Generate_bubbleChart (->$DataGrapheName;->$DataGraphe;->$legende;->$Libelle;->$Value1;->$Value2;->$Value3;->$Color)