genuinesmile29 Posted June 30, 2016 Share Posted June 30, 2016 I'm trying to build a custom visualization component that uses d3 and nv.d3 (a chart library build on top of d3). Below is my build.js file:({ baseUrl: '', paths: {'d3': 'd3.min','nvd3': 'nv.d3.min','SpectrumBarChart': 'SpectrumBarChart' }, name: "SpectrumBarChart", out: "SpectrumBarChart.min.js"})Insice my CVC's js file we have this format taken from the Wiki:define(['d3'], function (d3) { return function (instanceData) { //code goes here }; });I need to pull in the nv.ds object so I can utilize the library but I'm not sure how to go about it. I think I understand how to express teh dependencies but how can I pull extra arguments into the function:? This doesn't work:define(['d3', 'nvd3'], function (d3, nvd3) { return function (instanceData) { d3.doStuff(); nvd3.doStuff(); //code goes here }; }); Link to comment Share on other sites More sharing options...
jrburris66_1 Posted April 18, 2017 Share Posted April 18, 2017 Did you ever figure this out? I'm trying to do the same thing and I'm not finding a lot of help. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now