1
Я пытаюсь отобразить ящик из nv.d3.js. v.1.8.5 и d3.js v.3.4.4. Я добавляю файл d3.js до того nv.d3.js файла из index.html .the кода брейков говоря boxplots.watchTransition is not a function
watchTransition() не является функцией в nv.d3.js с angular.js
Ниже мой код
d3.selection.prototype.watchTransition = function(renderWatch){
var args = [this].concat([].slice.call(arguments, 1));
return renderWatch.transition.apply(renderWatch, args);
};
А позже в коде
boxplots.watchTransition(renderWatch, 'nv-boxplot: boxplots')
.style('stroke-opacity', 1)
.style('fill-opacity', 0.75)
.delay(function(d,i) { return i * duration/data.length })
.attr('transform', function(d,i) {
return 'translate(' + (xScale(getX(d,i)) + xScale.rangeBand() * 0.05) + ', 0)';
});