Skip to content

Confusing document #969

Closed
Closed
@trungvose

Description

@trungvose

I am using ng2-charts in our Angular application. It is working well so far. But run through the document, there is one line that you guys mention that Important

Embedding Chart.js in application is mandatory!

confusing-statement

I checked the source of the file "node_modules/chart.js/src/chart.js". So basically it will contain all the CommonJS module, and it doesn't work on browser for sure.

/**
 * @namespace Chart
 */
var Chart = require('./core/core')();

Chart.helpers = require('./helpers/index');

// @todo dispatch these helpers into appropriated helpers/helpers.* file and write unit tests!
require('./core/core.helpers')(Chart);

Chart.defaults = require('./core/core.defaults');
........

So my question is: Is this step required? If not, please remove it from the documentation. Otherwise people will be confused.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions