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.

52 lines
1.2 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: ['season', 'total'],
  11. data: [{
  12. season: 'Summer',
  13. total: 150
  14. },{
  15. season: 'Fall',
  16. total: 245
  17. },{
  18. season: 'Winter',
  19. total: 117
  20. },{
  21. season: 'Spring',
  22. total: 184
  23. }]
  24. });
  25. new Ext.Panel({
  26. width: 400,
  27. height: 400,
  28. title: 'Pie Chart with Legend - Favorite Season',
  29. renderTo: 'container',
  30. items: {
  31. store: store,
  32. xtype: 'piechart',
  33. dataField: 'total',
  34. categoryField: 'season',
  35. //extra styles get applied to the chart defaults
  36. extraStyle:
  37. {
  38. legend:
  39. {
  40. display: 'bottom',
  41. padding: 5,
  42. font:
  43. {
  44. family: 'Tahoma',
  45. size: 13
  46. }
  47. }
  48. }
  49. }
  50. });
  51. });