Google Chart

pratchet

Member
I'm trying to show the months in real time and put this tags,
Code:
{$2_monthly}, {$3_monthly}
but does not work. Any idea how to do it?

Code:
      function drawChart() {
 
        var data = google.visualization.arrayToDataTable([
          ['', '{$lng->g_out}', '{$lng->g_in}'],
          ['{$lng->g_this_month}',  {$tot_out_0_monthly},      {$tot_in_0_monthly}],
          ['{$lng->g_last_month}',  {$tot_out_1_monthly},      {$tot_in_1_monthly}],
          ['{$2_monthly}',  {$tot_out_2_monthly},      {$tot_in_2_monthly}],
          ['{$3_monthly}',  {$tot_out_3_monthly},      {$tot_in_3_monthly}]
        ]);
 

Mark

Administrator
Staff member
There is no template tag that will show real time rankings, this is calculated dynamically depending on category and ranking method.
 

pratchet

Member
if someone wants to use real-time ...

Code:
      function drawChart() {
     
var d=new Date();
var month=new Array();
month[0]="January";
month[1]="February";
month[2]="March";
month[3]="April";
month[4]="May";
month[5]="June";
month[6]="July";
month[7]="August";
month[8]="September";
month[9]="October";
month[10]="November";
month[11]="December";
var n =  d.getMonth();
 
        var data = google.visualization.arrayToDataTable([
          ['', '{$lng->g_out}', '{$lng->g_in}'],
          [month[n],  {$tot_out_0_monthly},      {$tot_in_0_monthly}],
          [month[n-1],  {$tot_out_1_monthly},      {$tot_in_1_monthly}],
          [month[n-2],  {$tot_out_2_monthly},      {$tot_in_2_monthly}],
          [month[n-3],  {$tot_out_3_monthly},      {$tot_in_3_monthly}]
        ]);
 

Mark

Administrator
Staff member
Ahh today's stats, yes this is obvious, you can use any stats found in the stats template.

I misunderstood your question, thought you were asking for real time rank... Not today's total hits in.
 

Basti

Administrator
Staff member
Its a 1.0 feature which u have now. If you want to extend it like pratchet, just edit user_cp_start.html
 

pratchet

Member
Ahh today's stats, yes this is obvious, you can use any stats found in the stats template.

I misunderstood your question, thought you were asking for real time rank... Not today's total hits in.
Sorry, my english is not good.
 
Top