473,406 Members | 2,371 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Creating a radar graph using jpgraph

Hi all,

I am creating a radar chart containing 2 plots using jpgraph. My code is as follows:-

[PHP]
include ("./jpgraph/src/jpgraph.php");
include ("./jpgraph/src/jpgraph_radar.php");

// Create the basic radar graph
$graph = new RadarGraph(700,500,"auto");

// Set background color and shadow
$graph->SetColor("white");
$graph->SetShadow();

// Position the graph
$graph->SetCenter(0.4,0.55);

// Setup the axis formatting
$graph->axis->SetFont(FF_FONT1,FS_BOLD);
$graph->axis->SetWeight(1);

// Setup the grid lines
$graph->grid->SetLineStyle("longdashed");
//$graph->grid->SetColor("navy");
$graph->grid->SetColor("darkgray");
$graph->grid->Show();
$graph->HideTickMarks();

// Setup graph titles
$graph->title->Set("Essential Attributes Vs Population Mean");
$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->SetTitles(array("Attitude Towards Others","Meeting Standards","Job Ethic","Problem Solving","Respect For Property","Results Orientation","Attention To Detail","Consistency and Reliability"));

// Create the first radar plot
$plot = new RadarPlot(array(9.0,8.6,8.0,7.0,7.0,6.0,5.0,4.0));
$plot->SetLegend("Essential Talents");
$plot->SetColor("red","lightred");
$plot->SetFill(false);
$plot->SetLineWeight(1);

//$plot->mark->SetType(MARK_IMG_SBALL,'red');
$plot->mark->SetType(MARK_IMG_SBALL,'red');

// Create the second radar plot
$plot2 = new RadarPlot(array(6.0,7.0,7.0,7.1,7.5,8.0,8.0,8.1));
$plot2->SetLegend("Essential Talents: Population Mean");
$plot2->SetColor("blue","lightred");


// Add the plots to the graph
$graph->Add($plot2);
$graph->Add($plot);

// And output the graph
$graph->Stroke();
[/PHP]

However what I need is to display the data point values for plot2 beside every plot mark.. not able to figure that out.. hope someone can help.

Regards,
Sib
Jul 30 '08 #1
0 3446

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Frederes | last post by:
Hi, I use jpgraph library to make gannt graphs. I'd like to remove the box around the graph (of grey color) How to do then ? Thanks for any help Fred
0
by: Ravi | last post by:
Hi, I've tried creating a capture graph twice for the same camera device in the same program. But, the second time I try to create graph for the device, Im getting an error at the "RenderStream"...
4
by: Altramagnus | last post by:
I have 30 - 40 type of different window. For each type I need about 20 instances of the window. When I try to create them, I get "Error creating window handle" My guess is there is a maximum...
9
by: Patrick.O.Ige | last post by:
I have a code below and its a PIE & BAR CHART. The values now are all static but I want to be able to pull the values from a database. Can you guys give me some ideas to do this? Thanks ...
1
by: monomaniac21 | last post by:
Hi all! Ive got a very simple page shown below to draw a line graph and I need some help, how do can i label each point on the X and the Y axis? The lines are drawn with an imageline function,...
5
by: Kuna | last post by:
Hi All, I am trying to create a gantt chart in php by getting data from database. I am using WindowsXp OS and having php-4 and my-sql DB. I have installed the JPGRAPH package to my system and...
5
by: Sonnich | last post by:
Happy new year! I need to create a page with a graph. Data will be read from a DB, processed and then I should create a JPG or something to show. Does any one know of a component which can do...
4
by: riklaunim | last post by:
I have to make a line graph of entries from last 30 days. I have the graph but I can't make it look nice - the X line has the day of month numbers like 29, 30, 1, 2, 3... But I want to group them...
2
by: Man4ish | last post by:
I have created Graph object without vertex and edge property.It is working fine. #include <boost/config.hpp> #include <iostream> #include <vector> #include <string> #include...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.