Sorry if I ask but I installed this module and I wanted to use because it seems it gives graphical representation of the statistics.
Once I installed I have not clue where to go in order to visualize the charts.

Do I miss something please?

Comments

aendra’s picture

+1 -- more documentation is really needed!

sinasalek’s picture

README does not provide enough information :) had to read the code to figure out how it works. and ... it highcharts doesn't work :)

sinasalek’s picture

Title: Chart visualization? » Improving Documentation

Ok, i found a small typo in the example, here is correct one (i added enabled=>'true')
The problem is google chart doesn't need that :)

function example_page() {
  $data = array(
    array('fruit' => 'apple', 'votes' => 5),
    array('fruit' => 'mango', 'votes' => 3),
    array('fruit' => 'banana', 'votes' => 4),
  );

  $options = array(
    'title' => 'Favourite fruits',
    'fields' => array(
      'votes' => array(
        'label' => t('Votes'),
        'enabled' => TRUE,
      ),
    ),
    'xAxis' => array(
      'labelField' => 'fruit',
    ),
    'data' => $data,
    'type' => 'pie',
  );

  return array(
    '#theme' => 'visualization',
    '#options' => $options,
  );

}
aendra’s picture

@sinaselek -- Interesting, thanks for doing that! I might look through the API code later -- I'm needing to ultimately find a way of using Drupal to feed d3.js visualizations, this module seems like the best way forward at the moment.

(While I'm here -- I've started a new group to discuss approaches to data visualization in Drupal; if this is a topic that interests you, please join!)

jordanmagnuson’s picture

When running this example in vanilla form, I'm getting this error message in watchdog:

Notice: Undefined index: fruit in GoogleVisualizationAPIHandler->render() (line 36 of /srv/www/pixelscrapper.com/public_html/sites/all/modules/visualization/includes/plugins/google_visualization_api.inc).

Any thoughts?

jordanmagnuson’s picture

Solved #5 above by adding fruit as a disabled field. Not sure if that's the intended behavior, or if there's a bug in the module...

function example_page() {
  $data = array(
    array('fruit' => 'apple', 'votes' => 5),
    array('fruit' => 'mango', 'votes' => 3),
    array('fruit' => 'banana', 'votes' => 4),
  );

  $options = array(
    'title' => 'Favourite fruits',
    'fields' => array(
      'fruit' => array(
        'label' => t('Fruit'),
        'enabled' => FALSE,
      ),
      'votes' => array(
        'label' => t('Votes'),
        'enabled' => TRUE,
      ),
    ),
    'xAxis' => array(
      'labelField' => 'fruit',
    ),
    'data' => $data,
    'type' => 'pie',
  );

  return array(
    '#theme' => 'visualization',
    '#options' => $options,
  );

}
cvangysel’s picture

Thanks! - I committed the updated snippet to the code base, and I also just realised that I didn't attribute the code to you (sorry for that). I currently don't have the time to work on anything new, but I am willing to review patches and commit then to the repository.

robertwb’s picture

Where does the documentation for this module live? I have just done an install and test on my own data, and found a small issue that would be useful to report. The path given in the videos that I have seen on the web show the highcharts library as going in ./sites/libraries/highcharts/, but then the module fails silently to produce a graph (need to get that error in the mix as well) and in the log appears "File Does not Exist: /var/www/html/js/highcharts.js", indicating that it is looking at the httpd root for highcharts.js.

So... I guess I have 3 questions:
1) where do the docs live
2) where is the configuration option for the library paths?
3) Should the library path be made a part of the configuration screen?

Thanks!
r.b.

robertwb’s picture

A follow-on to my previous question - should the docs for this module be going here: https://drupal.org/node/add/book/parent/22361

I would be more than happy to begin with an installation steps doc snippet, since I will be writing it down for my own self as I install into my live project and will need to keep my head straight.

Or, if it already lives somewhere else...
r.b.

rudyard55’s picture

Issue summary: View changes

+1 trying to find documentation for implementation of a view.

ranelpadon’s picture

this is a clear and concise demo of using this module with Views

Pierre.Vriens’s picture

Status: Active » Needs work

I just created a "stub" in the community docu about this module, where I included for now some links to a few videos, and suggestions for other charting modules that I think have a community docu structure (child pages etc) that is worth considering for this module also.

If the offer in #9 still stands (after X years?), please go ahead and let the documentation "flow"!

Note: that link is now also added to the project page (Read docu).

Pierre.Vriens’s picture

Title: Improving Documentation » Create community documentation about the Visualization module
Component: User interface » Documentation
Category: Support request » Task

Thank you Ranel for the video mentioned in #11 (it is one of the video links I just added in the community docu).

Anybody aware of any other videos? If so please add them in the community docu (you can edit that too ... and it's free of charge ...).