Echarts可视化教程

  1. 网站首页
  2. 百度ECharts
  3. ECharts实例
  4. ECharts入门
  5. 地图大全
  6. ECharts官网

Highcharts图表之固定布局柱形图

$(document).ready(function() { 
   var chart = {
      type: 'column'
   };
   var title = {
      text: 'Highcharts图表之固定布局柱形图'   
   };   
   var xAxis = {
      categories: ['HTML4', 'CSS', 'VUE3']
   };
   var yAxis = [{
         min: 0,
         title: {
            text: '访问量'
         }
      }, {
         title: {
            text: '下载量'
         },
         opposite: true
   }];
   var legend = {
      shadow: false
   };
   var tooltip = {
      shared: true
   };
   var credits = {
      enabled: false
   };
   var plotOptions = {
      column: {
         grouping: false,
         shadow: false,
         borderWidth: 0
      }
   };
   var series= [{
       name: 'Em1',
            color: 'rgba(165,170,217,1)',
            data: [150, 73, 20],
            pointPadding: 0.3,
            pointPlacement: -0.2
        }, {
            name: 'Em2',
            color: 'rgba(126,86,134,.9)',
            data: [140, 90, 40],
            pointPadding: 0.4,
            pointPlacement: -0.2
        }, {
            name: 'Pr1',
            color: 'rgba(248,161,63,1)',
            data: [183.6, 178.8, 198.5],
            tooltip: {
                valuePrefix: '$',
                valueSuffix: ' M'
            },
            pointPadding: 0.3,
            pointPlacement: 0.2,
            yAxis: 1
        }, {
            name: 'Pr2',
            color: 'rgba(186,60,61,.9)',
            data: [203.6, 198.8, 208.5],
            tooltip: {
                valuePrefix: '$',
                valueSuffix: ' M'
            },
            pointPadding: 0.4,
            pointPlacement: 0.2,
            yAxis: 1      
   }];     
      
   var json = {};   
   json.chart = chart; 
   json.title = title; 
   json.xAxis = xAxis;
   json.yAxis = yAxis;
   json.credits = credits;
   json.legend = legend;
   json.tooltip = tooltip;
   json.plotOptions = plotOptions;
   json.series = series;
   $('#myChart').highcharts(json);
});

点击运行 》

点击展开全文

相关文章

  1. 如何利用Highcharts中使用盒须图来展示数据
  2. Highcharts图表之测量图
  3. Highcharts图表之3D圆环图
  4. Highcharts图表之3D饼图系列
  5. Highcharts图表之堆叠3D柱状图