AnsweredAssumed Answered

dojox.charting.Chart and dijit.form.Forms both undefined

Question asked by DrColgate on Oct 6, 2014
Latest reply on Oct 6, 2014 by DrColgate

I am having trouble accessing some of the features of Dojo via the ESRI js.  I have used several links to no avail

 

http://serverapi.arcgisonline.com/jsapi/arcgis/3.5/ 

http://js.arcgis.com/3.10/ 

http://js.arcgis.com/3.11/ )

 

When I try to use dijit.form.Form I hit an undefined error.  I notice that this is not referenced in any of the above links.  I resolved this problem by using dijit.layout.ContentPane.  Notably I could use dijit.form.Button and dijit.form.TextBox so it is not an issue with dijit.form.

 

Now I am hitting a similar error with dojox.charting however I do not appear to be able to hit dojox.charting at all.  Once again I notice that it is not referenced in the linked Javascript.

 

I have minimal HTML scripting as I am building nearly everything programatically:

 

<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>

<script src="http://js.arcgis.com/3.11/"></script>

 

 

My Javascript looks like this:

 

/*global esri*/

/*global dojo*/

/*global dijit*/

/*global dojox*/

 

function createLineChart(startMeasure, elevations) {

 

    var lineChart = new dojox.charting.Chart("simplechart");

 

    lineChart.addPlot("default", {type: "Lines"});

    lineChart.addAxis("x");

    lineChart.addAxis("y", {vertical: "true"});

    lineChart.addSeries("SERIES X", elevations);

    lineChart.render();

}

 

The error is on the first line of the function where Chart is undefined, charting is also undefined as is Chart2D.

 

I am perplexed as to why everything else works but I do not seem to be hit a number of functions from the Dojo toolkit when I can use other functions in the same namespace.

Outcomes