|
|
|
@ -10573,13 +10573,15 @@ nv.models.pie = function() {
|
|
|
|
|
, startAngle = false
|
|
|
|
|
, endAngle = false
|
|
|
|
|
, donutRatio = 0.5
|
|
|
|
|
, dispatch = d3.dispatch('chartClick', 'elementClick', 'elementDblClick', 'elementMouseover', 'elementMouseout')
|
|
|
|
|
, duration = 250
|
|
|
|
|
, dispatch = d3.dispatch('chartClick', 'elementClick', 'elementDblClick', 'elementMouseover', 'elementMouseout', 'renderEnd')
|
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
//============================================================
|
|
|
|
|
|
|
|
|
|
var renderWatch = nv.utils.renderWatch(dispatch);
|
|
|
|
|
|
|
|
|
|
function chart(selection) {
|
|
|
|
|
renderWatch.reset();
|
|
|
|
|
selection.each(function(data) {
|
|
|
|
|
var availableWidth = width - margin.left - margin.right,
|
|
|
|
|
availableHeight = height - margin.top - margin.bottom,
|
|
|
|
@ -10748,7 +10750,7 @@ nv.models.pie = function() {
|
|
|
|
|
|
|
|
|
|
return Math.floor(coordinates[0]/avgWidth) * avgWidth + ',' + Math.floor(coordinates[1]/avgHeight) * avgHeight;
|
|
|
|
|
};
|
|
|
|
|
pieLabels.transition()
|
|
|
|
|
pieLabels.watchTransition(renderWatch,'pie labels')
|
|
|
|
|
.attr('transform', function(d) {
|
|
|
|
|
if (labelSunbeamLayout) {
|
|
|
|
|
d.outerRadius = arcRadius + 10; // Set Outer Coordinate
|
|
|
|
@ -10819,6 +10821,7 @@ nv.models.pie = function() {
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
renderWatch.renderEnd('pie immediate');
|
|
|
|
|
return chart;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -10952,6 +10955,13 @@ nv.models.pie = function() {
|
|
|
|
|
labelThreshold = _;
|
|
|
|
|
return chart;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
chart.duration = function(_) {
|
|
|
|
|
if (!arguments.length) return duration;
|
|
|
|
|
duration = _;
|
|
|
|
|
renderWatch.reset(duration);
|
|
|
|
|
return chart;
|
|
|
|
|
};
|
|
|
|
|
//============================================================
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -10980,6 +10990,7 @@ nv.models.pieChart = function() {
|
|
|
|
|
, state = {}
|
|
|
|
|
, defaultState = null
|
|
|
|
|
, noData = "No Data Available."
|
|
|
|
|
, duration = 250
|
|
|
|
|
, dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState','renderEnd')
|
|
|
|
|
;
|
|
|
|
|
|
|
|
|
@ -11006,6 +11017,8 @@ nv.models.pieChart = function() {
|
|
|
|
|
|
|
|
|
|
function chart(selection) {
|
|
|
|
|
renderWatch.reset();
|
|
|
|
|
renderWatch.models(pie);
|
|
|
|
|
|
|
|
|
|
selection.each(function(data) {
|
|
|
|
|
var container = d3.select(this),
|
|
|
|
|
that = this;
|
|
|
|
@ -11247,6 +11260,14 @@ nv.models.pieChart = function() {
|
|
|
|
|
return chart;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
chart.duration = function(_) {
|
|
|
|
|
if (!arguments.length) return duration;
|
|
|
|
|
duration = _;
|
|
|
|
|
renderWatch.reset(duration);
|
|
|
|
|
pie.duration(duration);
|
|
|
|
|
return chart;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
//============================================================
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|