vue3-apexcharts icon indicating copy to clipboard operation
vue3-apexcharts copied to clipboard

Chart height option is ignored when series is an empty array

Open dospunk opened this issue 4 years ago • 1 comments

If the series prop passed to the VueApexCharts component is an empty array ([]), the chart ignores the given chart.height option.

example:

  <div style="width: 300px; height: 100px; border: 2px solid red;">
    <VueApexCharts
      type="line"
      :options="{
        chart: {
          height: 100,
        },
        noData: {
          text: 'No data as expected'
        },
      }"
      :series="[]"
    />
  </div>

renders as

bad apex chart

dospunk avatar Oct 05 '21 19:10 dospunk

I've made a reproduction here, it shows the bug with Series as [] and as [{data:[]}]

dospunk avatar Oct 05 '21 19:10 dospunk