All pastes #623936 Raw Edit

Someone

public text v1 · immutable
·published 2007-07-17 23:04 UTC
rendered paste body
function tagstack_canvas() {                                                                              
  $config = array();
  $config['height'] = 400;                                                                                
  $config['width'] = 700;
  $config['labels'] = array(                                                                              
    'inside' => TRUE,                                                                                     
  );
  $config['theme'] = array(                                                                               
    'text' => 'black',
    'label' => 'black',
    'fill' => '#0000ff',
    'fill_0' => '#0000ff',                                                                                
    'fill_1' => '#3333ff',                                                                                
    'fill_2' => '#6666ff',                                                                                
    'fill_3' => '#9999ff',                                                                                
    'fill_4' => '#ccccff',                                                                                
    'fill_5' => '#eeeeff',                                                                                
  );                                                                                                      
  
  $data = module_invoke('tagadelic', 'get_weighted_tags', array(1));                                      
  $chart = array();
  foreach($data as $n => $tag) {
    $chart['points'][$n] = array($tag->name, $tag->number_of_posts);                                      
  }
  return module_invoke('drawing_graph', 'piechart', $chart, $config);                                     
}