To use your widget with pre-AMD code, you need to declare your module with dojo / _ base / define, and the first argument to your definition function is the identifier of the module in dotted notation, for example:
define(["dojo/_base/declare","dojox/charting/Chart",...."dijit/Dialog","dojo/dom-construct"], function (declare, Chart){ return declare("customModules.singleChart", null, { showDailyChart: function(data){
The second argument to the declare function is the class or list of classes you inherit from, or null in this case.
You can then use this widget by creating it using the βnewβ keyword.
var foo = new customModules.singleChart(); foo.showDailyChart(data); ...
If you want a static function instead, you can do it like this:
define(["dojo/_base/declare","dojox/charting/Chart",...."dijit/Dialog","dojo/dom-construct"], function (declare, Chart){ var widget = declare("customModules.singleChart", null, { }); widget.showDailyChart = function(data){
Then you can use it as follows:
customModules.singleChart.showDailyChart(data);
More details here: http://dojotoolkit.org/reference-guide/1.9/dojo/_base/declare.html#signature