zoukankan      html  css  js  c++  java
  • HighCharts之2D带Label的折线图

    HighCharts之2D带Label的折线图


    1、HighCharts之2D带Label的折线图源码

    LineLabel.html:

    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="UTF-8">
    <title>HighCharts 2D带Label的折线图</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(){
        	 $('#lineLabelChart').highcharts({
        		 chart: {
                     type: 'line'
                 },
                 title: {
                     text: '统计某周水果销售情况'
                 },
                 subtitle: {
                     text: '水果销量'
                 },
                 xAxis: {
                     categories: ['星期一', '星期二', '星期三', '星期四', '星期五', '星期六', '星期日']
                 },
                 yAxis: {
                     title: {
                         text: '单位(kg)'
                     }
                 },
                 tooltip: {
                     enabled: false,
                     formatter: function() {
                         return '<b>'+ this.series.name +'</b><br/>'+
                             this.x +': '+ this.y +'kg';
                     }
                 },
                 plotOptions: {
                     line: {
                         dataLabels: {
                             enabled: true,
                             style: {
                                 textShadow: '0 0 3px white, 0 0 3px white',
                                 fontSize: '14px',
                                 color: '#0000FF',
                                 cursor: 'pointer'
                             }
                         },
                         enableMouseTracking: true
                     }
                 },
                 series: [{
                     name: '苹果',
                     data: [98,25,69,45,15,78,67]
                 }, {
                     name: '橘子',
                     data: [46,78,16,85,67,24,17]
                 }, {
                     name: '桃子',
                     data: [19,54,74,18,34,90,34]
                 }, {
                     name: '梨子',
                     data: [63,52,90,65,47,34,97]
                 }, {
                     name: '荔枝',
                     data: [56,74,99,41,43,65,78]
                 }]
             });
         });
    </script>
    </head>
    <body>
       <div id="lineLabelChart" style=" 1200px; height: 500px; margin: 0 auto"></div>
    </body>
    </html>

    2、运行结果


  • 相关阅读:
    【Algorithm】基数排序
    【Algorithm】堆排序
    【Algorithm】快速排序
    【Algorithm】自顶向下的归并排序
    【Algorithm】自底向上的归并排序
    【Algorithm】插入排序
    【Algorithm】选择排序
    java的几个format
    java restful接口
    java解析EXCEL
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13315271.html
Copyright © 2011-2022 走看看