Hey all,
Huge thanks for any help from this group.
So I'm running into an issue in my rails app when it comes to using d3. Currently, I can't get the data to display from within the rails app.
We are generating the json data via rails, then within the particular view, trying to access it with d3.
EX:
// assigning the json data to a variable
var data = <%= raw(bar_chart_report.data.to_json) %>;
// trying to access that data with d3
d3.json(data, function(error, data){
if (error) {alert('error');}
else {console.log(data);}
});
I've ran a quick for/loop to make sure the data is obtainable via JS in general, and so far so good. I just can't access the data when using d3. Curious if anyone has some knowledge to help lead me in the right direction.
Thanks!