Hi

I have created a webform with 3 components, as - name, e-mail address and nominate for CMSs(radio buttons).

I have installed the FusionCharts module and copied the downloaded FusionChartsFree folder inside this FusionCharts module folder.

Now, I can see in admin the tab for charts besides analysis, submissions and table tabs of the webform results. Chart gives me the chart of all the 3 components.

Is it possible to display the chart for the only component "nominate", that is publicly enabled in a block of content-bottom region of a node. This way any visitor would be able to see the comparative result of the nominations.

Please let me know if this is possible.

Thanks

Comments

sej123’s picture

Any help please??

polmaresma’s picture

Try this, where:
nid=node id
cid=id of the question (look at webform_submitted_data table for that)

  $info->query = "SELECT t.data AS name, COUNT(*) as value FROM webform_submitted_data t WHERE t.nid=30 AND t.cid=1 GROUP BY t.data";
  $info->chart_type = 'Column 3D';
  $info->settings = array('Caption' => 'Title');
  $info->attributes = array();
  $info->width = 440;
  $info->height = 300;
  return theme('fusionchart', $info);    
aaron1234nz’s picture

Status: Active » Closed (works as designed)