Vue-chartjs: Super expression must either be null or a function

Created on 21 May 2019  路  2Comments  路  Source: apertureless/vue-chartjs

@Component
export class BarChart extends Bar {
    constructor(props: any) {
        super(props);
    }
    @Prop({ type: Object })
    public chartdata!: any;
    @Prop({ type: Object })
    public options!: any;

    public mounted() {
        this.renderChart(this.chartdata, this.options);
    }
}

Expected Behavior

Rendering empty canvas on the screen.

Actual Behavior

Getting runtime error: TypeError: Super expression must either be null or a function

Environment

  • vue.js version:2.6.10
  • vue-chart.js version: 3.4.2
  • npm version: 6.7.0

Most helpful comment

I'm stuck in the same situation, did you solved it?

Better read docs... Component should extends the Vue class though Bar class is extended via vue "extends" prop.

@Component({
    extends: Bar,
})
export class BarChart extends Vue<Bar> {
}

All 2 comments

I'm stuck in the same situation, did you solved it?

I'm stuck in the same situation, did you solved it?

Better read docs... Component should extends the Vue class though Bar class is extended via vue "extends" prop.

@Component({
    extends: Bar,
})
export class BarChart extends Vue<Bar> {
}
Was this page helpful?
0 / 5 - 0 ratings

Related issues

jacobmischka picture jacobmischka  路  3Comments

sylvaincaillot picture sylvaincaillot  路  3Comments

timster picture timster  路  5Comments

m-jooibar picture m-jooibar  路  4Comments

kurbar picture kurbar  路  4Comments