Skip to content
This repository was archived by the owner on May 25, 2019. It is now read-only.
This repository was archived by the owner on May 25, 2019. It is now read-only.

Not working on 1.0.8 version of jqPlot #20

@newtonwagner

Description

@newtonwagner

I've tried to use ui-chart with jqPlot 1.0.8 and kept getting error:

TypeError: elem.jqplot is not a function
at renderChart (ui-chart.min.js:29)
at Object.fn (ui-chart.min.js:33)
at m.$get.m.$digest (angular.min.js:124)
at m.$get.m.$apply (angular.min.js:127)
at l (angular.min.js:81)
at P (angular.min.js:85)
at XMLHttpRequest.H.onload (angular.min.js:86)

The error was on line 29:

elem.jqplot(data, opts);

Looking for examples on jqPlot, looks like they have changed the way you use jqplot, so I've solved this changing the template to add an element ID, and calling the element ID on line 29:

template: '<div id="chart"></div>',
// ...
$.jqplot('chart',data, opts);

Worked fine! I will try to make a pull request changing this, but I need to figure out how to allow more than one chart for the same page (make the element id dynamic).

If someone has an idea about this, it would be great. ty.

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