Marc As for doing it in Jquery , I went through a web tutorial on Jquery but it wasn't working out
Here is how you might want to try it with php
If the data values are coming from a database, then you can use this code
with alterations to suit your purpose. This simple lays out a way to create
strings for Labels and Data Values that you can poke to <img > tag. This
uses a vertical bar chart. But if the idea works simply change it to
horizontal bar chart.
*<?php
$sql= "SELECT * from rodeo-table-name-here WHERE field-1 = param-1 ";*
* $title = "All Around Cowboys" ;*
* $result = mysql_query($sql);*
* $data = "chd=t:"; $names = "";
$rows = mysql_num_rows($result);
$max = 0;
while($row = mysql_fetch_array($result))
{
$names .= utf8_encode($row['rodeo-name-field'])."|";
$data .= $row['rodeo-data-field']",";
if ($row['rodeo-data-field'] > $max)
$max = $row['rodeo-data-field'];
}
$names = substr($name,0,strlen($name)-1);
$data = substr($data,0,strlen($data)-1);*
*<img src="**http://chart.apis.google.com/chart?chs=400x300&chds=0,<?php
* <http://chart.apis.google.com/chart?chs=400x300&chds=0,<?php>* echo
$max; ?>&chxr=1,0,<?php echo $max; ?>&chd=<?php echo $data;
?>&cht=bvs&chco=4D89F9&chxt=x,y&chxl=0:|<?php echo $names;
?>&chm=N*c2z*$,000000,0,-1,9&chbh=a&chts=7B68EE,10&chf=bg,s,EFEFEF&chtt=<?php
echo $title; ?>" alt="Rodeo Chart" />
?>*
Asad
On 3/4/09, Marc-Andre Menard <[email protected]> wrote:
>
> Ok, first thing first.. I REALLY appreciate the google chart community, so
> many good people around..
>
> I don’t ask you to do the job for me, but since I am a rookie php
> programmer, I don’t know where to start and do the thing wrong...
>
> I know php and jquery... I thing going with php is good
>
> I like to have a basic script that you send a table ( 3 column) and it
> return and http address formatted as the table data...
>
> Here is the table (in classement let take the All around Cowboy table)
> http://acecrodeo.com/new/06-classement.php?lang=fra&annee=2008
>
> And here is how I like it to look like
>
>
>
> It must be pretty simple, the sorting is already done (jquery plugin) and
> the table look really good, I like the graphic to show the placement of the
> winnig cash visually... On a scale that will change over time... So the
> scale must alwas be the max winner $$$, in the early year it can be 400$ at
> the end it will be 14000$..
>
> I really appreciate your great help.... And I like to participate in the
> making of that script
>
> Thnaks in advance
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Chart API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-chart-api?hl=en
-~----------~----~----~----~------~----~------~--~---
<<inline: image.png>>
