1.2.1 单文件引入,中国地图 保存按钮不显示?(IE9和360浏览器都不显示)

maray 发布于 2013/11/01 11:21
阅读 295
收藏 0

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
 String path = request.getContextPath();
%>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>ECharts</title>
  
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="ECharts">
    <meta name="author" content="">

    <script src="<%=path%>/jsp/report/auto/www/js/esl.js"></script>
   
    <link href="<%=path%>/jsp/report/auto/www/js/css/echartsHome.css" rel="stylesheet">
  
</head>

<body>
  
    <div class="container-fluid">
        <div class="row-fluid">
          
            <div id="graphic" class="span8">
                <div id="main" class="main" style="height: 530px;"></div>
                 <script type="text/javascript">
    // Step:3 conifg ECharts's path, link to echarts.js from current page.
    require.config({
        paths:{
            echarts:'<%=path%>/jsp/report/auto/www/js/echarts-map',
            'echarts/chart/map': '<%=path%>/jsp/report/auto/www/js/echarts-map'
           
        }
    });
   
    // Step:4 require echarts and use it in the callback.
    // Step:4 动态加载echarts然后在回调函数中开始使用,注意保持按需加载结构定义图表路径
    require(
        [
            'echarts',
            'echarts/chart/map'
          
        ],
 
function(ec) {
    var myChart = ec.init(document.getElementById('main'));
           
 var  option = {
    title : {
        text: 'iphone销量',
        subtext: '纯属虚构',
        x:'center'
      },
    tooltip : {
        trigger: 'item'
    },
    legend: {
        orient: 'vertical',
        x:'left',
        data:['iphone3','iphone4','iphone5']
    },
    dataRange: {
        min: 0,
        max: 2500,
        text:['高','低'],           // 文本,默认为数值文本
        calculable : true,
        textStyle: {
            color: 'orange'
        }
    },
    toolbox: {
        show : true,
        orient : 'vertical',
        x: 'right',
        y: 'center',
        feature : {
            mark : true,
            dataZoom : false,
            dataView : {readOnly: false},
            restore : true,
            saveAsImage : true
        }
    },
    series : [
        {
            name: 'iphone3',
            type: 'map',
            mapType: 'china',
            itemStyle:{
                normal:{label:{show:true}, color:'#ffd700'},// for legend
                emphasis:{label:{show:true}}
            },
            data:[
                {name: '北京',value: 120},
                {name: '天津',value: 240},
                {name: '上海',value: 360},
                {name: '重庆',value: 300},
                {name: '河北',value: 450},
                {name: '河南',value: 550},
                {name: '云南',value: 560},
                {name: '辽宁',value: 570},
                {name: '黑龙江',value: 580},
                {name: '湖南',value: 590},
                {name: '安徽',value: 600},
                {name: '山东',value: 610},
                {name: '新疆',value: 630},
                {name: '江苏',value: 650},
                {name: '浙江',value: 258},
                {name: '江西',value: 800},
                {name: '湖北',value: 900},
                {name: '广西',value: 1002},
                {name: '甘肃',value: 740},
                {name: '山西',value: 740},
                {name: '内蒙古',value: 950},
                {name: '陕西',value: 840},
                {name: '吉林',value: 870},
                {name: '福建',value: 958},
                {name: '贵州',value: 1020},
                {name: '广东',value: 789},
                {name: '青海',value: 951},
                {name: '西藏',value: 753},
                {name: '四川',value: 489},
                {name: '宁夏',value: 502},
                {name: '海南',value: 254},
                {name: '台湾',value: 320},
                {name: '香港',value: 450},
                {name: '澳门',value: 420}
            ]
        },
        {
            name: 'iphone4',
            type: 'map',
            mapType: 'china',
            itemStyle:{
                normal:{label:{show:true}, color:'#ff8c00'},// for legend
                emphasis:{label:{show:true}}
            },
            data:[
                {name: '北京',value: 132},
                {name: '天津',value: 456},
                {name: '上海',value: 789},
                {name: '重庆',value: 147},
                {name: '河北',value: 258},
                {name: '安徽',value: 369},
                {name: '新疆',value: 965},
                {name: '浙江',value: 752},
                {name: '江西',value: 456},
                {name: '山西',value: 159},
                {name: '内蒙古',value: 357},
                {name: '吉林',value: 369},
                {name: '福建',value: 742},
                {name: '广东',value: 843},
                {name: '西藏',value: 159},
                {name: '四川',value: 621},
                {name: '宁夏',value: 478},
                {name: '香港',value: 478},
                {name: '澳门',value: 269}
            ]
        },
        {
            name: 'iphone5',
            type: 'map',
            mapType: 'china',
            itemStyle:{
                normal:{label:{show:true}, color:'#da70d6'},// for legend
                emphasis:{label:{show:true}}
            },
            data:[
                {name: '北京',value: 852},
                {name: '天津',value: 800},
                {name: '上海',value: 741},
                {name: '广东',value: 951},
                {name: '台湾',value: 658},
                {name: '香港',value: 459},
                {name: '澳门',value: 321}
            ]
        }
    ]
};
          
            myChart.setOption(option);
        }
    );
    </script>
                <div>
                   
                    <span id='wrong-message' style="color:red"></span>
                </div>
            </div><!--/span-->
        </div><!--/row-->
       
      
    </div><!--/.fluid-container-->


</body>
</html>

加载中
返回顶部
顶部