Bean not found

118 views
Skip to first unread message

Joseph

unread,
Jul 4, 2012, 11:12:08 PM7/4/12
to Envision.js
Hi, I am trying to replicate the time series as it is in this fiddle
(http://jsfiddle.net/kYt7E/1/) except my javascript isn't inline, I'm
using an mvc approach. after running the code I get a "bean is not
defined" error in the envision.min file line 45. I don't know what I
might be doing wrong... Any help is appreciated. below is the html/js
file

JS
define(['lib/envision.min','jquery'], function() {"use strict";

var TimelineView = ( function() {

/**
* Constructor
*/
function TimelineView() {

function initTimeline() {
var container = document.getElementById('my-
timeline'),
x = [],
y1 = [],
y2 = [],
data,
options,
i;

// Data Format:
data = [[x, y1], // First Series
[x, y2] // Second Series
];

// Sample the sine function for data
for( i = 0; i < 4 * Math.PI; i += 0.05) {
x.push(i);
y1.push(Math.sin(i));
y2.push(Math.sin(i + Math.PI));
}
x.push(4 * Math.PI)
y1.push(Math.sin(4 * Math.PI));
y2.push(Math.sin(4 * Math.PI));

// TimeSeries Template Options
options = {
// Container to render inside of
container : container,
// Data for detail (top chart) and summary (bottom
chart)
data : {
detail : data,
summary : data
}
};

// Create the TimeSeries
new envision.templates.TimeSeries(options);
}

this.init = function() {
initTimeline();
};
}

return TimelineView;
}());

return new TimelineView();
});

HTML
<section>

<div id="my-timeline" />

</section>

even if I comment out the "initTimeline()" call, I still get the
error...

Carl Sutherland

unread,
Jul 8, 2012, 1:33:31 PM7/8/12
to envis...@googlegroups.com
Hello Joseph, is this related?  https://github.com/HumbleSoftware/Flotr2/issues/89

-Carl

Jose Antonio

unread,
May 31, 2013, 6:28:22 PM5/31/13
to envis...@googlegroups.com
Hi Joseph, I'm running into this same issue with envision.min.js. Can you share how you solved it?
Thanks

Willian Molinari

unread,
Jul 3, 2013, 5:43:13 AM7/3/13
to envis...@googlegroups.com
Æ!!

Any chance of getting it to work with requirejs? I've tried the steps for the flotr2 AMD but still got the "bean not found" error...
Ideas?

Thanks,

--
PotHix

Willian Molinari

unread,
Jul 3, 2013, 5:48:50 AM7/3/13
to envis...@googlegroups.com
Æ!!

Just for the record, I'm trying the version from the repository. I found some commits about making envision ready for AMD.
Should it work good?

Thanks!

--
PotHix

Willian Molinari

unread,
Jul 3, 2013, 8:04:40 PM7/3/13
to envis...@googlegroups.com
Æ!!

Just spend a couple of hours on this task, so I'll write it here for the next developer.
Just use the AMD version of Flotr2 and envision. 

So, you need to download the envision repository, set up the dependencies and run `make amd` to generate the amd versions on the build directory.
You'll need all the envisionjs dependencies checked out on your repositories as well https://github.com/HumbleSoftware/envisionjs#dependencies

After following these steps you just need to use the same idea as Carl recommended.

Hope it helps,

--
PotHix
Reply all
Reply to author
Forward
0 new messages