highcharts 柱状图 折线图 混合 双纵轴显示

时间:2023-12-29 22:19:56

$(function () {
  $('#container').highcharts({
  chart: {
    zoomType: 'xy'
  },
  title: {
    text: ''
  },
  colors:['#64BCEC','#4FD3B9','#FFACA8'],
  xAxis: [{
    categories: ['语文', '数学', '英语', '物理', '生物', '化学','政治', '历史', '地理'],
    crosshair: true
      }],
  yAxis: [
    {
      min:5,
      tickInterval:5,
      title: {
      text: '题目更新数'
      },
    opposite: true
    },
    {
      min:0,
      tickInterval: 50,
      title: {
      text: '练案更新数'
        }
     }
    ],
  tooltip: {
    shared: true
      },
  series: [{
    type: 'column',
    name: '练案新增数',
    yAxis:1,
    data: [49, 71, 106, 129, 144, 176, 135, 148, 21]
    }, {
    type: 'column',
    name: '练案更新数',
    yAxis: 1,
    data: [80, 51, 86, 100, 124, 100, 105, 128, 70]
    }, {
    name: '题目更新数',
    type: 'spline',
    data: [7, 6, 9, 14, 18, 21, 25, 26, 23]
    }]
  });
});

highcharts 柱状图 折线图 混合 双纵轴显示