PDA

View Full Version : [FIXED] package: sencha-charts! Sprites aren't rendered



hlurger
8 May 2014, 11:06 AM
Ext.application({ name : 'Fiddle',


requires: [
'Ext.draw.Container'
],

launch : function() {
/* //Ext js 5 version: not working. Package: "sencha-charts" */
//only a empty draw.Container is renderd. No circle
Ext.create('Ext.draw.Container', {
renderTo: Ext.getBody(),
width: 200,
height: 200,
fullscreen:true,
//surface: new Ext.draw.Surface({height:'100%',width: '100%'}),
items: [{
type: 'circle',
cx: 5,
cy: 5,
r: 85,
fillStyle: 'blue'
}]
});

/* //Ext JS 4 version: working, or package: 'ext-charts'
Ext.create('Ext.draw.Component', {
renderTo: Ext.getBody(),
width: 200,
height: 200,
items: [{
type: 'circle',
radius: 90,
x: 100,
y: 100,
fill: 'blue'
}]
});*/
}
});


With 'sencha-charts' there is only a white empty box (no circle).

Expected result: I should see the circle

mitchellsimoens
8 May 2014, 12:55 PM
Thanks for the report! I have opened a bug in our bug tracker.

bob4ever
5 Aug 2014, 1:49 AM
Mhh you just need to replace "items" with "sprites":



Ext.create('Ext.draw.Container', {
renderTo: Ext.getBody(),
width: 200,
height: 200,
fullscreen:true,
sprites: [{
type: 'circle',
cx: 5,
cy: 5,
r: 85,
fillStyle: 'blue'
}]
});


I think the entry in the bug tracker can be closed ;).

jjohnston
19 Aug 2014, 1:58 PM
Hmm, if 'sprites' is the correct/supported way to do this, then:

the class docs for Ext.draw.Container need to be fixed because they currently contain example code that uses 'items' for the sprites.
the 'sprites' config is currently marked as private so that needs to be made public.