Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var delta = (rect.height < 8 || rect.width < 8 ) ? 4 : 0;
if (x >= rect.x - delta
&& x <= (rect.x + rect.width + delta)
&& y >= rect.y - delta
&& y <= (rect.y + rect.height + delta)
) {
// 矩形内
return true;
}
else {
return false;
}
}
};
zrUtil.inherits(Icon, Base);
return Icon;
});
// Implement onframe
onframe: function (deltaTime) {
if (this._animatingMarkPointRenderable) {
var renderable = this._animatingMarkPointRenderable;
// Have markpoint animation
if (renderable.geometry.getVertexNumber() > 0) {
this._elapsedTime += deltaTime / 1000;
renderable.material.set('elapsedTime', this._elapsedTime);
this.chart.zr.refreshNextFrame();
}
}
}
};
zrUtil.inherits(LargeMarkPoint, MarkBase);
return LargeMarkPoint;
});
{ position: [ x, y ] }
)
.done(animationDone)
.start();
}
}
}
// 没有动画
if (!aniCount) {
animationDone();
}
}
};
zrUtil.inherits(K, ChartBase);
// 图表注册
require('../chart').define('k', K);
return K;
});
},
// Implement getSceneNode
getSceneNode: function () {
return this._markBarRenderable;
},
// Implement clear
clear: function () {
if (this._markBarRenderable) {
this._markBarRenderable.geometry.clearBars();
}
}
};
zrUtil.inherits(MarkBar, MarkBase);
return MarkBar;
});
]
});
ecData.pack(
textShape,
serie, seriesIndex,
data, dataIndex,
data.name
);
this.shapeList.push(textShape);
}
};
zrUtil.inherits(Cloud, ChartBase);
// 图表注册
require('../chart').define('wordCloud', Cloud);
return Cloud;
});
}
this.messageCenter.dispatch(
ecConfig.EVENT.PIE_SELECTED,
param.event,
{
selected: this._selected,
target: ecData.get(target, 'name')
},
this.myChart
);
this.zr.refreshNextFrame();
}
};
zrUtil.inherits(Pie, ChartBase);
// 图表注册
require('../chart').define('pie', Pie);
return Pie;
});
* 根据值换算位置
* @param {number} idx 坐标轴索引0~1
*/
getAxis : function (idx) {
return this._axisList[idx];
},
clear : function () {
for (var i = 0, l = this._axisList.length; i < l; i++) {
this._axisList[i].dispose && this._axisList[i].dispose();
}
this._axisList = [];
}
};
zrUtil.inherits(Axis, Base);
require('../component').define('axis', Axis);
return Axis;
});
aniCount++;
this.zr.animate(this.shapeList[i].id, '').when(this.query(this.option, 'animationDurationUpdate'), {
position: [
x,
y
]
}).done(animationDone).start();
}
}
}
if (!aniCount) {
animationDone();
}
}
};
zrUtil.inherits(K, ChartBase);
require('../chart').define('k', K);
return K;
});
this.shapeList[i].position = [
0,
0
];
this.zr.animate(this.shapeList[i].id, '').when(this.query(this.option, 'animationDurationUpdate'), {
position: [
x,
y
]
}).start();
}
}
}
}
};
zrUtil.inherits(Bar, ChartBase);
require('../chart').define('bar', Bar);
return Bar;
});
deg += dStep;
for (var i = 0, end = n - 1; i < end; i ++) {
ctx.lineTo(x + r * Math.cos(deg), y + r * Math.sin(deg));
deg += dStep;
}
ctx.lineTo(xStart, yStart);
}
};
legendIcon.chord = legendIcon.pie;
legendIcon.map = legendIcon.bar;
for (var k in legendIcon) {
IconShape.prototype.iconLibrary['legendicon' + k] = legendIcon[k];
}
zrUtil.inherits(Legend, Base);
require('../component').define('legend', Legend);
return Legend;
});