3

I have an Apex Chart with multiple lines, I would like to fill the area between each line with a specific colour. Is that possible?

I searched the documentation and it mentions the "fill" option which only seems to fill everything below a line and furthermore doesn't seem to work at all if I try to add it to my line chart.

Options:

      const options = {
        chart: {
          type: 'line'
        },
        colors: ["#000000", "#115F66", "#AEC6C8", "#EE7E66", "#115F66", "#AEC6C8"],
        xaxis: {
          type: 'datetime',
          categories: xLabels,
          tickAmount: xLabels.length,
        },
        yaxis: {
          decimalsInFloat: 0,
          min: 0,
        },
        legend: {
          show: false,
        },
        series: [
          {
            name: 'Main',
            data: this.plotting_data.historicalData,
          },
          {
            name: 'First Lower Bound',
            data: this.plotting_data.lowerPred1,
          },
          {
            name: 'Second Lower Bound',
            data: this.plotting_data.lowerPred2,
          },
          {
            name: 'Middle',
            data: this.plotting_data.prediction,
          },
          {
            name: 'First Upper Bound',
            data: this.plotting_data.upperPred1,
          },
          {
            name: 'Second Upper Bound',
            data: this.plotting_data.upperPred2,
          },
        ],
      }
4

1 回答 1

1

ApexCharts 目前不支持范围面积图(从 v3.8.5 开始)。

于 2019-09-05T06:24:59.873 回答