echarts实现排行榜柱状图效果代码

代码语言:html

所属分类:图表

代码描述:echarts实现排行榜柱状图效果代码

代码标签: 柱状 效果

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>BFW NEW PAGE</title>
    <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/echarts.js"></script>
    <style>
        body {
            background: white;
        }
    </style>


</head>
<body>

    <div style="height:300px;width:500px;" id="monthArea"></div>

    <script type="text/javascript">
        var monthAreaChart = echarts.init(document.getElementById('monthArea'));
        monthAreaChart.setOption({
            dataset: {
                source: [
                   [58212, '小郡干串串'],
                [78254, '钢管厂'],
                [41032, '耐克'],
                [12755, '金大福'],
                [20145, '肯德基'],
                ]
            },
            /*grid: {containLabel: true},*/
            xAxis: {
                name: '(人)',
                show: true,
                splitLine: {
                    show: false
                }},
            yAxis: {
                type: 'category',
                axisLine: {
                    show: false
                }, //坐标轴
                axisTick: [{
                    //坐标轴小标记
                    show: false
                }],
            },
            grid: {
                height: '70%',
                y2: 20,
                left: '15%',
            },
            series: [{

                textStyle: {
                    fontSize: 10,
                },
                type: 'bar',
                encode: {
         .........完整代码请登录后点击上方下载按钮下载查看

网友评论0