I type in the php portion in front of example coding provided on google link from your docs, but always only displays the code when I save the page. I have the FCK editor, so I turned off the HTML filter for the profile, no dice. I also tried turning on permission for the php field settings, still only displays the graph code on the page, NO GRAPH! Yes, I'm entering the code via a simple copy/paste using the source tab for the FCK editor, also tried plain text editor.
I'm running Drupal 6.8

What am I missing? I know this works since the system chart works.
Here's my test:

<?php
  $chart = array(
      '#chart_id' => 'test_chart',
      '#title' => chart_title(t('Servings'), 'cc0000', 15),
      '#type' => CHART_TYPE_LINE,
      '#size' => chart_size(400, 200),
      '#chart_fill' => chart_fill('c', 'eeeeee'),          
      '#grid_lines' => chart_grid_lines(20, 20, 1, 5),          
    );
    
  for ($i = 0; $i < 80; $i++){
    $chart['#data'][] = $i + rand(0, $i);
  }

  echo chart_render($chart);
?>

Comments

layoric’s picture

Status: Active » Closed (fixed)

PHP module was disabled. Enabled and it works.