這用于創(chuàng)建橢圓形。
這里是添加橢圓的簡單語法。
xtype: 'draw',
type: 'ellipse',
下面是一個(gè)簡單的例子顯示用法。
<!DOCTYPE html>
<html>
<head>
<link href="./ext-6.0.0/build/classic/theme-classic/resources/theme-classic-all.css" rel="stylesheet" />
<script type="text/javascript" src="./ext-6.0.0/build/ext-all.js"></script>
<script type="text/javascript" src="./ext-6.0.0/build/packages/charts/classic/charts.js"></script>
<script type="text/javascript">
Ext.onReady(function() {
Ext.create({
xtype: 'draw',
renderTo: Ext.getBody(),
width: 600,
height: 200,
sprites: [{
type: 'ellipse',
cx: 100,
cy: 100,
rx: 80,
ry: 50,
fillStyle: '#1F6D91'
}]
});
});
</script>
</head>
<body>
</body>
</html>
這將產(chǎn)生以下結(jié)果
更多建議: