I am using vue-plotly 1.1.0 with vue2 to create charts, but it's encountering an error.

uncaught (in promise) TypeError: Cannot read properties of undefined (reading '_redrawFromAutoMarginCount')
    at emitAfterPlot (vue-plotly.umd.js:140916:1)
    at eval (vue-plotly.umd.js:140908:1)

How to resolve the issue?

<Plotly
            id="ano"
            class="p"
            :data="dataChart_TM"
            :display-mode-bar="true"
            :show-send-to-cloud="true"
            :displaylogo="false"
            :shapePosition="true"
            :layout="layout"
            :scrollZoom="true"
            :autosize="true"
            
          ></Plotly> 
data() {
    return {
      refreshchart: 0,
      config: { responsive: true },
      
      layout_stdconut: {
        autosize: true,
        margin: {
          b: 30,
          l: 25,
          r: 25,
          t: 0,
        },
        yaxis: { tickfont: { color: "#1f77b4" }, side: "left" },
        yaxis2: {
          tickfont: { color: "#ff7f0e" },
          overlaying: "y",
          side: "right",
        },
        shapes: [],
        showlegend: true,
        legend: { orientation: "h", x: 0, y: 1 },
        paper_bgcolor: null,
        plot_bgcolor: null,
      },
      layout: {
        autosize: true,
        margin: {
          b: 30,
          l: 25,
          r: 25,
          t: 20,
        },
        padding: {
          b: 0,
          l: 0,
          r: 0,
          t: 0,
        },
        shapes: [],
        showlegend: true,
        legend: { orientation: "h", x: 0, y: 1 },
        paper_bgcolor: [],
        plot_bgcolor: [],
      },
      layout2: {
        autosize: true,
        margin: {
          b: 30,
          l: 25,
          r: 25,
          t: 0,
        },
        shapes: [],
        showlegend: true,
        legend: { orientation: "h", x: 0, y: 1 },
        paper_bgcolor: [],
        plot_bgcolor: [],
      },
      sheet: true,
      show: false,
      
    };
  },
  computed: {
    ...mapGetters({
      dataTMdate_filter: "DashboardChart/dataTMdatefilter",
      dataChart_TM: "datachartTM/dataChartTM",
      dataChart_MMQ: "datachartMMQ/dataChartMMQ",
      dataCart_STDcount: "datachartSTDCount/dataChartSTDcount",
      show_details: "DashboardChart/showDetails",
    }),
  },
0

There are 0 best solutions below