score:2
if you are using the ionic framework then you should also be using angularjs. if that is so then you would need to include the dependency in your controller. i used chartjs in my project very easily. post your controller javascript code and i can help you setup. take a look at this link first:
https://github.com/gonewandering/angles
you need to include the files in your index.html file first:
<script src="//cdnjs.cloudflare.com/ajax/libs/angular.js/1.2.10/angular.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/chart.js/1.0.1-beta.2/chart.min.js"></script>
<script src="angles.js"></script>
then include "angles" as a dependency:
var app = angular.module("anglesexample", ["angles"]);
everything else appears to be okay.
best of luck!
score:0
i suggest you to use another chart generator, something like:
this was built to work with angular...as ionic was.
score:0
if you are using chart.js, make sure you add the reference to your app.js
angular.module('yourapp', ['ionic', 'chart.js']);
besides, you also need to include the following in your index.html, of course you have to make sure you are pointing to the correct directory where you put the 3 files below.
<!-- css file -->
<link rel="stylesheet" href="css/angular-chart.css">
<!-- library files -->
<script src="angular.chart.min.js"></script>
<script src="chart.js"></script>
score:0
Source: stackoverflow.com
Related Query
- ChartJs in ionic Framework
- How to add ChartJS code in Html2Pdf to view image
- How do I add time sourced from an external source as an X axis to a ChartJS graph?
- Chartjs not working with d3 from csv source
- ChartJS have xAxes labels match data source
- Plot Multiple Line Chart in Ionic 3 with ChartJS
- Updating Chartjs to 2.5 with custom code
- ionic display chartjs data from json http request
- Updating Chartjs dataset in Ionic
- Calling data from outside of Chartjs code
- VueJS + Chartjs - Chart only renders after code change
- ChartJS 2.0 differences in code help needed
- My Chartjs is not updating after setstate full code attached Reactjs Update
- Chartjs doc examples are lightning fast but same code is slow when reproducing
- 'require is not defined' error when attempting to use chartjs in javascript code
- How to run Chart.js samples using source code
- Chart in Ionic Framework doesn't show up
- Chartjs is disappearing in Ionic tabs when keyboard dismiss
- Code for Chartjs Typescript definition file
- Dynamically update values of a chartjs chart
- Different color for each bar in a bar chart; ChartJS
- Hide points in ChartJS LineGraph
- ChartJS Line Charts - remove color underneath lines
- Skip decimal points on y-axis in chartJS
- How to set ChartJS Y axis title?
- Chartjs Bar Chart showing old data when hovering
- Chartjs change grid line color
- Chart area background color chartjs
- Custom Legend with ChartJS v2.0
- Chartjs Tooltip Line Breaks
More Query from same tag
- Chart.js: load new data on click
- iframes without sandbox attribute is a Vulnerability
- Chart.js 2.0 Formatting Y Axis with Currency and Thousands Separator
- ChartJS - how to display line chart with single element as a line? (not as a dot)
- Chart.js : Is there a way to name each bubble in chart?
- Chart.js time scale not showing data
- How do I import chartjs as an es6 module?
- How do I place a new line in a label with Chart.js?
- Type error when config ChartJs in Typescript
- How to use data from database for chart.js (bubble chart) with Ajax/JSON method?
- Tooltip backgroundColor depending on chart color ChartJS
- How to change width of the chart using Chart.js
- How to add image to chart.js tooltip?
- chart.js stacked graph that overlaps
- not able to set dataset value in chart.js
- The colors of the bar chart in chart.js is not showing. I tried background color and fill color but none of it worked
- How to set defaults for scales in ChartJS?
- ChartJs doesn't work on a local downloaded page of Circular Gauge chart example
- hide data of the datasets in radar chart?
- Chart.js line chart not showing in Google Chrome canvas(only in Microsoft Edge)
- react-chartjs-2 how to set multiple background levels within a line chart
- Zoom is very slow in ChartJS Zoom Plugin
- Uncaught TypeError: lineChart.Line is not a function in chart.js
- Chart JS chart not rendering in ArcGIS popup when using navigation arrows
- Can't make chart with Chart.js
- JSON cyclic object value when posting data in ChartJS
- Issue with int numbers using chart.js
- Strange lines between horizontal bars in Chart.js 2.0
- Graphing the timestamp and data from mysql
- ChartJS shows date, but not time, when displaying labels in time axis