echarts

How can I specify to connect remaining dots (skip null values) in Apache ECharts?


I'm testing Apache ECharts and I was wondering if it's possible to achieve following result. This is my option object

option = {
  legend: {
    data: ['A', 'B']
  },
  xAxis: {
    data: [
      '1.2.0 (01.2024)',
      '1.3.0 (02.2024))',
      '1.4.0 (03.2024)'
    ]
  },
  yAxis: {
    min: 0,
    max: 100,
    interval: 10
  },
  series: [
    {
      name: 'A',
      type: 'line',
      data: [65, 60, 50]
    },
    {
      name: 'B',
      type: 'line',
      data: [60, null, 55]
    }
  ]
}

and this is what I'm getting chart I'm getting and this is what I'd like to achieve chart I need So basically I'd like the chart to connect all the dots it has, without leaving any holes. Is it possible?


Solution

  • yes, it's possible, add connectNulls:true to second line series