EXTJS4自学手册——分组雷达图

一、数据容器:

var groupRadarCharStore = Ext.create('Ext.data.JsonStore', {
    fields: ['', '', '', ''],
    data: [
        { '': 10000, '': 8000, '': 7000, '': '2008' },
        { '': 11000, '': 10000, '': 8000, '': '2009' },
        { '': 8000, '': 11000, '': 10000, '': '2010' },
        { '': 15000, '': 11500, '': 11000, '': '2011' }
    ]
});

二、创建雷达图:

Ext.define("ExtStudy.GroupRadarChar", {
    extend: 'Ext.window.Window',
    width: 500,
    height: 300,
    layout: 'fit',
    maximizable: true,
    items: {
        xtype: 'chart',
        style: 'background:#fff',
        animate: true,
        store: groupRadarCharStore,
        axes: [{//显示雷达图坐标
            type: 'Radial',
            position: 'radial',
            label: {
                display: true
            }
        }],
        legend: {
            position: 'right'
        },
        series: [{
            type: 'radar',//采用线形图
            xField: '',
            yField: '',
            showInLegend: true,
            showMarkers: true,
            highlight: true,
            markerConfig: {
                radius: 4
            },
            style: {
                'stroke-width': 2,
                fill: 'none'
            }
        }, {
            type: 'radar',//采用线形图
            xField: '',
            yField: '',
            showInLegend: true,
            showMarkers: true,
            highlight: true,
            markerConfig: {
                radius: 4
            },
            style: {
                'stroke-width': 2,
                fill: 'none'
            }
        }, {
            type: 'radar',//采用线形图
            xField: '',
            yField: '',
            showInLegend: true,
            showMarkers: true,
            highlight: true,
            markerConfig: {
                radius: 4
            },
            style: {
                'stroke-width': 2,
                fill: 'none'
            }
        }]
    }
})

效果图:

image

posted @ 2014-01-09 13:44  争世不悔  阅读(529)  评论(0编辑  收藏  举报