lafriks / vue-bar-graph

Simple and lightweight vue chart component without using chart library dependencies
5 stars 3 forks source link

<line> attribute y1: Expected length, "NaN". #1

Closed Yonier closed 1 month ago

Yonier commented 4 years ago

im getting: vue.runtime.esm.js:6785 Error: attribute y1: Expected length, "NaN". vue.runtime.esm.js:6785 Error: attribute y2: Expected length, "NaN".

template: <vue-bar-graph v-if="peaks.length > 0" :points="peaks" :width="180" :height="80" :show-trend-line="true" :trend-line-width="2" trend-line-color="tomato" barColor="#ffffffad" :showYAxis="true" textColor="white" :animationDuration="1.2" />

script: import VueBarGraph from 'vue-bar-graph';

module.exports = { name: 'App', components: { VueBarGraph }, ... };

lafriks commented 3 years ago

I can't seem to be able to reproduce this, could you provide more complete sample?

praktwerk commented 2 years ago

Getting the same error when running yarn serve in this package. Seems like a combination of those params is causing the error:

<vue-bar-graph
      :show-y-axis="true"
      :show-x-axis="true"
      :points="dataPoints"
      :width="chartWidth"
      :height="chartHeight"
      :use-custom-labels="true"
      :custom-labels="monthLabels"
      :show-trend-line="true"
      :trend-line-width="2"
      trend-line-color="lightblue"
/>

The error is gone when :show-trend-line="false"

lafriks commented 1 month ago

would still need exact values to reproduce this, please reopen if still has problem