Chart.js library not rendering on device


#1

I’ve used the chart.js library in a few ionic projects last year (using the angles wrapper), but I’m not able to get the charts to render on my device (iPhone 5S) now. It works fine in chrome after ionic serve, but isn’t able to show up on my device. I’ve also tried using the angular-chart wrapper, and that hasn’t worked either.

Any ideas? Could this be an ionic update issue?


What's your favorite charting library?
#2

@PGBears I am having the exact same issue, Chart.js chart renders in Chrome but not on device. Here is my order of includes ( I have also tried including Chart.js above ionic):

<script src="lib/angular/angular.js"></script>
<script src="lib/angular-animate/angular-animate.js"></script>
<script src="lib/angular-sanitize/angular-sanitize.js"></script>
<script src="lib/angular-ui-router/release/angular-ui-router.js"></script>
 <script src="lib/ionic/js/ionic.js"></script>
 <script src="lib/ionic/js/ionic-angular.js"></script>
<script src="cordova.js"></script>
<script src="lib/Chart.js/Chart.min.js"></script>
<script src="js/app.js"></script>

I am using Chart.js v1.0.1 and Ionic v1.0.0rc-1

Did you ever find a solution to this issue? Thanks!


#3

Does it work if you rotate the device? On my SGS3 chart.js does not render (however it renders on desktop fine). If, on my mobile, I open the webpage containing the graph in portrait, there is no chart, if I rotate the device to landscape, it appears and remains until I navigate away from the page. Very odd.