Home forums Using CanvasJS Can canvasjs work with webpack

This topic contains 1 reply, has 2 voices, and was last updated by  Suyash Singh 2 months, 1 week ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #14821

    yueming
    Member

    I am trying to use canvasjs in a webpack-based project.

    I import canvasjs via code below

    import '../third/canvasjs/canvasjs.min';

    But there is an error of “Uncaught ReferenceError: chart is not defined” when code below is executed:
    b && (chart = this.chart || this, chart.render())

    It occurs when I execute code below:
    chart2.title.set('fontSize', chart1.title.get('fontSize'), true)

    It seems canvasjs.min.js is not in “use strict” mode, but it is now running in a “use strict” context.

    #14860

    Suyash Singh
    Moderator

    @yueming,

    We are working on it and will get back to you at the earliest.

    ___
    Suyash Singh
    Team CanvasJS

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.