In views preview, I'm unable to see the graph.

There is on javascript error "Drupal.settings.Dataviz is undefined". This is caused becuase of the following code

$output[] = '<script>Drupal.settings.Dataviz.chart.' . $chart_id . ' = null;jQuery.extend(true, Drupal.settings.Dataviz, ' . json_encode($settings) . ');</script>';

Comments

JurriaanRoelofs’s picture

Not sure what's the best way to fix this, it doesn't work because the views_dataviz javascript assets are not present on the views admin pages.

cursor’s picture

Would it be possible to load them by a hook or something? Previewing is essential if you want to look at how it's rendering. BTW a view other charts can render in Preview, maybe one could look at that for ideas?