I have installed Charts 6.x-1.0-alpha6 and Open Flash Chart API (along with all required third party files) and I am able to generate charts. So the modules work as far as I know.

I am trying to create a Page, with text and a chart in the middle of it. So I have something like one paragraph, then a chart, then another paragraph. When I edit the node, the body looks like this:

----------
This is a paragraph.

  $example = array(
    array(5, 10, 25, 60), //Some basic data to test our chart
  );
  return charts_chart($example);

This is another paragraph.
----------

If I use Filtered HTML as the filter, I don't see any chart (obviously). If I use Full PHP, then I do not see the paragarph after the chart.

What am I doing wrong here?

Comments

yan’s picture

Status: Active » Fixed

I think you should use print, not return:

  $example = array(
    array(5, 10, 25, 60), //Some basic data to test our chart
  );
  print charts_chart($example);

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.