I saw on the Sandbox site that there were several charts on one page. Is this possible to do right now?

Thanks,
Tootsie

CommentFileSizeAuthor
#6 fusioncharts_cck-1.patch1.01 KBparanojik

Comments

aaron1234nz’s picture

Yes this is possible. The charts on the page you are thinking of are created using the API. If you want to create multiple charts you can use CCK and add several widgets or create chart nodes then aggregate them with views.

Is this what you had in mind?

tootsietorres’s picture

I'm not sure I follow either of your suggestions:

"use CCK and add several widgets" - this would only work if every node had the same number of charts. Yes? I'm looking for something a little bit more dynamic.

"create chart nodes then aggregate them with views" - this is of course what I tried first. But I can only get the title of the charts to display in my view and not the whole chart. Have I missed something?

Thanks,
Tootsie

aaron1234nz’s picture

Have you tried a view of node teasers? This should include the chart in the view.

tootsietorres’s picture

Oh! I got very excited for a few moments, but when I tried making a view with node teasers, nothing appeared. Sad.

aaron1234nz’s picture

Status: Active » Closed (duplicate)

The ideal solution to this is to provide a views component. see existing issue http://drupal.org/node/365470

paranojik’s picture

Component: FusionCharts core » FusionCharts for CCK
Category: feature » bug
Status: Closed (duplicate) » Needs review
StatusFileSize
new1.01 KB

The problem was in a static "rendered" flag, which was set when rendering the first chart field. This caused only the first node on the page to have the chart rendered.

zeezhao’s picture

Another way is to combine charts in a view by overriding the output of the view using:

hook_views_post_render(&$view, &$output)

See here for hooks: http://views.doc.logrus.com/group__views__hooks.html

I have done this before by using a view to create the query to pull the results, then overriding the output by calling fusioncharts to do as many plots as required. This is a custom module though.

aaron1234nz’s picture

Status: Needs review » Fixed

Thanks for the patch

Status: Fixed » Closed (fixed)

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