public function getContent()
 {
     $chart = GraphOnTrackersV5_ChartFactory::instance()->getChart(null, $this->chart_id, false);
     if ($chart) {
         $content = $chart->getWidgetContent();
     } else {
         $content = '<em>Chart does not exist</em>';
     }
     return $content;
 }
 function getContent()
 {
     $content = '';
     $store_in_session = false;
     if ($chart = GraphOnTrackersV5_ChartFactory::instance()->getChart(null, $this->chart_id, $store_in_session)) {
         $content .= $chart->fetch($store_in_session);
         $content .= '<br />';
         $content .= $chart->renderer->fetchWidgetGoToReport();
     } else {
         $content .= '<em>Chart does not exist</em>';
     }
     return $content;
 }
 /**
  * This hook ask to create a new instance of a renderer
  *
  * @param mixed instance Output parameter. must contain the new instance
  * @param string type the type of the new renderer
  * @param array row the base properties identifying the renderer (id, name, description, rank)
  * @param Report report the report
  *
  * @return void
  */
 public function tracker_report_renderer_instance($params)
 {
     if ($params['type'] == self::RENDERER_TYPE) {
         require_once 'GraphOnTrackersV5_Renderer.class.php';
         $params['instance'] = new GraphOnTrackersV5_Renderer($params['row']['id'], $params['report'], $params['row']['name'], $params['row']['description'], $params['row']['rank'], $this);
         if ($params['store_in_session']) {
             $params['instance']->initiateSession();
         }
         $f = GraphOnTrackersV5_ChartFactory::instance();
         if (isset($params['row']['charts']) && isset($params['row']['mapping'])) {
             $charts = array();
             foreach ($params['row']['charts']->chart as $chart) {
                 $charts[] = $f->getInstanceFromXML($chart, $params['instance'], $params['row']['mapping'], $params['store_in_session']);
             }
         } else {
             $charts = $f->getCharts($params['instance'], $params['store_in_session']);
         }
         $params['instance']->setCharts($charts);
     }
 }
 protected function getChartFactory()
 {
     return GraphOnTrackersV5_ChartFactory::instance();
 }
 private function getSiblingsForRankSelectbox()
 {
     $siblings = array();
     $session = new Tracker_Report_Session($this->renderer->report->id);
     $session->changeSessionNamespace("renderers.{$this->renderer->id}");
     $charts = $session->get('charts');
     uasort($charts, array(GraphOnTrackersV5_ChartFactory::instance(), 'sortArrayByRank'));
     foreach ($charts as $sibling) {
         $siblings[] = array('id' => $sibling['id'], 'name' => $sibling['title'], 'rank' => $sibling['rank']);
     }
     return $siblings;
 }