Advertisement
Guest User

Untitled

a guest
Feb 10th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.04 KB | None | 0 0
  1. var chartDataStore = Ext.create("Ext.data.ArrayStore", {
  2. storeId: "chartData",
  3. fields: ['question', 'interviewer', 'employee' ],
  4. data: [
  5. ["erti",6,7],
  6. ["ori",7,4],
  7. ["sami",3,6],
  8. ["otxi",1,9],
  9. ["xuti",6,8],
  10. ["eqvsi",6,4],
  11. ["shvidi",7,3],
  12. ["rva",3,2]
  13. ]
  14. });
  15. Ext.create({
  16. xtype: 'chart',
  17. width: '100%',
  18. height: 410,
  19. padding: '10 0 0 0',
  20. renderTo: document.body,
  21. animate: true,
  22. shadow: true,
  23. style: 'background: #fff;',
  24. legend: {
  25. docked: 'right',
  26. border: 0,
  27. margin: 0,
  28. labelFont: '12px Helvetica'
  29. },
  30. store: chartDataStore,
  31. insetPadding: 40,
  32. axes: [{
  33. type: 'numeric',
  34. fields: ['interviewer', 'employee' ],
  35. position: 'left',
  36. maximum:9,
  37. grid: true,
  38. minimum: 0,
  39. minorTickSteps: 1
  40. }, {
  41. type: 'category',
  42. fields: 'question',
  43. position: 'bottom',
  44. grid: true,
  45. label: {
  46. rotate: {
  47. degrees: -45
  48. }
  49. }
  50. }],
  51. series: [{
  52. type: "line",
  53. axis: "left",
  54. xField: "question",
  55. yField: "interviewer",
  56. title: "Interviewer",
  57. marker: true,
  58. style: {
  59. 'stroke-width': 4
  60. },
  61. markerConfig: {
  62. type: 'circle',
  63. radius: 4,
  64. fill: '#fff'
  65. },
  66. highlight: {
  67. fill: '#000',
  68. radius: 5,
  69. 'stroke-width': 2,
  70. stroke: '#fff'
  71. },
  72. tips:{
  73. trackMouse: true,
  74. style: 'background: #FFF',
  75. height: 20,
  76. renderer: function(storeItem, item) {
  77. var title = item.series.title;
  78. this.setTitle(title + ' for ' + storeItem.get('employee') + ': ' + storeItem.get('interviewer') + storeItem.get('question'));
  79. }
  80.  
  81. }
  82.  
  83. }, {
  84. type: "line",
  85. axis: "left",
  86. xField: "question",
  87. yField: "employee",
  88. title: "Employee",
  89. marker: true,
  90. style: {
  91. 'stroke-width': 4
  92. },
  93. markerConfig: {
  94. type: 'circle',
  95. radius: 4,
  96. fill: '#fff'
  97. },
  98. highlight: {
  99. fill: '#000',
  100. radius: 5,
  101. 'stroke-width': 2,
  102. stroke: '#fff'
  103. },
  104. tips: {
  105. trackMouse: true,
  106. style: 'background: #FFF',
  107. height: 20,
  108. renderer: function(storeItem, item) {
  109. var title = item.series.title;
  110. this.setTitle(title + ' for ' + storeItem.get('employee') + ': ' + storeItem.get('interviewer') + storeItem.get('question'));
  111. }
  112.  
  113. }
  114.  
  115. }]
  116.  
  117. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement