let Charts = require('../../../utils/wxcharts-min.js');
var app = getApp();
var lineChart = null;
Page({
    data: {
        windowWidth: '',
        windowHeight: '',
        awardList: [
            {
                src:'/images/my/per_pic_02.png'
            },
            {
                src:'/images/my/per_pic_02.png'
            },
            {
                src:'/images/my/per_pic_02.png'
            },
            {
                src:'/images/my/per_pic_02.png'
            },
            {
                src:'/images/my/per_pic_02.png'
            }
        ]
    },

    /**
     * 生命周期函数--监听页面加载
     */
    onLoad: function (options) {
        this.getRpx()
        this.getCharts()
    },
    getRpx() {
        var res = wx.getSystemInfoSync();    //试图获取屏幕宽高数据
        this.setData({
            windowWidth: res.windowWidth / 750 * 690 ,
            windowHeight: res.windowWidth / 750 * 605
        })
    },
    getCharts() {
        lineChart = new Charts({
            canvasId: 'radarCanvas',
            type: 'radar',
            categories: ['1', '2', '3', '4', '5', '6'],
            series: [{
                name: '运动表现',
                data: [90, 110, 125, 95, 87, 122]
            }],
            width: this.data.windowWidth,
            height: this.data.windowHeight,
            extra: {
                radar: {
                    max: 150
                }
            }
        });
    }
})