MaazAli / Meteor-HighCharts

HighCharts for Meteor, with an easy to use helper to get you started!
MIT License
53 stars 20 forks source link

no data to display #38

Closed VeilleurTrytoFix closed 8 years ago

VeilleurTrytoFix commented 8 years ago

hi i'm noob on meteor, trying to build charts from mongodb

I use the official tutorial meteor completed your example (Posts mongodb), how can i diagnostic "no data to display"

i just changed ===> data: Posts.find().fetch()

I seek how to diagnose my error (sry for english google translate :-1: )

thhanks for your back !

Template.evemarket.topGenresChart = function() {
    return {
        chart: {
            plotBackgroundColor: null,
            plotBorderWidth: null,
            plotShadow: false
        },
        title: {
            text: "Mycharts"
        },
        tooltip: {
            pointFormat: '<b>{point.percentage:.1f}%</b>'
        },
        plotOptions: {
            pie: {
                allowPointSelect: true,
                cursor: 'pointer',
                dataLabels: {
                    enabled: true,
                    format: '<b>{point.name}</b>: {point.percentage:.1f} %',
                    style: {
                        color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'
                    },
                    connectorColor: 'silver'
                }
            }
        },
        series: [{
            type: 'bar',
            name: 'genre',
            data: Posts.find().fetch()
        }]
    };
};
VeilleurTrytoFix commented 8 years ago

Fixed with => https://github.com/jhuenges/highcharts-demo/issues/4