I think the problem is that the bean dependency found at the top of
Flotr2.js has bootstrap code that will load itself as a require module
when require.js is present (if (typeof define == 'function' && typeof
define.amd == 'object')) rather than a global bean variable. The
same problem may exist if you are using bonzo.js.
Since Flotr itself is not setup as a require module, it can't find
bean as a dependency anymore. You may be able restructure Flotr as a
module with deps of ['bean"] (maybe "underscore" and "bonzo" also),
but I'm not sure how difficult it might be. A shortcut would be to
disable the require (define) check in the bean code to keep it loaded
as a global variable.
If anyone makes the conversion of Flotr to use require, hopefully they
will make it available here.
On May 8, 1:26 pm, KT <
justinsip...@gmail.com> wrote:
> Hello,
>
> Simple examples with Flotr2 work just fine for me. But as soon as I
> introduce requireJS and load Flotr as a module, it stops working. I'm not
> totally sure what I am doing wrong, but I was wondering if there are any
> examples of Flotr2 working along with requireJS or some other AMD loader.
> It seems like Flotr2 was designed to work in this fashion, but maybe not.
>
> I am having this problem in the work I'm doing, but I also put that aside
> and made a test HTML file. I started with the example HTML given here:
http://humblesoftware.com/flotr2/documentation. That worked 100%. Then I