mirror of
https://github.com/apache/superset.git
synced 2024-09-12 08:39:45 -04:00
[hotfix] piechart goes black on refresh (#424)
This commit is contained in:
parent
a8d0ae1361
commit
a3a9ec926f
@ -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) {
|
||||
@ -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]);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user