PDA

Pogčedajte punu verziju : Php i anketa


[nq]
09. 09. 2005., 19:09
Da li je moguce nesto kao na slici izvesti uz PHP ?
Naravno "odgovora" moze biti i vise od 2 koliko ih ima na slici.

noviKorisnik
09. 09. 2005., 19:19
Nemam pojma, verovatno može. Probaj primer sa http://dk.php.net/manual/en/function.imagefilledarc.php

nixa
09. 09. 2005., 20:04
mozes preko gd-a to da resis :) plus sto mozes i preko flash-a :D

http://proxy2.de/poll/demo_6.php pa doradi malo ;)

dinke
09. 09. 2005., 20:05
Naravno da moze.

Pogledaj jpgraph lib sa http://www.aditus.nu/jpgraph/index.php

[nq]
09. 09. 2005., 22:22
Da ali da da pita bude 3d :D

noviKorisnik
10. 09. 2005., 00:04
3D primer s linka koji sam ostavio, proveri sam, ja nemam GD ovde instaliran
<?php

// create image
$image = imagecreatetruecolor(100, 100);

// allocate some solors
$white = imagecolorallocate($image, 0xFF, 0xFF, 0xFF);
$gray = imagecolorallocate($image, 0xC0, 0xC0, 0xC0);
$darkgray = imagecolorallocate($image, 0x90, 0x90, 0x90);
$navy = imagecolorallocate($image, 0x00, 0x00, 0x80);
$darknavy = imagecolorallocate($image, 0x00, 0x00, 0x50);
$red = imagecolorallocate($image, 0xFF, 0x00, 0x00);
$darkred = imagecolorallocate($image, 0x90, 0x00, 0x00);

// make the 3D effect
for ($i = 60; $i > 50; $i--) {
imagefilledarc($image, 50, $i, 100, 50, 0, 45, $darknavy, IMG_ARC_PIE);
imagefilledarc($image, 50, $i, 100, 50, 45, 75 , $darkgray, IMG_ARC_PIE);
imagefilledarc($image, 50, $i, 100, 50, 75, 360 , $darkred, IMG_ARC_PIE);
}

imagefilledarc($image, 50, 50, 100, 50, 0, 45, $navy, IMG_ARC_PIE);
imagefilledarc($image, 50, 50, 100, 50, 45, 75 , $gray, IMG_ARC_PIE);
imagefilledarc($image, 50, 50, 100, 50, 75, 360 , $red, IMG_ARC_PIE);


// flush image
header('Content-type: image/png');
imagepng($image);
imagedestroy($image);
?>

[nq]
10. 09. 2005., 00:14
Moj propust, hvala. :)

dinke
10. 09. 2005., 09:52
Sa jpgraphom to bi bilo nesto ovako:

<?php
include ("../jpgraph.php");
include ("../jpgraph_pie.php");
include ("../jpgraph_pie3d.php");

$data = array(40,60,21,33);

$graph = new PieGraph(300,200,"auto");
$graph->SetShadow();

$graph->title->Set("A simple Pie plot");
$graph->title->SetFont(FF_FONT1,FS_BOLD);

$p1 = new PiePlot3D($data);
$p1->SetSize(0.5);
$p1->SetCenter(0.45);
$p1->SetLegends($gDateLocale->GetShortMonth());

$graph->Add($p1);
$graph->Stroke();

?>

A sa jpgraphom mozes jos mnooogo vise :)

[nq]
10. 09. 2005., 14:44
Zivi bili, ugred sav sam u piticama :)