Search Results

Search found 4 results on 1 pages for 'tuffy g'.

Page 1/1 | 1 

  • Artichow PlotGroup: Legends not showing

    - by Hameed
    I am working on a little project on OpenCATS, developing some charts. In one of the charts, I need to add multiple plots to a PlotGroup and add Legends as well. I have written a small function that creates the chart, however I have difficulty displaying the legends when I add them to a PlotGroup object. Here is the code: public function draw($format = false) { /* Make sure we have GD support. */ if (!function_exists('imagecreatefromjpeg')) { die(); } if ($format === false) { $format = IMG_PNG; } $group = new PlotGroup(); $graph = new Graph($this->width, $this->height, NULL, 0, $this->width-135); $graph->setFormat($format); $graph->setBackgroundColor(new Color(0xF4, 0xF4, 0xF4)); $graph->shadow->setSize(3); $graph->title->set($this->title); $graph->title->setFont(new Tuffy(10)); $graph->title->setColor(new Color(0x00, 0x00, 0x8B)); $graph->border->setColor(new Color(187, 187, 187, 15)); $group->axis->bottom->setLabelText($this->xLabels); $group->axis->bottom->label->setFont(new Tuffy(8)); $group->setPadding(25, 145, 10, 22); $plotcount = 0; $plot = array(); foreach ($this->xValues as $xVal) { $plotcount++; $plot[$plotcount-1] = new LinePlot($xVal, LinePlot::LINE); $plot[$plotcount-1]->setPadding(25, 145, 10, 22); if ($plotcount % 5 ==0 ) $plot[$plotcount-1]->setColor(new Blue); else if ($plotcount % 4 ==0 ) $plot[$plotcount-1]->setColor(new DarkGreen); else if ($plotcount % 3 ==0 ) $plot[$plotcount-1]->setColor(new Red); else if ($plotcount % 2 ==0 ) $plot[$plotcount-1]->setColor(new Orange); $plot[$plotcount-1]->setThickness(2); $plot[$plotcount-1]->legend->add($plot[$plotcount-1], $this->legends[$plotcount-1]); $plot[$plotcount-1]->legend->setTextFont(new Tuffy(8)); $plot[$plotcount-1]->legend->setPadding(3, 3, 3, 3, 3); $plot[$plotcount-1]->legend->setPosition(1, 0.825); $plot[$plotcount-1]->legend->setBackgroundColor(new Color(0xFF, 0xFF, 0xFF)); $plot[$plotcount-1]->legend->border->setColor(new Color(0xD0, 0xD0, 0xD0)); $plot[$plotcount-1]->legend->shadow->setSize(0); $group->add($plot[$plotcount-1]); } $graph->add($group); $graph->draw(); } } If I draw only one LinePlot it works: So for instance if I change $graph->add($group); to $graph->add($plot[0]); then only one of the lines will show up with the legend next to it.

    Read the article

  • Where to start to learn Android?

    - by Tuffy G
    I want to start making a program for a local charity on the Android platform. Where can go I for resources and tutorials to learn? I'm very new at this, so would like something simple that can be followed by someone with minimal technical knowledge.

    Read the article

  • need an ip location lookup

    - by Tuffy G
    anyone know of a decent site where i can lookup where an ip address is? e.g. if i have ip address x.x.x.x.x and i want to know if that ip is in london or scotland. i've been going around google and what the sites i have found are saying is that ip x is located in location london when it shud be roughly 250 miles away from there. thanks p.s. must be free

    Read the article

  • Android programming help

    - by Tuffy G
    I want to start making a program for a local charity on the Android platform. Where can go I for resources and tutorials to learn? I'm very new at this, so would like something simple that can be followed by someone with minimal technical knowledge.

    Read the article

1