hi,

i tried your module but i didn´t got any output from jquery. to debug the code i copied the html table and the js into a single html page. I deleted Drupal.settings. in front of jqueryVisualize to work with normal js variables. After adding a var jqueryVisualize = Array(); before the code i got a graph output.

not working

<script type="text/javascript">
  $(function(){
      jqueryVisualize['xxx_all-page_1'] = { "type": "pie", ...};
      $(".xxx_all-page_1-graph").visualize(jqueryVisualize['xxx_all-page_1']);
  });
</script>

working

<script type="text/javascript">
  $(function(){
     var jqueryVisualize = Array();
      jqueryVisualize['xxx_all-page_1'] = { "type": "pie", ...};
      $(".xxx_all-page_1-graph").visualize(jqueryVisualize['xxx_all-page_1']);
  });
</script>

did i something wrong with config, or is this a bug?

regards,
dominik

CommentFileSizeAuthor
#2 Bild 1.png20.72 KBnodestroy

Comments

javi-er’s picture

are you using it with a view or standalone? take a look to the documentation here http://drupal.org/node/541370
If you can, please post the view or the code that you are using.

Thanks,
Javier

nodestroy’s picture

StatusFileSize
new20.72 KB

thanks for your replay,
i am using it together with views, here is the views export code:


$view = new view;
$view->name = 'test';
$view->description = 'Lists existing datasets.';
$view->tag = '';
$view->view_php = '';
$view->base_table = 'sam_general';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->override_option('fields', array(
  'timestamp' => array(
    'label' => 'Timestamp',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'strip_tags' => 0,
      'html' => 0,
    ),
    'exclude' => 0,
    'id' => 'timestamp',
    'table' => 'sam_general',
    'field' => 'timestamp',
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'none',
  ),
  'count' => array(
    'id' => 'count',
    'table' => 'sam_general',
    'field' => 'count',
  ),
));
$handler->override_option('access', array(
  'type' => 'none',
));
$handler->override_option('cache', array(
  'type' => 'none',
));
$handler->override_option('title', 'Report - xxx');
$handler->override_option('empty', 'No datasets available.');
$handler->override_option('empty_format', '1');
$handler->override_option('style_plugin', 'jquery_visualize');
$handler->override_option('style_options', array(
  'grouping' => '',
  'override' => 1,
  'sticky' => 0,
  'order' => 'asc',
  'columns' => array(
    'timestamp' => 'timestamp',
    'count' => 'count',
  ),
  'info' => array(
    'timestamp' => array(
      'separator' => '',
    ),
    'count' => array(
      'separator' => '',
    ),
  ),
  'default' => '-1',
  'char_type' => array(
    'options' => 'bar',
  ),
  'global' => array(
    'hide_table' => 0,
    'width' => '',
    'height' => '',
    'appendTitle' => '1',
    'title' => '',
    'appendKey' => '1',
    'colors' => '#be1e2d,#666699,#92d5ea,#ee8310,#8d10ee,#5a3b16,#26a4ed,#f45a90,#e9e744',
    'textColors' => '',
    'parseDirection' => 'y',
  ),
  'char_type_bar' => array(
    'barMargin' => '1',
    'barGroupMargin' => '1',
  ),
  'char_type_line_area' => array(
    'lineWeight' => '4',
  ),
  'char_type_pie' => array(
    'pieMargin' => '20',
    'pieLabelPos' => 'inside',
  ),
));
$handler = $view->new_display('page', 'Page', 'page_1');
$handler->override_option('style_options', array(
  'grouping' => '',
  'override' => 1,
  'sticky' => 0,
  'order' => 'asc',
  'columns' => array(
    'timestamp' => 'timestamp',
    'count' => 'count',
  ),
  'info' => array(
    'timestamp' => array(
      'separator' => '',
    ),
    'count' => array(
      'separator' => '',
    ),
  ),
  'default' => '-1',
  'char_type' => array(
    'options' => 'line',
  ),
  'global' => array(
    'hide_table' => 0,
    'width' => '',
    'height' => '',
    'appendTitle' => '1',
    'title' => '',
    'appendKey' => '1',
    'colors' => '#be1e2d,#666699,#92d5ea,#ee8310,#8d10ee,#5a3b16,#26a4ed,#f45a90,#e9e744',
    'textColors' => '',
    'parseDirection' => 'y',
  ),
  'char_type_bar' => array(
    'barMargin' => '1',
    'barGroupMargin' => '1',
  ),
  'char_type_line_area' => array(
    'lineWeight' => '4',
  ),
  'char_type_pie' => array(
    'pieMargin' => '20',
    'pieLabelPos' => 'inside',
  ),
));
$handler->override_option('path', 'sam/all');
$handler->override_option('menu', array(
  'type' => 'normal',
  'title' => 'All Datasets',
  'description' => '',
  'weight' => '0',
  'name' => 'primary-links',
));
$handler->override_option('tab_options', array(
  'type' => 'none',
  'title' => '',
  'description' => '',
  'weight' => 0,
));


attached what the output looks like

regards,
dominik

gantenx’s picture

I experienced same problem. I solved this problem after changing javascript files (visualize.jQuery.js) permission to 644 and clear my browser's cache.

I think the visualize.jQuery.js file in visualize module package has 600 file permission. When the package extracted, the visualize.jQuery.js file permission is leave as it is in the package. Since I always extracts modules manually using non-www user, access to visualize.jQuery.js file will be forbidden.

nodestroy’s picture

Status: Active » Closed (fixed)

Mine had 000 perms, with 644 all works fine.

My mistake ;)