Skip to content

Commit

Permalink
[hotfix] piechart goes black on refresh (#424)
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed May 3, 2016
1 parent a8d0ae1 commit a3a9ec9
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions caravel/assets/visualizations/nvd3_vis.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,13 @@ require('./nvd3_vis.css');

function nvd3Vis(slice) {
var chart;
var colorKey = 'key';

var render = function () {
$.getJSON(slice.jsonEndpoint(), function (payload) {
var fd = payload.form_data;
var viz_type = fd.viz_type;

var f = d3.format('.3s');
var colorKey = 'key';

nv.addGraph(function () {
if (!chart) {
Expand Down Expand Up @@ -196,7 +195,6 @@ function nvd3Vis(slice) {
chart.y2Axis.tickFormat(d3.format(fd.y_axis_format));
}
}

chart.color(function (d, i) {
return px.color.category21(d[colorKey]);
});
Expand Down

0 comments on commit a3a9ec9

Please sign in to comment.