IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Bibliothèques et frameworks PHP Discussion :

[JpGraph] largeur ligne courbe


Sujet :

Bibliothèques et frameworks PHP

  1. #1
    Membre régulier
    Profil pro
    Inscrit en
    Octobre 2009
    Messages
    226
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Octobre 2009
    Messages : 226
    Points : 72
    Points
    72
    Par défaut [JpGraph] largeur ligne courbe
    JpGraph refuse d'élargir la ligne de ma courbe même avec le code suivant :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
     
    // Create filled line plot 
    $lplot = new LinePlot($this->total_open_PRs);
    //  add the line plot to the graph
    $this->graph->Add($lplot);
     
    $lplot->SetColor('red@0.7');
    $lplot->SetWeight(5);
    $lplot->SetLegend('Total open PRs');
    $lplot->SetBarCenter();
    merci

  2. #2
    Membre éclairé Avatar de ypcman
    Homme Profil pro
    Retraité codeur !
    Inscrit en
    Janvier 2011
    Messages
    597
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Maine et Loire (Pays de la Loire)

    Informations professionnelles :
    Activité : Retraité codeur !
    Secteur : Aéronautique - Marine - Espace - Armement

    Informations forums :
    Inscription : Janvier 2011
    Messages : 597
    Points : 886
    Points
    886
    Par défaut
    Bonjour.
    Vérifie que tu as bien enlevé l'antialiasing :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    $graph->img->SetAntiAliasing(false);
    car avec l'antialiasing, toutes les lignes ont une épaisseur de 1 pixel ...
    Participez vous aussi !
    Message utile
    Discussion résolue

  3. #3
    Membre régulier
    Profil pro
    Inscrit en
    Octobre 2009
    Messages
    226
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Octobre 2009
    Messages : 226
    Points : 72
    Points
    72
    Par défaut
    Bonjour,
    oui il est bien desactiver mais celà ne change rein

    quand je change le
    $lplot->SetStyle('solid');
    en $lplot->SetStyle('dashed');
    il veut bien m'épaissir la ligne sinon il veut pas pourquoi ?


    merci

  4. #4
    Membre éclairé Avatar de ypcman
    Homme Profil pro
    Retraité codeur !
    Inscrit en
    Janvier 2011
    Messages
    597
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Maine et Loire (Pays de la Loire)

    Informations professionnelles :
    Activité : Retraité codeur !
    Secteur : Aéronautique - Marine - Espace - Armement

    Informations forums :
    Inscription : Janvier 2011
    Messages : 597
    Points : 886
    Points
    886
    Par défaut
    Bizarre, chez moi ça fonctionne.
    Le code suivant
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    $datay1 = array(20,15,23,15);
    $graph = new Graph(300,250);
    $graph->SetScale("textlin");
    $graph->img->SetAntiAliasing(false);
    $lplot = new LinePlot($datay1);
    $graph->Add($lplot);
    $lplot->SetColor('red@0.7');
    $lplot->SetWeight(5);
    $lplot->SetLegend('Total open PRs');
    $lplot->SetBarCenter();
    $graph->Stroke();
    donne le graphique suivant :


    Les lignes font bien 5 pixels d'épaisseur ...

    Le même code source en ayant mis en commentaire la ligne
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    // $graph->img->SetAntiAliasing(false);
    donne :


    Yves.
    Images attachées Images attachées   
    Participez vous aussi !
    Message utile
    Discussion résolue

  5. #5
    Membre régulier
    Profil pro
    Inscrit en
    Octobre 2009
    Messages
    226
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Octobre 2009
    Messages : 226
    Points : 72
    Points
    72
    Par défaut
    bonjour ,
    j'ai le code suivant pour le graph :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    function displayGraphe() {
     
    $this->graph = new Graph($this->taillegrapheX,$this->taillegrapheY,"auto");    
     
    $this->graph->SetMarginColor($this->margecolor);
    $this->graph->SetShadow();
    // Box around plotarea
    $this->graph->SetBox();
    // No frame around the image
    $this->graph->SetFrame(false);
     
    // Setup the tab title
    $this->graph->tabtitle->Set($this->titre );
    $this->graph->tabtitle->SetFont(FF_ARIAL,FS_BOLD,16);
    // size legend
    $this->graph->legend->SetFont(FF_ARIAL,FS_BOLD,12);
    $this->graph->img->SetAntiAliasing(false);
     
    }
    ET Le code suivant pour la line :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    function diplaygrid2 (){
     
    //$graph->xaxis->title->Set("Month");
    $this->graph->SetScale("textlin",0,100);   
    $this->graph->yaxis->title->Set($this->titleleft);
    $this->graph->yaxis->SetTitleMargin(30);
     
    $this->graph->title->SetFont(FF_FONT1,FS_BOLD);
    $this->graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
    $this->graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);
     
    // Turn the tickmarks
    $this->graph->xaxis->SetTickSide(SIDE_DOWN);
    $this->graph->yaxis->SetTickSide(SIDE_LEFT);
    $this->graph->yaxis->SetColor('black','blue');
    $this->graph->yaxis->SetLabelFormat('%3d%%');
    // Setup month as labels on the X-axis
    $this->graph->xaxis->SetTickLabels($this->Xaxis);
    $this->graph->xaxis->SetFont(FF_ARIAL,FS_BOLD,10);
    $this->graph->xaxis->SetLabelAngle(45);
    $this->graph->yaxis->SetFont(FF_ARIAL,FS_BOLD,10);
    // Create and add a new text
     
     
    $txt=new Text("SLA Objective : ".$this->pourcenObjectif."%");
    $txt->SetPos(600,65,'center','center');
    $txt->SetFont(FF_FONT2,FS_BOLD);
    $txt->ParagraphAlign('center');
    $txt->SetBox('yellow','navy','gray');
    $txt->SetColor('#008000');
    $this->graph->AddText($txt);
     
    $txt=new Text($this->pourcenObjectif."%");
    $txt->SetPos(20,150,'center','center');
    $txt->SetFont(FF_FONT2,FS_BOLD);
    $txt->ParagraphAlign('center');
    $txt->SetBox('yellow','navy','gray');
    $txt->SetColor('#008000');
    $this->graph->AddText($txt);
     
    // Create accumulative graph
    $lplot = new LinePlot($this->sla_trigger);
     
     
     
    $this->graph->Add($lplot);
     
     
    $lplot->SetWeight(5);
    $lplot->SetFillColor($this->lineobjectifcolordown);
    $lplot->SetColor($this->lineobjectifcolor);
    $lplot->SetStyle('solid');
     
    }
    Images attachées Images attachées

  6. #6
    Membre éclairé Avatar de ypcman
    Homme Profil pro
    Retraité codeur !
    Inscrit en
    Janvier 2011
    Messages
    597
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Maine et Loire (Pays de la Loire)

    Informations professionnelles :
    Activité : Retraité codeur !
    Secteur : Aéronautique - Marine - Espace - Armement

    Informations forums :
    Inscription : Janvier 2011
    Messages : 597
    Points : 886
    Points
    886
    Par défaut
    mets plutôt le code antialiasing en ligne 40 du deuxième fichier
    Participez vous aussi !
    Message utile
    Discussion résolue

  7. #7
    Membre régulier
    Profil pro
    Inscrit en
    Octobre 2009
    Messages
    226
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Octobre 2009
    Messages : 226
    Points : 72
    Points
    72
    Par défaut
    un grand merci

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. [PROJET] [VISUALISATION 2D/3D] Tracer une ligne + courbe
    Par amarti86 dans le forum Langages de programmation
    Réponses: 4
    Dernier message: 15/02/2016, 13h23
  2. Ligne/courbe avec symboles répartis le long
    Par EyeRobot dans le forum Windows Presentation Foundation
    Réponses: 1
    Dernier message: 30/03/2015, 22h15
  3. [JpGraph] Affichage de courbes
    Par patsak dans le forum Bibliothèques et frameworks
    Réponses: 6
    Dernier message: 30/06/2008, 12h55
  4. PHP-cli et dessin de lignes, courbes, etc
    Par samoh dans le forum Bibliothèques et frameworks
    Réponses: 2
    Dernier message: 23/01/2006, 23h38
  5. [C#] Largeur de colonne et de ligne dans un DataGrid
    Par pc152 dans le forum Windows Forms
    Réponses: 3
    Dernier message: 31/08/2004, 14h09

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo