This week's book giveaway is in the
General Computing
forum.
We're giving away four copies of
Arduino in Action
and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See
this thread
for details.
A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
Win a copy of
Arduino in Action
this week in the
General Computing
forum!
A special promo:
Enter your blog post or vote on a blogger to be featured in an upcoming Journal
JavaRanch
»
Java Forums
»
Languages
»
PHP
Author
How to make it dynamic search function
sean kwok
Greenhorn
Joined: Nov 01, 2011
Posts: 1
posted
Nov 01, 2011 01:25:53
0
<?php /* Example10 : A 3D exploded pie graph */ // Standard inclusions include("pChart/pData.class"); include("pChart/pChart.class"); $file = "C:\Log\NMS-Television2011101416.txt"; $Tv = count(file($file)); $file = "C:\Log\NMS-Games2011101315.txt"; $Games = count(file($file)); $file = "C:\Log\NMS-Film2011101416.txt"; $Film = count(file($file)); $file = "C:\Log\NMS-Pulishing2011100714.txt"; $Pulishing = count(file($file)); $file = "C:\Log\NMS-Animation2011101116.txt"; $Animation = count(file($file)); $file = "C:\Log\NMS-Distribution_Media_Services2011101014.txt"; $Distribution = count(file($file)); $file = "C:\Log\NMS-Broadcasting & Technology2011101315.txt"; $Broadcasting = count(file($file)); echo "$Broadcasting","$Distribution","$Animation","$Pulishing","$Film","$Games","$Tv"; // Dataset definition $DataSet = new pData; $DataSet->AddPoint(array($Tv,$Games,$Film,$Pulishing,$Animation,$Distribution,$Broadcasting),"Serie1"); $DataSet->AddPoint(array("Television","Games","Film","Pulishing","Animation","Distribution","Broadcasting"),"Serie2"); $DataSet->AddAllSeries(); $DataSet->SetAbsciseLabelSerie("Serie2"); // Initialise the graph $Test = new pChart(800,500); $Test->drawFilledRoundedRectangle(7,7,413,243,5,240,240,240); $Test->drawRoundedRectangle(5,5,415,245,5,230,230,230); $Test->createColorGradientPalette(195,204,56,223,110,41,5); // Draw the pie chart $Test->setFontProperties("Fonts/tahoma.ttf",8); $Test->AntialiasQuality = 0; $Test->drawPieGraph($DataSet->GetData(),$DataSet->GetDataDescription(),180,130,110,PIE_PERCENTAGE_LABEL,FALSE,50,20,5); $Test->drawPieLegend(400,15,$DataSet->GetData(),$DataSet->GetDataDescription(),250,250,250); // Write the title $Test->setFontProperties("Fonts/MankSans.ttf",10); $Test->drawTitle(10,20,"Number of View",100,100,100); $Test->Render("example10.png"); ?>
How to make it automatically search the file from a group of text file?
Thanks!~
I agree. Here's the link:
http://zeroturnaround.com/jrebel
- it saves me about five hours per week
subject: How to make it dynamic search function
Similar Threads
Reading IE favorite shortcut url?
Why does a char value also have an integer value?
TreeMap question#1
First Java attempt alone - Graph help!
help regarding pie graph
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter