Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[hotfix] piechart goes black on refresh #424

Merged
merged 1 commit into from
May 3, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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