I'm working on Views support for Chart API. Would you like this implemented as part of chart.module, a separate module as part of the Chart API package, or a completely separate project in contrib?

Thanks!

CommentFileSizeAuthor
#12 635084.patch1.07 KBezra-g
#12 chart_views-1.zip4.1 KBezra-g
#8 chart_views.zip4.13 KBezra-g

Comments

tjholowaychuk’s picture

Probably best to keep it as a separate project since im not with Drupal anymore

ezra-g’s picture

Thanks for the fast response. Would you rather grant me CVS access to co-maintain this module?

ezra-g’s picture

Status: Active » Fixed

Boombatower recommended that we just put it in the current module. He also granted me cvs access. Thanks!

boombatower’s picture

Title: Where would you like Views Support? » Add views support
Assigned: Unassigned » ezra-g
Status: Fixed » Active

I think it makes sense to add views support to the module as many other contrib have done, granted cvs access.

I think a views folder should do the trick and implement hook in chart.module.

tjholowaychuk’s picture

sounds good guys, whatever works best for you

Bobuido’s picture

This would be awesome - Subscribing

ezra-g’s picture

Thanks for your interest. Sorry to leave this hanging for so long. This is 85% done locally. Just needs a cleanup and I'll make it available. I'll give it another shot this week.

ezra-g’s picture

Status: Active » Needs review
StatusFileSize
new4.13 KB

Seems better to get something 90% of the way there in the queue than to keep delaying. This code is based on the Views integration for the Charts module and most of the comments are taken from that implementation. It depends on views_calc.module and so I've made it it's own separate module.

glennpratt’s picture

Nice work ezra-g. I've just started glancing at it, here's what I saw so far.

I see a call the chart_types() in chart_views_plugin_style, line which is undefined for me against 6.x-1.2 and 6.x-dev.

  /**
     // Get chart settings from options form.
    //_chart_settings_form($form['chart'], $this->options['chart']);
    $form['type'] = array(
      '#default_value'  => 'bhs',
      '#options'        => chart_types(),
      '#required'       => TRUE,
      '#type'           => 'radios',
    );

I changed it to a hard coded array of the chart types just to see and the views integration seems to load, but I've yet to get any data to chart.

ezra-g’s picture

Status: Needs review » Needs work

Indeed you're correct -- I need to file this as a patch because I added a function to chart.module.

adpo’s picture

#8 is not working for me.
When I want to choose setting for Google chart style: An error occured at http://example.com/admin/build/views/ajax display/view_name/default/styleplugin

PS> Can I use CCK field for this style?

ezra-g’s picture

Status: Needs work » Needs review
StatusFileSize
new4.1 KB
new1.07 KB

Here's a revised version of chart_views that removes an unnecessary comment from the original charts.module views integration. Also, a patch adding the chart_types() function to chart.module is attached.

tobiberlin’s picture

I also got the error mentioned in #11 when I wanted to select the Google Chart view style...

ezra-g’s picture

Try clearing the Views cache at admin/build/views/tools .

ezra-g’s picture

Status: Needs review » Fixed

I made some basic charts on a fresh install and committed this. I expect that we'll refine it more as it gets more use.

ezra-g’s picture

Sadly, I forgot that chart_views should go into /contrib. I think I can live with that.

Status: Fixed » Closed (fixed)

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

jcmarco’s picture

Status: Closed (fixed) » Needs review

I am afraid that the include directory is not in the chart-6.x-1.x-dev release

BenK’s picture

Subscribing...

askibinski’s picture

subscribing.

the latest -dev with the includes directory from #12 works, but there are some issues, for example the display I choose (e.g. pie chart) is not stored. In other words, the top radio-button is always selected when I edit the settings even though I selected another.

ezra-g’s picture

Status: Needs review » Fixed

The missing files are now committed and should be available in the next dev. Sorry about the mistake.

@askibinski - Please file a new bug report so that we can address your issue.
Thanks!

Status: Fixed » Closed (fixed)

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