Search code examples
angularjsmobileionic-frameworkhybrid-mobile-appchart.js

Chart in Ionic Framework doesn't show up


i'm trying to create a chart in my Ionic App using angular-chart.js, when i add the required code to the app and test it in the desktop, the chart apears correctly but when i build the app and test it in the phone the whole page where is supposed to be the chart goes blank and doesn't show anything.

I tried with another angular plugin to create charts but had the same result, both of them uses chart.js

Do you know another angular-chart framework that works with Ionic? or have any idea of what the problem could be?

Thanks a lot for the help


Solution

  • The way you include the style sheet's in Ionic framework will have the drawback to display the charts in simulator or in mobile device. I am uploading a sample project on Charts by using Ionic framework in github.
    1.Please follow the steps in readme.md file of github
    2.Download the required files to run the project
    3.Having any queries please reply

    I think the drawback for your project is the way of css file's you include

    I followed like this

        <link href="lib/ionic/css/ionic.css" rel="stylesheet">
        <link rel="stylesheet" href="lib/angular-chart.js/dist/angular-chart.css">
        <link href="css/style.css" rel="stylesheet">