Git Product home page Git Product logo

vue-echarts-v3-demo's Issues

Chart crashes as soon as it's rendered

Hi, I'm trying to define programmatically the bars for my chart doing this:

<script> import { defineComponent } from "@vue/runtime-core"; import IEcharts from 'vue-echarts-v3/src/full.js' export default defineComponent({ name: 'NewHistogram', data(){ return { bars: { title: { text: 'Prova' }, xAxis: { data: [] }, yAxis: {}, series: [{ name: 'IVA', type: 'bar', data: [] }] }, anno: 0, } }, components: { IEcharts }, props: { title: String, parameter: String, date: Number, column: String }, inject: ['company'], mounted(){ this.elaborate(this.date) }, methods: { elaborate(date){ this.anno = date axios('/api/histogram', { params: { code: this.company.codice_ditta, column: this.column, anno: date, } }) .then(({data}) => { const bars = {...this.bars} data.map((d, i) => { const value = d.valore bars.xAxis.data.push(d.mese) bars.series[0].data.push(value) }) console.log(bars) this.bars = bars }) }, } }) </script> <style> </style>

But in console I get this error:

app.js:182953 Uncaught (in promise) TypeError: h is not a function
at Proxy.render (app.js:182953:14)
at renderComponentRoot (app.js:11388:44)
at ReactiveEffect.componentUpdateFn [as fn] (app.js:15505:57)
at ReactiveEffect.run (app.js:9325:25)
at setupRenderEffect (app.js:15631:9)
at mountComponent (app.js:15414:9)
at processComponent (app.js:15372:17)
at patch (app.js:14973:21)
at ReactiveEffect.componentUpdateFn [as fn] (app.js:15582:17)
at ReactiveEffect.run (app.js:9325:25)

Am I doing something wrong?

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.