Skip to content

Instantly share code, notes, and snippets.

@natecavanaugh
Created November 1, 2012 16:27
Show Gist options
  • Save natecavanaugh/3994846 to your computer and use it in GitHub Desktop.
Save natecavanaugh/3994846 to your computer and use it in GitHub Desktop.
add shape to chart
/*pc = A.Widget.getByNode($0);
g = pc.get("graph").get("graphic");
var w = g.get('width'), h = g.get('width');
var nw = w - 100, nh = h - 100;
var c = g.addShape({type: 'circle',
width: nw,
height: nh,
x: 100,
y: 100,
fill: {color: '#ffffff'},
stroke: {color: '#555555', width: 1}
});
*/
/*xy = g.getXY();
diff = 40;
xy[0] += diff/2;
xy[1] += diff/2;
c.setXY(xy);
c.set('width', w - diff);
c.set('height', h - diff);
c.set('fill', {type: "radial",
stops: [
{"color":"#555","opacity":1,"offset":0},
{"color":"#000","opacity":1,"offset":1}
],
cx: 0.5,
cy: 0.5,
fx: 0.48,
fy: 0.02,
r: 0.49,
rotation: 0
});
*/
A.one('#aui_3_7_2_1_1395').center('#aui_3_7_2_1_1402')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment