I try to use DC.js
, but I don't manage to load an external csv
using d3.csv
.
Here is the JSfiddle
working (with no external csv
) : http://jsfiddle.net/nicart/6k96mzta/1/
But I can't call the csv spendData.csv
(host here : https://raw.githubusercontent.com/nicart/DC-js-chart/master/spendData.csv)
I try some code, but i'm new to JS, sorry... I thought this was ok but nothing happened.
d3.csv('https://raw.githubusercontent.com/nicart/DC-js-chart/master/spendData.csv', function(error, spendData) {
spendData.forEach(function(d) {
d.Spent = d.Spent.match(/\d+/);
});
Is there a possibility to make something like this ?
var spendData = d3.csv('https://raw.githubusercontent.com/nicart/DC-js-chart/master/spendData.csv')
Thanks.