Warning: Use of undefined constant Symbol - assumed 'Symbol' (this will throw an Error in a future version of PHP) in /mnt/new-ebs/workbench-106550/lib/dojo/util/docscripts/lib/parser2/dojo2.inc on line 215 Warning: Use of undefined constant JavaScriptSymbol - assumed 'JavaScriptSymbol' (this will throw an Error in a future version of PHP) in /mnt/new-ebs/workbench-106550/lib/dojo/util/docscripts/lib/parser2/dojo2.inc on line 215

dojox/charting/DataChart.js

  • Provides:

    • dojox.charting.DataChart
  • Requires:

    • dojox.charting.Chart2D in common
    • dojox.charting.themes.PlotKit.blue in common
  • dojox.charting.DataChart

    • type
      Function
    • chains:
      • dojox.charting.Chart2D: (prototype)
      • dojox.charting.Chart2D: (call)
    • parameters:
      • node: (typeof DomNode)
        The node to attach the chart to.
      • kwArgs: (typeof Object)
    • summary
      DataChart
      Extension to the 2D chart that connects to a data store in
      a simple manner. Convenience methods have been added for
      connecting store item labels to the chart labels.
    • description
      This code should be considered very experimental and the APIs subject
      to change. This is currently an alpha version and will need some testing
      and review.
      
      The main reason for this extension is to create animated charts, generally
      available with scroll=true, and a property field that gets continually updated.
      The previous property settings are kept in memory and displayed until scrolled
      off the chart.
      
      Although great effort was made to maintain the integrity of the current
      charting APIs, some things have been added or modified in order to get
      the store to connect and also to get the data to scroll/animate.
      "displayRange" in particular is used to force the xaxis to a specific
      size and keep the chart from stretching or squashing to fit the data.
      
      Currently, plot lines can only be set at initialization. Setting
      a new store query will have no effect (although using setStore
      may work but its untested).
    • example
      	var chart = new dojox.charting.DataChart("myNode", {
      		displayRange:8,
      		store:dataStore,
      		query:{symbol:"*"},
      		fieldName:"price"
      		type: dojox.charting.plot2d.Columns
      	});
      
      properties:
  • dojox.charting.DataChart.scroll

    • type
      Boolean
    • summary
      Whether live data updates and changes display, like columns moving
      up and down, or whether it scrolls to the left as data is added
  • dojox.charting.DataChart.comparative

    • type
      Boolean
    • summary
      If false, all items are each their own series.
      If true, the items are combined into one series
      so that their charted properties can be compared.
  • dojox.charting.DataChart.query

    • type
      String
    • summary
      Used for fetching items. Will vary depending upon store.
  • dojox.charting.DataChart.queryOptions

    • type
      String
    • summary
      Option used for fetching items
  • dojox.charting.DataChart.fieldName

    • type
      String
    • summary
      The field in the store item that is getting charted
  • dojox.charting.DataChart.chartTheme

    • alias - dojox.charting.themes.PlotKit.blue
    • type
      dojox.charting.themes.*
    • summary
      The theme to style the chart. Defaults to PlotKit.blue.
  • dojox.charting.DataChart.displayRange

    • type
      Number
    • summary
      The number of major ticks to show on the xaxis
  • dojox.charting.DataChart.stretchToFit

    • type
      Boolean
    • summary
      If true, chart is sized to data. If false, chart is a
      fixed size. Note, is overridden by displayRange.
      TODO: Stretch for the y-axis?
  • dojox.charting.DataChart.minWidth

    • type
      Number
    • summary
      The the smallest the chart width can be
  • dojox.charting.DataChart.minHeight

    • type
      Number
    • summary
      The the smallest the chart height can be
  • dojox.charting.DataChart.showing

    • type
      Boolean
    • summary
      Whether the chart is showing (default) on
      initialization or hidden.
  • dojox.charting.DataChart.label

    • type
      String
    • summary
      The name field of the store item
      DO NOT SET: Set from store.labelAttribute
  • dojox.charting.DataChart.constructor

    • constructor - constructor
    • type
      Function
    • parameters:
      • node: (typeof DomNode)
        The node to attach the chart to.
      • kwArgs: (typeof Object)
    • summary
      Set up properties and initialize chart build.
      
      arguments:
  • dojox.charting.DataChart.destroy

    • type
      Function
  • dojox.charting.DataChart.setStore

    • parameters:
      • store: (typeof Object)
      • query: (typeof ?)
        String
      • fieldName: (typeof ?)
        String
      • queryOptions: (typeof ?)
        Object
    • summary
      Sets the chart store and query
      then does the first fetch and
      connects to subsequent changes.
      
      TODO: Not handling resetting store
    • type
      Function
  • dojox.charting.DataChart.firstRun

    • type
      Object
  • dojox.charting.DataChart.store

    • type
      Object
  • dojox.charting.DataChart._events

    • type
      Array
  • dojox.charting.DataChart.show

    • summary
      If chart is hidden, show it
    • type
      Function
  • dojox.charting.DataChart.hide

    • summary
      If chart is showing, hide it
      Prevents rendering while hidden
    • type
      Function
  • dojox.charting.DataChart.onSet

    • parameters:
      • item: (typeof storeObject)
    • summary
      Fired when a store item changes.
      Collects the item calls and when
      done (after 200ms), sends item
      array to onData().
      
      FIXME: Using labels instead of IDs for item
      identifiers here and in the chart series. This
      is obviously short sighted, but currently used
      for seriesLabels. Workaround for potential bugs
      is to assign a label for which all items are unique.
    • type
      Function
  • dojox.charting.DataChart.onSetInterval

    • type
      Number
  • dojox.charting.DataChart.onError

    • parameters:
      • err: (typeof Error)
    • type
      Function
  • dojox.charting.DataChart.onDataReceived

    • parameters:
      • items: (typeof Array)
    • summary
      stub. Fires after data is received but
      before data is parsed and rendered
    • type
      Function
  • dojox.charting.DataChart.getProperty

    • parameters:
      • item: (typeof storeObject)
      • prop
    • summary
      The main use of this function is to determine
      between a single value and an array of values.
      Other property types included for convenience.
    • type
      Function
  • dojox.charting.DataChart.onData

    • parameters:
      • items: (typeof Array)
    • summary
      Called after a completed fetch
      or when store items change.
      On first run, sets the chart data,
      then updates chart and legends.
      
      console.log("Store:", store);console.log("items: (", items.length+")", items);console.log("Chart:", this);
    • type
      Function
  • dojox.charting.DataChart.items

  • dojox.charting.DataChart.dataOffset

    • type
      Number
  • dojox.charting.DataChart.dataLength

    • type
      Number
  • dojox.charting.DataChart.fetch

    • summary
      Fetches initial data. Subsequent changes
      are received via onSet in data store.
    • type
      Function
  • dojox.charting.DataChart.convertLabels

    • parameters:
      • axis
    • returns
      null
    • summary
      Convenience method to convert a label array of strings
      into an array of objects
    • type
      Function
  • dojox.charting.DataChart.seriesLabels

    • parameters:
      • val: (typeof Number)
    • returns
      String
    • summary
      Convenience method that sets series labels based on item labels.
    • type
      Function
  • dojox.charting.DataChart.resizeChart

    • parameters:
      • dim: (typeof Object)
    • summary
      Call this function to change the chart size.
      Can be connected to a layout widget that calls
      resize.
    • type
      Function
  • dojox.charting.DataChart.domNode

    • type
      Object
  • dojox.charting.DataChart.xaxis

    • type
      Object
    • summary
      First query for store
      grid: Object
      Options for the grid plot
      chartPlot: Object
      Options for chart elements (lines, bars, etc)
  • dojox.charting.DataChart.xaxis.labelFunc

    • type
      Object
  • dojox.charting.DataChart.yaxis

    • type
      Object
    • summary
      optional parameters for yaxis (see above)
      store: Object
      dojo.data store (currently nly supports Persevere)
  • dojox.charting.DataChart.yaxis.labelFunc

    • type
      Object
  • dojox.charting.DataChart.onSetItems

    • type
      Object
  • dojox.charting.DataChart.seriesData

    • type
      Object
  • dojox.charting.DataChart.seriesDataBk

    • type
      Object
  • dojox.charting.DataChart.chartTheme.plotarea.stroke

    • type
      Object
  • dojox.charting.DataChart.xaxis.to

  • dojox.charting

    • type
      Object
  • dojox

    • type
      Object