[hotfix] load selectors in render

This commit is contained in:
Maxime Beauchemin
2017-01-19 15:27:01 -08:00
parent 4a9888157e
commit 0807a8d016
13 changed files with 22 additions and 23 deletions

View File

@@ -4,7 +4,7 @@ import d3 from 'd3';
require('./histogram.css');
function histogram(slice) {
const div = d3.select(slice.selector);
let div;
const draw = function (data, numBins) {
// Set Margins
@@ -128,6 +128,7 @@ function histogram(slice) {
};
const render = function () {
div = d3.select(slice.selector);
d3.json(slice.jsonEndpoint(), function (error, json) {
if (error !== null) {
slice.error(error.responseText, error);