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...