Zinchart: can't make it work? Original error: zingchart not defined

I am trying to make some diagrams with Zingchart, but I cannot get it to work. I installed it using bower installation. On the website, they say that you need to check your directory, and I see that mine is different from what they show.

Them

 bower_components
 -- zingchart
    -- zingchart.min.js
    -- modules
       -- ...
    -- custom
       -- ...

Mine:

 bower_compentents
 -- zingchart
    -- client
       -- zingchart.min.js
       -- modules
          -- ...

The error I get when I want to build a standard chart is this:

ReferenceError: zingchart not defined

It indicates the part of the code in which the graph is displayed: d)

 zingchart.render({ 
        id:'chartDiv',
        data:chartData,
        height:400,
        width:600
    });

I use javascript and angular. What am I doing wrong?

+4
source share
2 answers
  • Do you include the script in your html file?

  • zingchart ? var app = angular.module('myapp', ['zingchart-angularjs']);

  • .html( ) angular > zingchart > zingchart.

+5

Source: https://habr.com/ru/post/1614133/


All Articles