AnsweredAssumed Answered

Has anyone successfully gotten the sucrose charting project working?

Question asked by Alan Apter on Sep 1, 2016

Sucrose is SugarCRM's open source charting project available here: GitHub - sugarcrm/sucrose: Sucrose Charts: SugarCRM's Chart Library based on D3.js. There is an example over here: Sucrose Charts.

 

I've tried cloning it (Ubuntu 14.04), and following the steps to get it working, but I haven't successfully managed to do it. On a clean machine, the steps I tried were:

 

To install node:

curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -

sudo apt-get install -y nodejs

 

To install/update npm:

npm install npm -g

 

To get sucrose running:

git clone https://github.com/sugarcrm/sucrose.git

128 cd sucrose/

npm i --save-dev

make clean

make all

 

To get the code in the right places:

cp *.css examples/css/

cp *.js examples/js/

 

To get the missing libraries:

examples/js
wget http://sucrose.io/js/jquery.min.js
wget http://sucrose.io/js/d3.min.js
wget http://sucrose.io/js/queue.min.js
wget http://sucrose.io/js/jquerymy.min.js
wget http://sucrose.io/js/
wget http://sucrose.io/js/topojson.min.js

 

I've verified that sucrose.js, sucrose.min.js, sucrose.css, and sucrose.min.css are still in the repo directory.

 

The error message I'm getting is:

 

jquerymy.min.js:4 Form sucrose-gauge failed to initialize. m is not defined ReferenceError: m is not defined
at applyConfigurationSettings (http://138.68.128.197/sucrose/examples/js/app.min.js:4:1272)
at Object.getConfig (http://138.68.128.197/sucrose/examples/js/app.min.js:4:8900)
at Object.get (http://138.68.128.197/sucrose/examples/js/app.min.js:4:9081)
at Object.init (http://138.68.128.197/sucrose/examples/js/app.min.js:4:22319)
at F (http://138.68.128.197/sucrose/examples/js/jquerymy.min.js:4:11866)
at r (http://138.68.128.197/sucrose/examples/js/jquerymy.min.js:4:16564)
at g (http://138.68.128.197/sucrose/examples/js/jquerymy.min.js:4:14070)
at n.I (http://138.68.128.197/sucrose/examples/js/jquerymy.min.js:4:18992)
at n.a.fn.my (http://138.68.128.197/sucrose/examples/js/jquerymy.min.js:5:10952)
at Object.loadForm (http://138.68.128.197/sucrose/examples/js/app.min.js:4:25265)

 

My instance is at Sucrose Charts  - you have to click on a specific chart to get this error.

 

Anyone else had this problem?

Outcomes