/[simile]/sparklines/create.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /sparklines/create.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 27 by dpavlin, Sun Oct 19 16:05:02 2008 UTC revision 28 by dpavlin, Mon Oct 20 18:59:48 2008 UTC
# Line 86  foreach my $instance ( keys %$json ) { Line 86  foreach my $instance ( keys %$json ) {
86          push @items, $item;          push @items, $item;
87  }  }
88    
89  warn dump( @items );  #warn dump( @items );
90    
91  my $items_json = to_json({ items => \@items });  my $items_json = encode_json({
92  $items_json =~ s/(_sum":)"(\d+)"/$1$2/gs;          properties => {
93                    visits_sum => { valueType => 'number' },
94                    visits_anonymous_sum => { valueType => 'number' },
95                    changes_sum => { valueType => 'number' },
96                    categories_changed_sum => { valueType => 'number' },
97                    unique_users_sum => { valueType => 'number' },
98            },
99            items => [ @items ]
100    });
101    #$items_json =~ s/(_sum":)"(\d+)"/$1$2/gs;
102  write_file( 'sparklines.js', $items_json );  write_file( 'sparklines.js', $items_json );
103    

Legend:
Removed from v.27  
changed lines
  Added in v.28

  ViewVC Help
Powered by ViewVC 1.1.26