View Full Version : How to show SVG data in a panel

10 Apr 2014, 10:59 PM
I want to show SVG data in a Ext.panel.Panel,this data come form the server,
i find the Ext4 have the component 'Ext.draw.engine.Svg',
but i don't find any example about how to use this component ,
somebody know how to use this ? or their have others solution for SVG? ths

10 Apr 2014, 11:11 PM
I use something like this:

var drawComponent = Ext.create('Ext.draw.Component', {
height: 300,
widht: 300,
viewBox: false,
renderTo: Ext.getBody()

var sprite = drawComponent.surface.add({
type: 'path',
stroke: '#00f',
path: "M150 0 L75 200 L225 200 Z"

if you want, you can add the drawComponent inside a panel as an item.