Echarts可视化教程

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

Highcharts图表之X轴翻转曲线图

$(document).ready(function() {  
   var chart = {
      type: 'spline',
      inverted: true
   }; 
   var title = {
      text: 'Atmosphere Temperature by Altitude'   
   };
   var subtitle = {
      text: 'According to the Standard Atmosphere Model'
   };
   var xAxis = {
      reversed: false,
      title: {
         enabled: true,
         text: 'Altitude'
      },
      labels: {
         formatter: function () {
            return this.value + 'km';
         }
      },
      maxPadding: 0.05,
      showLastLabel: true
   };
   var yAxis = {
      title: {
         text: 'Temperature'
      },
      labels: {
         formatter: function () {
            return this.value + '\xB0';
         }
      },
      lineWidth: 2
   };
   var legend = {
      enabled: false 
   };
   var tooltip = {
      headerFormat: '<b>{series.name}</b><br/>',
      pointFormat: '{point.x} km: {point.y}\xB0C'
   };
   var plotOptions = {
      spline: {
         marker: {
            enable: false
         }
      }
   };
   var series= [{
      name: 'Temperature',
      data: [[0, 15], [10, -50], [20, -56.5], [30, -46.5], [40, -22.1],
            [50, -2.5], [60, -27.7], [70, -55.7], [80, -76.5]]
   }];      
   
   
   var json = {};
   json.chart = chart;
   json.title = title;
   json.subtitle = subtitle;
   json.legend = legend;
   json.tooltip = tooltip;
   json.xAxis = xAxis;
   json.yAxis = yAxis;  
   json.series = series;
   json.plotOptions = plotOptions;
   $('#container').highcharts(json);
  
});

点击运行 》

点击展开全文

相关文章

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