# Use jQuery Flot plugin with ionic

**URL:** <https://forum.ionicframework.com/t/use-jquery-flot-plugin-with-ionic/120767>\
**Category:** ionic-v3\
**Created:** [February 7, 2018, 11:42am UTC](https://forum.ionicframework.com/t/use-jquery-flot-plugin-with-ionic/120767 "2018-02-07T11:42:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![makville](https://avatars.discourse-cdn.com/v4/letter/m/bbce88/32.png) [@makville](https://forum.ionicframework.com/u/makville)\
**Post date:** [February 7, 2018, 11:42am UTC](https://forum.ionicframework.com/t/use-jquery-flot-plugin-with-ionic/120767/1 "2018-02-07T11:42:59Z")

</div>

I am trying to use flot charts for displaying charts in an ionic 3 app.

I have tried using ng2modules flot ([https://www.npmjs.com/package/ng2modules-flot](https://www.npmjs.com/package/ng2modules-flot)). It requires importing the jquery and flot js files as follows.

However, on serving the app, i get this error

Uncaught (in promise): ReferenceError: $ is not defined at FlotComponent.ngAfterViewInit

This seems to me as though a jquery based plugin (flot chart in this case) is loaded without jquery being loaded in the application.

I just cant seem to figure out a way load jquery globally in an ionic app so that the plugin can work.

Thanks.

---

<div class="post-metadata">

**Author:** ![ramon](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/ramon/32/75852_2.png) [@ramon](https://forum.ionicframework.com/u/ramon)\
**Post date:** [February 7, 2018, 3:45pm UTC](https://forum.ionicframework.com/t/use-jquery-flot-plugin-with-ionic/120767/2 "2018-02-07T15:45:53Z")

</div>

If I were in the same situation, I would use [ngx-charts](https://github.com/swimlane/ngx-charts), for example.

I can’t help you with jQuery’s import into ionic framework.

---

<div class="post-metadata">

**Author:** ![makville](https://avatars.discourse-cdn.com/v4/letter/m/bbce88/32.png) [@makville](https://forum.ionicframework.com/u/makville)\
**Post date:** [February 7, 2018, 5:48pm UTC](https://forum.ionicframework.com/t/use-jquery-flot-plugin-with-ionic/120767/3 "2018-02-07T17:48:20Z")

</div>

Thing is the data from the api I’m working with was designed with Flot chart in mind.

I was able to move forward by including the javascript from a cdn rather than from my file system. So i can keep doing what i need to until i figure out how to bundle the js files in the app rather than using the live cdn sources.

Thanks for the suggestion.

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 9:51pm UTC](https://forum.ionicframework.com/t/use-jquery-flot-plugin-with-ionic/120767/4 "2021-07-19T21:51:36Z")

</div>

Closed on July 19, 2021, 9:51pm UTC


