Open hellznrg opened 6 years ago
Follow the changes mentioned below.
const generate = R.curryN(3, co.wrap(function * (type, options, data) {
const environment = yield chartist.initialize();
const window = environment.window;
const Chartist = environment.Chartist;
// process options
options = is.function(options) ? options(Chartist) : options;
if (is.not.json(options)) throw new TypeError('options must be an object or a function that returns an object.');
options = Ru.defaults({ legend: true }, options);
// create chart
const chart = yield generateChart(Chartist, window, type, options, data);
const legend = options.legend ? generateLegend(data) : '';
- return `<div class="ct-chart">${chart}${legend}</div>`;
+ return `${chart}${legend}`;
}));
When I generate a chart, it returns a DIV enclosing a SVG. How can I get node-chartist to give me just the SVG?