I’m having problems displaying graphs on an android device. In these examples I’m using chartist, but I’ve tried with highcharts and get the same problem
I have the following code which displays charts in a desktop browser no problem…
HTML:
<template name="graphsAcc">
<div class="ct-chart ct-perfect-fourth"></div>
</template>
JS:
if(Meteor.isClient) {
Template.graphsAcc.onRendered(function(){
self.data = {
labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri'],
series: [
[5, 2, 4, 2, 0]
]
};
new Chartist.Line('.ct-chart', self.data);
});
}
However, this doesnt display when I try to deploy it as an android/cordova app.
I have tried placing placing it in cordova specific code, but this doesnt work either:
if(Meteor.isCordova) {
Template.graphsAcc.onRendered(function(){
self.data = {
labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri'],
series: [
[5, 2, 4, 2, 0]
]
};
new Chartist.Line('.ct-chart', self.data);
});
}
Is there a reason why the chart shows in a desktop browser, but not when ran as an android app?