I installed flot module and no chart is getting displayed. (I have installed all other modules required by flot properly). I get 2 links on my navigation menu, Flot example and Flot view example.

When I click flot example, It displays a blank page with only a title reading "Flot example".

When I click , Flot views example I get the following error...

Fatal error: Call to a member function pre_render() on a non-object in /var/www/d7/sites/all/modules/views/includes/view.inc on line 1133

I tried putting this code in a node body with php enabled,

<?php
$d1 = new flotData(array(array(0, 1), array(4, 8), array(8, 5)));
  $d2 = new flotData(array(array(0, 8), array(3, 5), array(8, 0.5)));
  $variables = array(
    'data' => array($d1, $d2),
    'element' => array(
      'id' => 'flot-example-normal',
      'class' => 'flot-example',
      'style' => "width:600px;height:400px",
    ),
  );
  return theme_flot_graph($variables);
?>

Again, I get nothing just a blank node body.
So how can I fix it..??

Comments

akshaynhegde’s picture

Is anybody out there..??? no one facing the same issue as I am..???

jun’s picture

Facing the same issue. Subscribing.

jun’s picture

Ok, well I got rid of the first problem of the blank page by downloading the flot library http://code.google.com/p/flot/downloads/list into modules/flot (path will be modules/flot/flot/jquery.js)

I found that Flot Fields now works.

flot_views_example still gives the same error as above though..

attiks’s picture

i'll have a look

btc97’s picture

Hi Attiks, have you been able to replicate the error? I get the same error for flot view example and raw flot example view:

An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /admin/structure/views/view/flot_example/preview/page/ajax
StatusText: OK
ResponseText:
Fatal error: Call to a member function pre_render() on a non-object in /Users/ben/Sites/aca/sites/all/modules/views/includes/view.inc on line 1133

attiks’s picture

Assigned: akshaynhegde » jelle_s

I'll ask Jelle_S if he has time today

jelle_s’s picture

Assigned: jelle_s » Unassigned
Status: Active » Fixed

Fixed in the latest dev version =)

btc97’s picture

Thanks Jelle_S and attiks! The views error is gone!

Status: Fixed » Closed (fixed)

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

robertwb’s picture

Issue summary: View changes

I have a similar problem with a blank flot view with title "Flot Example View" and nothing else. I have downloaded the Libraries module, which seemed to be necessary to let flot know where the libraries were living? Links to the flot JS libraries appear in the HTML of the rendered view, but there is a single error in the javascript debugger (I am using Chrome):

Uncaught Error: Time mode requires the flot.time plugin.

I have verified that the file "jquery.flot.time.js" exists in the library path.

Thoughts?