zoukankan      html  css  js  c++  java
  • HighCharts之2D金字塔图

    HighCharts之2D金字塔图


    1、实例源码

    Pyramid.html:

    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="UTF-8">
    <title>HighCharts 2D金字塔图</title>
    <script type="text/javascript" src="../scripts/jquery-1.11.0.js"></script>
    <script type="text/javascript" src="../scripts/js/highcharts.js"></script>
    <script type="text/javascript">
    $(function(){
    	 $('#pyramidChart').highcharts({
    		 chart: {
    	            type: 'pyramid',
    	            marginRight: 100
    	        },
    	        title: {
    	            text: '金字塔分布图',
    	            x: -50
    	        },
    	        plotOptions: {
    	            series: {
    	                dataLabels: {
    	                    enabled: true,
    	                    format: '<b>{point.name}</b> ({point.y:,.0f})',
    	                    color: 'black',
    	                    softConnector: true
    	                }
    	            }
    	        },
    	        legend: {
    	            enabled: false
    	        },
    	        series: [{
    	            name: '人数',
    	            data: [
    	                ['星期一',12],
    	                ['星期二',121],
    	                ['星期三',265],
    	                ['星期四',22131],
    	                ['星期五',623231],
    	                ['星期六',5545459],
    	                ['星期日',51245125]
    	            ]
    	        }]
    	    });
      });
    </script>
    </head>
    <body>
       <div id="pyramidChart" style=" 1200px; height: 500px; margin: 0 auto"></div>
    </body>
    </html>

    2、实例结果
  • 相关阅读:
    委托事件
    泛型
    栈和队列
    泛型
    枚举与位枚举
    数组 集合
    .NET Framework 简介
    三行代码 完美解决word标签文字替换 POI增强版 可插入图片
    Github国内镜像网站,解决Github访问的神器
    Eureka
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13315245.html
Copyright © 2011-2022 走看看