Chintan Dhingra
Chintan Dhingra

Reputation: 41

Resolving "TypeError: node is null" error in dojo

My following code produces "TypeError: node is null". Kindly help resolve the issue.

  function(Chart, theme, Pie, Tooltip, MoveSlice) {

     var chartData = [1000,3000,2000,4000,2300,2600];
     var chart = new Chart("chartNode");
     chart.setTheme(theme);

     chart.addPlot("default", {
       type: Pie,
       markers: true,
       radius:300
     });

    chart.addAxis("x");
    chart.addAxis("y", { min: 5000, max: 30000, vertical: true, fixLower: "major", fixUpper: "major" });

    chart.addSeries("Monthly Sales - 2010",chartData);

    var tip = new Tooltip(chart,"default");

    var mag = new MoveSlice(chart,"default");

   chart.render();
)};

Thanks in advance...

Upvotes: 0

Views: 3260

Answers (1)

jshthornton
jshthornton

Reputation: 1314

You have given us all very little to go with. We would need to see your html and the rest of the code.

The best chance is to a query('#chartNode'); and see if that returns anything. If it doesn't then you know your problem.

Upvotes: 1

Related Questions