Hi, first up this is a great module and it adds such great possibilities to extending drupal.. I'm trying to display some CCK using the amcharting engine... I followed the install documentation stated here http://drupal.org/node/681928 However, when rendered I am not seeing any tooltip when hovering the bars. I'm only seeing a little bubble on top of the bars... (see image attached)

Also is it possible to implement Custom description for any data point? to be more specific, each value/ data field has a related description/comment, could you guys add that feature?
Any help will be greatly appreciated...

Regards

CommentFileSizeAuthor
amcharts-no-tooltip.png17.87 KBbrunox

Comments

capoyeti’s picture

Hiya,

Has anyone replied offline to you? I would like to make similar changes (remove legend) as well as display the hover 'values' via tooltip.

Thanks,
Chad

capoyeti’s picture

So - in my investigation and attempt to solve this for myself, I played around with creating a page (node) that would display the tooltip (balloon) with the bar/column values. I used this post as the basis for the test (http://drupal.org/node/681928 - specifically the post by nhero on January 26th). The page displayed fine, but with no tooltips.

I took the code from the advanced help on amcharts (http://yoursite.com/help/charts_graphs/amcharts) that referred to $canvas->settings

$canvas->settings = array(
  array('#id' => 'column',
    '#children' => array(
      array('#id' => 'sequenced_grow', '#value' => 'true'),
      array('#id' => 'grow_time', '#value' => 5),
      array('#id' => 'hover_brightness', '#value' => -20),
      array('#id' => 'balloon_text', '#cdata' => '{series}: {value}'),
      array('#id' => 'border_color', '#value' => '#999999'),
      array('#id' => 'border_alpha', '#value' => 3)
    )
  ),
  array('#id' => 'line',
    '#children' => array(
      array('#id' => 'hover_brightness', '#value' => -20),
      array('#id' => 'bullet', '#value' => 'round'),
      array('#id' => 'balloon_text', '#cdata' => '{series}: {value}'),
      array('#id' => 'connect', '#value' => 'true'),
    )
  ),
  array('#id' => 'balloon',
    '#children' => array(
      array('#id' => 'alpha', '#value' => 80),
      array('#id' => 'text_color', '#value' => '#000000'),
      array('#id' => 'corner_radius', '#value' => 5),
      array('#id' => 'border_width', '#value' => 3),
      array('#id' => 'border_alpha', '#value' => 50),
      array('#id' => 'border_color', '#value' => '#000000'),
    )
  ),
  array('#id' => 'graphs',
    '#children' => array(
      array('#id' => 'graph',
        '#attributes' => array('gid' => 0),
        '#children' => array(array('#id' => 'type', '#value' => 'line'),
          array('#id' => 'line_width', '#value' => 2),)
      ),
      array('#id' => 'graph',
        '#attributes' => array('gid' => 1),
        '#children' => array(array('#id' => 'type', '#value' => 'column'),)
      ),
      array('#id' => 'graph',
        '#attributes' => array('gid' => 2),
        '#children' => array(array('#id' => 'type', '#value' => 'column'),)
      ),
    )
  ),
);

and inserted it into the code from http://drupal.org/node/681928

This gave me what I needed - the balloon tips worked I got all excited :-)

But the bottom fell out of my world when I realised I didn't know how to apply this to a view.

I tried to insert the quoted code above as a PHP header to the view - but that didn't work. I've read about using hooks (like hook_views_pre_query(), or hook_views_pre_view() ) but don't know to apply these, (have watched a few tutorials on using hooks, but get confused.. :-( )

I'm using 6.20 with the as now latest versions of charts_graphs (6.x-2.7) and views_charts (6.x-1.1)

Can anyone point me in the right direction?
Thanks

rodrigotorrens’s picture

Hi, capoyeti.
I followed your instructions and worked well for me too (tooltips in columns).
Has you or anybody else figured out how to insert this parameters into a view?
Thanks