target/classes/static/js/chart.js

(开头部分) 6KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

window.onload = function (){
    echart01()
    echart02()
}
function echart01() {
    // 基于准备好的dom,初始化echarts实例
    var myChart = echarts.init(document.getElementById('online'));
    ajax('/departmentsInfo/getOnlineNum',{},'post').then(function (res){
        let total = 0;
        for (let i in res.data) {
            total += res.data[i].value
        }
        let option = {
            title: {
                zlevel: 0,
                text: [
                    '{value|' + total + '}',
                    '{name|总人数}',
                ].join('\n'),
                rich: {
                    value: {
                        color: '#303133',
                        fontSize: 30,
                        fontWeight: 'bold',
                        lineHeight: 30,
                    },
                    name: {
                        color: '#909399',
                        lineHeight: 10
                    },
                },
                top: 'center',
                left: '145',
                textAlign: 'center',
                textStyle: {
                    rich: {
                        value: {
                            color: '#303133',
                            fontSize: 30,
                            fontWeight: 'bold',
                            lineHeight: 30,
                        },
                        name: {
                            color: '#909399',
                            lineHeight: 10
                        },
                    },
                },
            },
            tooltip: { // 悬停指示
                trigger: 'item',
                formatter: "{b}: {c} "
            },
            series: [
                {
                    name: '访问来源',
                    type: 'pie',
                    radius: ['80%', '84%'],
                    center: [150, '50%'],
                    stillShowZeroSum: false,
后面还有 142 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。