Sencha charts 패키지 사용하기

2024. 12. 14. 21:54Javascript/Sencha

생성한 charts 패키지를 붙여넣기

index.html

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="theme-classic-all.css">
<script type="text/javascript" src="ext-all.js"></script>
<script type="text/javascript" src="packages/charts/classic/charts.js"></script>
<script type="text/javascript" src="Test.js"></script>

Test.js

Ext.onReady(function () {
    var drawContainer = Ext.create('Ext.draw.Container', {
        renderTo: Ext.getBody(), // Render to the body of the HTML
        width: 200,             // Width of the container
        height: 200,            // Height of the container
        sprites: [
            {
                type: 'circle',      // Circle sprite type
                fillStyle: '#79BB3F',// Green fill color
                r: 100,              // Radius
                x: 100,              // X-coordinate
                y: 100               // Y-coordinate
            }
        ]
    });
});