View unanswered posts | View active topics It is currently Thu Mar 28, 2024 11:44 am



Reply to topic  [ 1 post ] 
How to change line color? 
Author Message
New pChart user
New pChart user

Joined: Mon Apr 09, 2012 6:38 pm
Posts: 1
Post How to change line color?
Hi,

i write this topic because i try since 4 hours change line color. I found the topic on this forum: viewtopic.php?f=1&t=417 but this dont work. My cod look this:
Code:
<?php
function wykresGronowania($dane, $dane2, $nazwa){
    $myData = new pData();
    $myData->addPoints($dane, "Wsp. Gronowania");
    $myData->setSerieTicks("Wsp. Gronowania", 4);
    $myData->setSerieWeight("Nr Sieci", 2);
    $myData->setAxisName(0, "Wsp. Gronowania");
    $myData->addPoints($dane2, "Nr Sieci");
    $myData->setSerieDescription("Nr Sieci", "ID");
    $myData->setAbscissa("Nr Sieci");
   
    $myImage = new pImage(700, 230, $myData);
   
    $Settings = array("R"=>170, "G"=>183, "B"=>87, "Dash"=>1, "DashR"=>190, "DashG"=>203, "DashB"=>107);
    $myImage->drawFilledRectangle(0,0,700,230,$Settings);
   
    $Settings = array("StartR"=>219, "StartG"=>231, "StartB"=>139, "EndR"=>1, "EndG"=>138, "EndB"=>68, "Alpha"=>50);    //ustawienia koloru tła
    $myImage->drawGradientArea(0,0,700,230,DIRECTION_VERTICAL,$Settings);
    $myImage->drawGradientArea(0,0,700,20,DIRECTION_VERTICAL,array("StartR"=>0,"StartG"=>0,"StartB"=>0,"EndR"=>50,"EndG"=>50,"EndB"=>50,"Alpha"=>80));
   
    $myImage->drawRectangle(0,0,699,229,array("R"=>0,"G"=>0,"B"=>0));
   
    $myImage->setFontProperties(array("FontName"=>"./Library/fonts/pf_arma_five.ttf","FontSize"=>6));
               
    $myImage->setGraphArea(60,40,680,150);
    $myImage->drawFilledRectangle(60,40,680,150,array("R"=>255,"G"=>255,"B"=>255,"Surrounding"=>-200,"Alpha"=>10));
    $myImage->drawScale(array("DrawSubTicks"=>TRUE));
    $myImage->setShadow(TRUE,array("X"=>1,"Y"=>1,"R"=>0,"G"=>0,"B"=>0,"Alpha"=>10));
    $myImage->setFontProperties(array("FontName"=>"./Library/fonts/pf_arma_five.ttf","FontSize"=>6));
    $myImage->drawLineChart(array("DisplayValues"=>TRUE,"DisplayColor"=>DISPLAY_MANUAL));//?? odpowiada za wykres dany??
       
    $myImage->setFontProperties(array("R"=>255,"G"=>255,"B"=>255));
    $myImage->drawLegend(560,8,array("Style"=>LEGEND_NOBORDER,"Mode"=>LEGEND_HORIZONTAL));
   
    $myImage->render($nazwa.".png");
}
?>

On this link you can see the graph: http://modelowanietopologiisieci.cba.pl/wykresWspGronOd0Do30sieciZasieg400.png. The color line is yellow
Sorry if someone have trouble with understand my topic, but i don't know very well English


Mon Apr 09, 2012 6:45 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron