Gab*_*ira 14
由于Ext.chart.Chart是一个Ext.draw.Component,您可以添加精灵作为它的项目.试着用这个:
Ext.create('Ext.chart.Chart', {
default chart settings here
...
items: [{
type : 'text',
text : 'Simple Title',
font : '14px Arial',
width : 100,
height: 30,
x : 50, //the sprite x position
y : 10 //the sprite y position
}]
})
Run Code Online (Sandbox Code Playgroud)
您只需将一个精灵添加到cart.surface:
var chart = Ext.create('Ext.chart.Chart', {
... default chart settings here ...
});
var sprite = Ext.create('Ext.draw.Sprite', {
type: 'text',
surface: chart.surface,
text: 'Simple text',
font: '12px Arial',
x: 50,
y: 0,
width: 100,
height: 100
});
sprite.show(true);
chart.surface.add(sprite);
Run Code Online (Sandbox Code Playgroud)
希望能帮助到你.
| 归档时间: |
|
| 查看次数: |
15399 次 |
| 最近记录: |