Base.js 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. define("dojox/charting/action2d/Base", ["dojo/_base/lang", "dojo/_base/declare"],
  2. function(lang, declare){
  3. return declare("dojox.charting.action2d.Base", null, {
  4. // summary:
  5. // Base action class for plot and chart actions.
  6. constructor: function(chart, plot){
  7. // summary:
  8. // Create a new base action. This can either be a plot or a chart action.
  9. // chart: dojox.charting.Chart
  10. // The chart this action applies to.
  11. // plot: String?|dojox.charting.plot2d.Base?
  12. // Optional target plot for this action. Default is "default".
  13. this.chart = chart;
  14. this.plot = plot ? (lang.isString(plot) ? this.chart.getPlot(plot) : plot) : this.chart.getPlot("default");
  15. },
  16. connect: function(){
  17. // summary:
  18. // Connect this action to the plot or the chart.
  19. },
  20. disconnect: function(){
  21. // summary:
  22. // Disconnect this action from the plot or the chart.
  23. },
  24. destroy: function(){
  25. // summary:
  26. // Do any cleanup needed when destroying parent elements.
  27. this.disconnect();
  28. }
  29. });
  30. });