Web Interface For Lite Argus Control modules
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.6 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /*!
  2. * Ext JS Library 3.3.1
  3. * Copyright(c) 2006-2010 Sencha Inc.
  4. * licensing@sencha.com
  5. * http://www.sencha.com/license
  6. */
  7. Ext.chart.Chart.CHART_URL = '../../resources/charts.swf';
  8. Ext.onReady(function(){
  9. var store = new Ext.data.JsonStore({
  10. fields: ['year', 'comedy', 'action', 'drama', 'thriller'],
  11. data: [
  12. {year: 2005, comedy: 34000000, action: 23890000, drama: 18450000, thriller: 20060000},
  13. {year: 2006, comedy: 56703000, action: 38900000, drama: 12650000, thriller: 21000000},
  14. {year: 2007, comedy: 42100000, action: 50410000, drama: 25780000, thriller: 23040000},
  15. {year: 2008, comedy: 38910000, action: 56070000, drama: 24810000, thriller: 26940000}
  16. ]
  17. });
  18. new Ext.Panel({
  19. width: 600,
  20. height: 400,
  21. renderTo: 'container',
  22. title: 'Stacked Bar Chart - Movie Takings by Genre',
  23. items: {
  24. xtype: 'stackedbarchart',
  25. store: store,
  26. yField: 'year',
  27. xAxis: new Ext.chart.NumericAxis({
  28. stackingEnabled: true,
  29. labelRenderer: Ext.util.Format.usMoney
  30. }),
  31. series: [{
  32. xField: 'comedy',
  33. displayName: 'Comedy'
  34. },{
  35. xField: 'action',
  36. displayName: 'Action'
  37. },{
  38. xField: 'drama',
  39. displayName: 'Drama'
  40. },{
  41. xField: 'thriller',
  42. displayName: 'Thriller'
  43. }]
  44. }
  45. });
  46. });