'show graph with multiple traces

I use VuePlotly to show graphs on a web interface. Now I would like to show different data sets (multiple traces) in one graph. Unfortunately it doesn't work. My Graph is not shown on the web interface. Below you can see my code. I would be very happy if you can help me with my problem.

   <b-col>
      <vue-plotly :data="dataA" :layout="layout" :options="options"/>
    </b-col>


import VuePlotly from '@statnett/vue-plotly';

export default {
  components: {
    VuePlotly,
  },

  data() {
return {
  trace1: [{
    x: [1, 2, 3, 4],
    y: [1, 2, 3, 4],
  }],
  trace2: [{
    x: [4, 3, 2, 1],
    y: [1, 2, 3, 4],
  }],
  dataA: [this.trace1, this.trace2],
  layout: {
    title: 'ScreePlot',
    bargap: 0.05,
    xaxis: {
      range: [0, 9],
      title: 'x',
      tick0: 0,
      dtick: 1,
    },
    yaxis: {
      range: [0, 10],
      title: 'y',
      tick0: 0,
      dtick: 1,
    },
  },
  options: {
    displayModeBar: false,
    responsive: true,
    watchShallow: true,
    autoResize: true,
  },
};
 },

};


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source