Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashes when going from a larger set of points to a lower one #49

Open
dbarasti opened this issue Nov 1, 2021 · 0 comments
Open

Crashes when going from a larger set of points to a lower one #49

dbarasti opened this issue Nov 1, 2021 · 0 comments

Comments

@dbarasti
Copy link

dbarasti commented Nov 1, 2021

I bond the points prop to a computed value that returns the array of points to display. When I go from a larger set of points to a lower one, the chart component crashes with the following error:

[Vue warn]: Error in render: "TypeError: _this3.dataColors[index] is undefined"

found in

---> <VueBarGraph>
       <Chart>
         <App> at src/App.vue
           <Root> vue.runtime.esm.js:619
    VueJS 18
    _callee2$ chart.vue:45
    Babel 10
    _callee$ chart.vue:32
    Babel 8
    _callee$ App.vue:42
    Babel 8
    keyup App.vue:38
    VueJS 3

TypeError: _this3.dataColors[index] is undefined
    chartData vue-bar-graph.common.js:7663
    chartData vue-bar-graph.common.js:7651
    VueJS 3
    render vue-bar-graph.common.js:3291
    VueJS 14
    _callee2$ chart.vue:45
    Babel 10
    _callee$ chart.vue:32
    Babel 8
    _callee$ App.vue:42
    Babel 8
    keyup App.vue:38
    VueJS 3
vue.runtime.esm.js:1897
    VueJS 17
    _callee2$ chart.vue:45
    Babel 10
    _callee$ chart.vue:32
    Babel 8
    _callee$ App.vue:42
    Babel 8
    keyup App.vue:38
    VueJS 3

To reproduce: display dynamically a set of n points, then change the cardinality of the set (simply removing some values) to m (m<n)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant