OK!!

Now i understand, you're a chief ;)

Thanks

On Tue, Jan 6, 2009 at 4:17 PM, Matyo <[email protected]> wrote:
>
> i cant give you a working link but can try explain you now
>
> chd= ( this is your value variable from GET true ?)
>
> when you use Line method from api chd value is start from 1 to 100 its
> mean value working with % parameters so
>
> you must do something like that
>
> $countUsers=$DBCONN->getRows("select count(userID) as num from
> users");
> $countUsers=$countUsers[0]['num']; // this is like 248
>
> $countOn1=$DBCONN->getRows("select count(favoriteStyleInSalsaID) as
> num from users where favoriteStyleInSalsaID=2");
> $countOn1=$countOn1[0]['num']; // this is like 126
> $countOn1=number_format($countOn1);  // this is like 126
> $countOn1yuzde=number_format($countOn1*100/$countUsers); // what we do
> here 126*100/248=51       (percent or %)
>
> hope you know php what we do in upper code
>
> get the users count from DB and get the users count who danceing salsa
> On1 from DB then use number_format($countOn1*100/$countUsers); this
> mathematic function and get percent of users who danceing On1 Salsa
> Style what is the value become like 56
>
> ok now you can use $countOn1 for you chart on chd=
>
> example:
>
> http://chart.apis.google.com/chart?chs=1000x300&cht=lc&chxt=x,y&chco=...13:50|13:55|13:50|13:55|13:50|13:55|13:50|&chd=t:0,40,20,65,85,100,75|0,10,60,100,80,70,100&chxr=1,0,500&chdl=Line1|Line2
>
>
> sorry for my bad english :D
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to