extjs-rails 4.1.0.alpha5 → 4.1.0.alpha6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (507) hide show
  1. data/app/assets/javascripts/extjs-rails.js +95613 -11000
  2. data/lib/extjs-rails/version.rb +1 -1
  3. metadata +2 -509
  4. data/app/assets/javascripts/src/AbstractComponent.js +0 -3290
  5. data/app/assets/javascripts/src/AbstractManager.js +0 -144
  6. data/app/assets/javascripts/src/AbstractPlugin.js +0 -72
  7. data/app/assets/javascripts/src/Action.js +0 -276
  8. data/app/assets/javascripts/src/Ajax.js +0 -99
  9. data/app/assets/javascripts/src/Component.js +0 -1344
  10. data/app/assets/javascripts/src/ComponentLoader.js +0 -202
  11. data/app/assets/javascripts/src/ComponentManager.js +0 -47
  12. data/app/assets/javascripts/src/ComponentQuery.js +0 -521
  13. data/app/assets/javascripts/src/Editor.js +0 -494
  14. data/app/assets/javascripts/src/ElementLoader.js +0 -404
  15. data/app/assets/javascripts/src/FocusManager.js +0 -712
  16. data/app/assets/javascripts/src/Img.js +0 -111
  17. data/app/assets/javascripts/src/Layer.js +0 -543
  18. data/app/assets/javascripts/src/LoadMask.js +0 -432
  19. data/app/assets/javascripts/src/ModelManager.js +0 -186
  20. data/app/assets/javascripts/src/PluginManager.js +0 -110
  21. data/app/assets/javascripts/src/ProgressBar.js +0 -336
  22. data/app/assets/javascripts/src/Shadow.js +0 -233
  23. data/app/assets/javascripts/src/ShadowPool.js +0 -43
  24. data/app/assets/javascripts/src/Template.js +0 -331
  25. data/app/assets/javascripts/src/XTemplate.js +0 -365
  26. data/app/assets/javascripts/src/XTemplateCompiler.js +0 -450
  27. data/app/assets/javascripts/src/XTemplateParser.js +0 -249
  28. data/app/assets/javascripts/src/ZIndexManager.js +0 -519
  29. data/app/assets/javascripts/src/app/Application.js +0 -271
  30. data/app/assets/javascripts/src/app/Controller.js +0 -458
  31. data/app/assets/javascripts/src/app/EventBus.js +0 -112
  32. data/app/assets/javascripts/src/button/Button.js +0 -1483
  33. data/app/assets/javascripts/src/button/Cycle.js +0 -215
  34. data/app/assets/javascripts/src/button/Split.js +0 -99
  35. data/app/assets/javascripts/src/chart/Callout.js +0 -140
  36. data/app/assets/javascripts/src/chart/Chart.js +0 -966
  37. data/app/assets/javascripts/src/chart/Highlight.js +0 -172
  38. data/app/assets/javascripts/src/chart/Label.js +0 -241
  39. data/app/assets/javascripts/src/chart/Legend.js +0 -474
  40. data/app/assets/javascripts/src/chart/LegendItem.js +0 -217
  41. data/app/assets/javascripts/src/chart/Mask.js +0 -230
  42. data/app/assets/javascripts/src/chart/MaskLayer.js +0 -48
  43. data/app/assets/javascripts/src/chart/Navigation.js +0 -79
  44. data/app/assets/javascripts/src/chart/Shape.js +0 -106
  45. data/app/assets/javascripts/src/chart/Tip.js +0 -98
  46. data/app/assets/javascripts/src/chart/TipSurface.js +0 -42
  47. data/app/assets/javascripts/src/chart/axis/Abstract.js +0 -73
  48. data/app/assets/javascripts/src/chart/axis/Axis.js +0 -961
  49. data/app/assets/javascripts/src/chart/axis/Category.js +0 -130
  50. data/app/assets/javascripts/src/chart/axis/Gauge.js +0 -203
  51. data/app/assets/javascripts/src/chart/axis/Numeric.js +0 -235
  52. data/app/assets/javascripts/src/chart/axis/Radial.js +0 -204
  53. data/app/assets/javascripts/src/chart/axis/Time.js +0 -135
  54. data/app/assets/javascripts/src/chart/series/Area.js +0 -803
  55. data/app/assets/javascripts/src/chart/series/Bar.js +0 -853
  56. data/app/assets/javascripts/src/chart/series/Cartesian.js +0 -328
  57. data/app/assets/javascripts/src/chart/series/Column.js +0 -104
  58. data/app/assets/javascripts/src/chart/series/Gauge.js +0 -490
  59. data/app/assets/javascripts/src/chart/series/Line.js +0 -1104
  60. data/app/assets/javascripts/src/chart/series/Pie.js +0 -1072
  61. data/app/assets/javascripts/src/chart/series/Radar.js +0 -440
  62. data/app/assets/javascripts/src/chart/series/Scatter.js +0 -668
  63. data/app/assets/javascripts/src/chart/series/Series.js +0 -443
  64. data/app/assets/javascripts/src/chart/theme/Base.js +0 -175
  65. data/app/assets/javascripts/src/chart/theme/Theme.js +0 -253
  66. data/app/assets/javascripts/src/container/AbstractContainer.js +0 -1062
  67. data/app/assets/javascripts/src/container/ButtonGroup.js +0 -143
  68. data/app/assets/javascripts/src/container/Container.js +0 -212
  69. data/app/assets/javascripts/src/container/DockingContainer.js +0 -265
  70. data/app/assets/javascripts/src/container/Viewport.js +0 -184
  71. data/app/assets/javascripts/src/core/dom/Element.form.js +0 -50
  72. data/app/assets/javascripts/src/core/dom/Element.static-more.js +0 -159
  73. data/app/assets/javascripts/src/core/examples/index.html +0 -321
  74. data/app/assets/javascripts/src/core/examples/index.js +0 -6
  75. data/app/assets/javascripts/src/core/examples/src/Sample/CTO.js +0 -25
  76. data/app/assets/javascripts/src/core/examples/src/Sample/CoolGuy.js +0 -20
  77. data/app/assets/javascripts/src/core/examples/src/Sample/Developer.js +0 -43
  78. data/app/assets/javascripts/src/core/examples/src/Sample/Gun.js +0 -3
  79. data/app/assets/javascripts/src/core/examples/src/Sample/HumanResource.js +0 -23
  80. data/app/assets/javascripts/src/core/examples/src/Sample/Musician.js +0 -20
  81. data/app/assets/javascripts/src/core/examples/src/Sample/Person.js +0 -50
  82. data/app/assets/javascripts/src/core/examples/src/Sample/ability/CanComposeSongs.js +0 -9
  83. data/app/assets/javascripts/src/core/examples/src/Sample/ability/CanPlayGuitar.js +0 -9
  84. data/app/assets/javascripts/src/core/examples/src/Sample/ability/CanSing.js +0 -18
  85. data/app/assets/javascripts/src/core/examples/src/Sample/deadlock/A.js +0 -3
  86. data/app/assets/javascripts/src/core/examples/src/Sample/deadlock/B.js +0 -3
  87. data/app/assets/javascripts/src/core/examples/src/Sample/deadlock/C.js +0 -3
  88. data/app/assets/javascripts/src/core/examples/src/Sample/deadlock/D.js +0 -3
  89. data/app/assets/javascripts/src/core/examples/src/Sample/deadlock/E.js +0 -3
  90. data/app/assets/javascripts/src/core/examples/src/Sample/notdeadlock/A.js +0 -3
  91. data/app/assets/javascripts/src/core/examples/src/Sample/notdeadlock/B.js +0 -4
  92. data/app/assets/javascripts/src/core/examples/src/Sample/notdeadlock/C.js +0 -3
  93. data/app/assets/javascripts/src/core/src/EventManager.js +0 -1167
  94. data/app/assets/javascripts/src/core/src/EventObject.js +0 -883
  95. data/app/assets/javascripts/src/core/src/Ext-more.js +0 -1283
  96. data/app/assets/javascripts/src/core/src/Ext.js +0 -736
  97. data/app/assets/javascripts/src/core/src/Support.js +0 -662
  98. data/app/assets/javascripts/src/core/src/class/Base.js +0 -1085
  99. data/app/assets/javascripts/src/core/src/class/Class.js +0 -676
  100. data/app/assets/javascripts/src/core/src/class/ClassManager.js +0 -1591
  101. data/app/assets/javascripts/src/core/src/class/Loader.js +0 -1423
  102. data/app/assets/javascripts/src/core/src/dom/AbstractElement.alignment.js +0 -173
  103. data/app/assets/javascripts/src/core/src/dom/AbstractElement.insertion.js +0 -193
  104. data/app/assets/javascripts/src/core/src/dom/AbstractElement.js +0 -681
  105. data/app/assets/javascripts/src/core/src/dom/AbstractElement.position.js +0 -356
  106. data/app/assets/javascripts/src/core/src/dom/AbstractElement.static.js +0 -474
  107. data/app/assets/javascripts/src/core/src/dom/AbstractElement.style.js +0 -851
  108. data/app/assets/javascripts/src/core/src/dom/AbstractElement.traversal.js +0 -180
  109. data/app/assets/javascripts/src/core/src/dom/AbstractHelper.js +0 -291
  110. data/app/assets/javascripts/src/core/src/dom/AbstractQuery.js +0 -72
  111. data/app/assets/javascripts/src/core/src/dom/CompositeElement.js +0 -75
  112. data/app/assets/javascripts/src/core/src/dom/CompositeElementLite.js +0 -436
  113. data/app/assets/javascripts/src/core/src/dom/DomQuery-aria.js +0 -1049
  114. data/app/assets/javascripts/src/core/src/env/Browser.js +0 -186
  115. data/app/assets/javascripts/src/core/src/env/FeatureDetector.js +0 -274
  116. data/app/assets/javascripts/src/core/src/env/OS.js +0 -141
  117. data/app/assets/javascripts/src/core/src/lang/Array.js +0 -1205
  118. data/app/assets/javascripts/src/core/src/lang/Date.js +0 -1463
  119. data/app/assets/javascripts/src/core/src/lang/Error.js +0 -326
  120. data/app/assets/javascripts/src/core/src/lang/Function.js +0 -485
  121. data/app/assets/javascripts/src/core/src/lang/Number.js +0 -175
  122. data/app/assets/javascripts/src/core/src/lang/Object.js +0 -606
  123. data/app/assets/javascripts/src/core/src/lang/String.js +0 -333
  124. data/app/assets/javascripts/src/core/src/misc/JSON.js +0 -236
  125. data/app/assets/javascripts/src/core/src/perf/Accumulator.js +0 -244
  126. data/app/assets/javascripts/src/core/src/perf/Monitor.js +0 -197
  127. data/app/assets/javascripts/src/core/src/util/DelayedTask.js +0 -71
  128. data/app/assets/javascripts/src/core/src/util/Event.js +0 -215
  129. data/app/assets/javascripts/src/core/src/util/Format.js +0 -551
  130. data/app/assets/javascripts/src/core/src/util/TaskManager.js +0 -417
  131. data/app/assets/javascripts/src/core/src/version/Version.js +0 -364
  132. data/app/assets/javascripts/src/core/test/unit/README.MD +0 -91
  133. data/app/assets/javascripts/src/core/test/unit/bootstrap.js +0 -39
  134. data/app/assets/javascripts/src/core/test/unit/build/build-data.js +0 -34
  135. data/app/assets/javascripts/src/core/test/unit/build/build.sh +0 -2
  136. data/app/assets/javascripts/src/core/test/unit/data.js +0 -27
  137. data/app/assets/javascripts/src/core/test/unit/index.html +0 -15
  138. data/app/assets/javascripts/src/core/test/unit/other_specs/dom.html +0 -40
  139. data/app/assets/javascripts/src/core/test/unit/other_specs/dom/extjs-api.js +0 -12
  140. data/app/assets/javascripts/src/core/test/unit/other_specs/dom/platform-api.js +0 -134
  141. data/app/assets/javascripts/src/core/test/unit/other_specs/dom/sanity.js +0 -4
  142. data/app/assets/javascripts/src/core/test/unit/other_specs/dom/touch-api-out.js +0 -128
  143. data/app/assets/javascripts/src/core/test/unit/other_specs/dom/touch-api.js +0 -89
  144. data/app/assets/javascripts/src/core/test/unit/other_specs/env/Environment.js +0 -357
  145. data/app/assets/javascripts/src/core/test/unit/resources/APITest.js +0 -37
  146. data/app/assets/javascripts/src/core/test/unit/resources/jsb3.js +0 -14
  147. data/app/assets/javascripts/src/core/test/unit/resources/test-setup.js +0 -137
  148. data/app/assets/javascripts/src/core/test/unit/spec/EventManager.js +0 -629
  149. data/app/assets/javascripts/src/core/test/unit/spec/Ext-mess.backup +0 -198
  150. data/app/assets/javascripts/src/core/test/unit/spec/Ext-more.js +0 -520
  151. data/app/assets/javascripts/src/core/test/unit/spec/Ext.js +0 -1550
  152. data/app/assets/javascripts/src/core/test/unit/spec/Support.js +0 -250
  153. data/app/assets/javascripts/src/core/test/unit/spec/class/Base.js +0 -47
  154. data/app/assets/javascripts/src/core/test/unit/spec/class/Class.js +0 -561
  155. data/app/assets/javascripts/src/core/test/unit/spec/class/ClassManager.js +0 -555
  156. data/app/assets/javascripts/src/core/test/unit/spec/dom/CompositeElementLite.js +0 -409
  157. data/app/assets/javascripts/src/core/test/unit/spec/dom/DomHelper.js +0 -444
  158. data/app/assets/javascripts/src/core/test/unit/spec/dom/Element.insertion.js +0 -342
  159. data/app/assets/javascripts/src/core/test/unit/spec/dom/Element.js +0 -731
  160. data/app/assets/javascripts/src/core/test/unit/spec/dom/Element.static.js +0 -201
  161. data/app/assets/javascripts/src/core/test/unit/spec/dom/Element.style.js +0 -118
  162. data/app/assets/javascripts/src/core/test/unit/spec/dom/Element.traversal.js +0 -336
  163. data/app/assets/javascripts/src/core/test/unit/spec/lang/Array.js +0 -1229
  164. data/app/assets/javascripts/src/core/test/unit/spec/lang/Date.js +0 -697
  165. data/app/assets/javascripts/src/core/test/unit/spec/lang/Error.js +0 -277
  166. data/app/assets/javascripts/src/core/test/unit/spec/lang/Function.js +0 -536
  167. data/app/assets/javascripts/src/core/test/unit/spec/lang/Number.js +0 -323
  168. data/app/assets/javascripts/src/core/test/unit/spec/lang/Object.js +0 -591
  169. data/app/assets/javascripts/src/core/test/unit/spec/lang/String.js +0 -451
  170. data/app/assets/javascripts/src/core/test/unit/spec/misc/JSON.js +0 -252
  171. data/app/assets/javascripts/src/core/test/unit/spec/util/Format.js +0 -521
  172. data/app/assets/javascripts/src/core/test/unit/spec/version/Version.js +0 -148
  173. data/app/assets/javascripts/src/core/test/unit/specs.html +0 -19
  174. data/app/assets/javascripts/src/data/AbstractStore.js +0 -887
  175. data/app/assets/javascripts/src/data/ArrayStore.js +0 -74
  176. data/app/assets/javascripts/src/data/Batch.js +0 -236
  177. data/app/assets/javascripts/src/data/BufferStore.js +0 -13
  178. data/app/assets/javascripts/src/data/Connection.js +0 -969
  179. data/app/assets/javascripts/src/data/DirectStore.js +0 -50
  180. data/app/assets/javascripts/src/data/Errors.js +0 -52
  181. data/app/assets/javascripts/src/data/Field.js +0 -341
  182. data/app/assets/javascripts/src/data/IdGenerator.js +0 -198
  183. data/app/assets/javascripts/src/data/JsonP.js +0 -253
  184. data/app/assets/javascripts/src/data/JsonPStore.js +0 -51
  185. data/app/assets/javascripts/src/data/JsonStore.js +0 -60
  186. data/app/assets/javascripts/src/data/Model.js +0 -1673
  187. data/app/assets/javascripts/src/data/NodeInterface.js +0 -1294
  188. data/app/assets/javascripts/src/data/NodeStore.js +0 -254
  189. data/app/assets/javascripts/src/data/Operation.js +0 -331
  190. data/app/assets/javascripts/src/data/Request.js +0 -40
  191. data/app/assets/javascripts/src/data/ResultSet.js +0 -56
  192. data/app/assets/javascripts/src/data/SequentialIdGenerator.js +0 -61
  193. data/app/assets/javascripts/src/data/SortTypes.js +0 -125
  194. data/app/assets/javascripts/src/data/Store.js +0 -2609
  195. data/app/assets/javascripts/src/data/StoreManager.js +0 -156
  196. data/app/assets/javascripts/src/data/Tree.js +0 -290
  197. data/app/assets/javascripts/src/data/TreeStore.js +0 -655
  198. data/app/assets/javascripts/src/data/Types.js +0 -190
  199. data/app/assets/javascripts/src/data/UuidGenerator.js +0 -215
  200. data/app/assets/javascripts/src/data/XmlStore.js +0 -76
  201. data/app/assets/javascripts/src/data/association/Association.js +0 -243
  202. data/app/assets/javascripts/src/data/association/BelongsTo.js +0 -291
  203. data/app/assets/javascripts/src/data/association/HasMany.js +0 -289
  204. data/app/assets/javascripts/src/data/association/HasOne.js +0 -304
  205. data/app/assets/javascripts/src/data/proxy/Ajax.js +0 -282
  206. data/app/assets/javascripts/src/data/proxy/Client.js +0 -21
  207. data/app/assets/javascripts/src/data/proxy/Direct.js +0 -181
  208. data/app/assets/javascripts/src/data/proxy/JsonP.js +0 -313
  209. data/app/assets/javascripts/src/data/proxy/LocalStorage.js +0 -69
  210. data/app/assets/javascripts/src/data/proxy/Memory.js +0 -156
  211. data/app/assets/javascripts/src/data/proxy/Proxy.js +0 -433
  212. data/app/assets/javascripts/src/data/proxy/Rest.js +0 -173
  213. data/app/assets/javascripts/src/data/proxy/Server.js +0 -460
  214. data/app/assets/javascripts/src/data/proxy/SessionStorage.js +0 -39
  215. data/app/assets/javascripts/src/data/proxy/WebStorage.js +0 -546
  216. data/app/assets/javascripts/src/data/reader/Array.js +0 -68
  217. data/app/assets/javascripts/src/data/reader/Json.js +0 -383
  218. data/app/assets/javascripts/src/data/reader/Reader.js +0 -735
  219. data/app/assets/javascripts/src/data/reader/Xml.js +0 -292
  220. data/app/assets/javascripts/src/data/validations.js +0 -149
  221. data/app/assets/javascripts/src/data/writer/Json.js +0 -81
  222. data/app/assets/javascripts/src/data/writer/Writer.js +0 -147
  223. data/app/assets/javascripts/src/data/writer/Xml.js +0 -88
  224. data/app/assets/javascripts/src/dd/DD.js +0 -300
  225. data/app/assets/javascripts/src/dd/DDProxy.js +0 -204
  226. data/app/assets/javascripts/src/dd/DDTarget.js +0 -171
  227. data/app/assets/javascripts/src/dd/DragDrop.js +0 -1101
  228. data/app/assets/javascripts/src/dd/DragDropManager.js +0 -1264
  229. data/app/assets/javascripts/src/dd/DragSource.js +0 -392
  230. data/app/assets/javascripts/src/dd/DragTracker.js +0 -562
  231. data/app/assets/javascripts/src/dd/DragZone.js +0 -137
  232. data/app/assets/javascripts/src/dd/DropTarget.js +0 -118
  233. data/app/assets/javascripts/src/dd/DropZone.js +0 -254
  234. data/app/assets/javascripts/src/dd/Registry.js +0 -117
  235. data/app/assets/javascripts/src/dd/ScrollManager.js +0 -218
  236. data/app/assets/javascripts/src/dd/StatusProxy.js +0 -179
  237. data/app/assets/javascripts/src/diag/layout/Context.js +0 -523
  238. data/app/assets/javascripts/src/diag/layout/ContextItem.js +0 -179
  239. data/app/assets/javascripts/src/direct/Event.js +0 -35
  240. data/app/assets/javascripts/src/direct/ExceptionEvent.js +0 -16
  241. data/app/assets/javascripts/src/direct/JsonProvider.js +0 -82
  242. data/app/assets/javascripts/src/direct/Manager.js +0 -263
  243. data/app/assets/javascripts/src/direct/PollingProvider.js +0 -156
  244. data/app/assets/javascripts/src/direct/Provider.js +0 -96
  245. data/app/assets/javascripts/src/direct/RemotingEvent.js +0 -24
  246. data/app/assets/javascripts/src/direct/RemotingMethod.js +0 -100
  247. data/app/assets/javascripts/src/direct/RemotingProvider.js +0 -510
  248. data/app/assets/javascripts/src/direct/Transaction.js +0 -41
  249. data/app/assets/javascripts/src/dom/Element.alignment.js +0 -378
  250. data/app/assets/javascripts/src/dom/Element.anim.js +0 -962
  251. data/app/assets/javascripts/src/dom/Element.dd.js +0 -40
  252. data/app/assets/javascripts/src/dom/Element.fx.js +0 -194
  253. data/app/assets/javascripts/src/dom/Element.js +0 -1407
  254. data/app/assets/javascripts/src/dom/Element.position.js +0 -501
  255. data/app/assets/javascripts/src/dom/Element.scroll.js +0 -214
  256. data/app/assets/javascripts/src/dom/Element.style.js +0 -792
  257. data/app/assets/javascripts/src/dom/Element.traversal.js +0 -8
  258. data/app/assets/javascripts/src/dom/Helper.js +0 -466
  259. data/app/assets/javascripts/src/dom/Query.js +0 -1067
  260. data/app/assets/javascripts/src/draw/Color.js +0 -303
  261. data/app/assets/javascripts/src/draw/Component.js +0 -245
  262. data/app/assets/javascripts/src/draw/CompositeSprite.js +0 -299
  263. data/app/assets/javascripts/src/draw/Draw.js +0 -1217
  264. data/app/assets/javascripts/src/draw/Matrix.js +0 -183
  265. data/app/assets/javascripts/src/draw/Sprite.js +0 -554
  266. data/app/assets/javascripts/src/draw/SpriteDD.js +0 -87
  267. data/app/assets/javascripts/src/draw/Surface.js +0 -1001
  268. data/app/assets/javascripts/src/draw/Text.js +0 -175
  269. data/app/assets/javascripts/src/draw/engine/ImageExporter.js +0 -106
  270. data/app/assets/javascripts/src/draw/engine/Svg.js +0 -734
  271. data/app/assets/javascripts/src/draw/engine/SvgExporter.js +0 -280
  272. data/app/assets/javascripts/src/draw/engine/Vml.js +0 -916
  273. data/app/assets/javascripts/src/flash/Component.js +0 -248
  274. data/app/assets/javascripts/src/form/Basic.js +0 -1018
  275. data/app/assets/javascripts/src/form/CheckboxGroup.js +0 -441
  276. data/app/assets/javascripts/src/form/CheckboxManager.js +0 -26
  277. data/app/assets/javascripts/src/form/FieldAncestor.js +0 -210
  278. data/app/assets/javascripts/src/form/FieldContainer.js +0 -290
  279. data/app/assets/javascripts/src/form/FieldSet.js +0 -506
  280. data/app/assets/javascripts/src/form/Label.js +0 -110
  281. data/app/assets/javascripts/src/form/Labelable.js +0 -764
  282. data/app/assets/javascripts/src/form/Panel.js +0 -335
  283. data/app/assets/javascripts/src/form/RadioGroup.js +0 -124
  284. data/app/assets/javascripts/src/form/RadioManager.js +0 -26
  285. data/app/assets/javascripts/src/form/action/Action.js +0 -307
  286. data/app/assets/javascripts/src/form/action/DirectLoad.js +0 -107
  287. data/app/assets/javascripts/src/form/action/DirectSubmit.js +0 -119
  288. data/app/assets/javascripts/src/form/action/Load.js +0 -120
  289. data/app/assets/javascripts/src/form/action/StandardSubmit.js +0 -34
  290. data/app/assets/javascripts/src/form/action/Submit.js +0 -257
  291. data/app/assets/javascripts/src/form/field/Base.js +0 -813
  292. data/app/assets/javascripts/src/form/field/Checkbox.js +0 -505
  293. data/app/assets/javascripts/src/form/field/ComboBox.js +0 -1427
  294. data/app/assets/javascripts/src/form/field/Date.js +0 -578
  295. data/app/assets/javascripts/src/form/field/Display.js +0 -155
  296. data/app/assets/javascripts/src/form/field/Field.js +0 -430
  297. data/app/assets/javascripts/src/form/field/File.js +0 -265
  298. data/app/assets/javascripts/src/form/field/Hidden.js +0 -75
  299. data/app/assets/javascripts/src/form/field/HtmlEditor.js +0 -1439
  300. data/app/assets/javascripts/src/form/field/Number.js +0 -380
  301. data/app/assets/javascripts/src/form/field/Picker.js +0 -321
  302. data/app/assets/javascripts/src/form/field/Radio.js +0 -279
  303. data/app/assets/javascripts/src/form/field/Spinner.js +0 -321
  304. data/app/assets/javascripts/src/form/field/Text.js +0 -727
  305. data/app/assets/javascripts/src/form/field/TextArea.js +0 -228
  306. data/app/assets/javascripts/src/form/field/Time.js +0 -459
  307. data/app/assets/javascripts/src/form/field/Trigger.js +0 -469
  308. data/app/assets/javascripts/src/form/field/VTypes.js +0 -172
  309. data/app/assets/javascripts/src/fx/Anim.js +0 -472
  310. data/app/assets/javascripts/src/fx/Animator.js +0 -410
  311. data/app/assets/javascripts/src/fx/CubicBezier.js +0 -77
  312. data/app/assets/javascripts/src/fx/Easing.js +0 -136
  313. data/app/assets/javascripts/src/fx/Manager.js +0 -353
  314. data/app/assets/javascripts/src/fx/PropertyHandler.js +0 -381
  315. data/app/assets/javascripts/src/fx/Queue.js +0 -123
  316. data/app/assets/javascripts/src/fx/target/Component.js +0 -118
  317. data/app/assets/javascripts/src/fx/target/CompositeElement.js +0 -46
  318. data/app/assets/javascripts/src/fx/target/CompositeElementCSS.js +0 -22
  319. data/app/assets/javascripts/src/fx/target/CompositeSprite.js +0 -34
  320. data/app/assets/javascripts/src/fx/target/Element.js +0 -83
  321. data/app/assets/javascripts/src/fx/target/ElementCSS.js +0 -77
  322. data/app/assets/javascripts/src/fx/target/Sprite.js +0 -128
  323. data/app/assets/javascripts/src/fx/target/Target.js +0 -36
  324. data/app/assets/javascripts/src/grid/CellEditor.js +0 -172
  325. data/app/assets/javascripts/src/grid/ColumnComponentLayout.js +0 -34
  326. data/app/assets/javascripts/src/grid/ColumnLayout.js +0 -201
  327. data/app/assets/javascripts/src/grid/Lockable.js +0 -863
  328. data/app/assets/javascripts/src/grid/LockingView.js +0 -169
  329. data/app/assets/javascripts/src/grid/PagingScroller.js +0 -539
  330. data/app/assets/javascripts/src/grid/Panel.js +0 -393
  331. data/app/assets/javascripts/src/grid/RowEditor.js +0 -731
  332. data/app/assets/javascripts/src/grid/RowNumberer.js +0 -76
  333. data/app/assets/javascripts/src/grid/Scroller.js +0 -5
  334. data/app/assets/javascripts/src/grid/View.js +0 -44
  335. data/app/assets/javascripts/src/grid/ViewDropZone.js +0 -41
  336. data/app/assets/javascripts/src/grid/column/Action.js +0 -318
  337. data/app/assets/javascripts/src/grid/column/Boolean.js +0 -82
  338. data/app/assets/javascripts/src/grid/column/Column.js +0 -835
  339. data/app/assets/javascripts/src/grid/column/Date.js +0 -63
  340. data/app/assets/javascripts/src/grid/column/Number.js +0 -52
  341. data/app/assets/javascripts/src/grid/column/Template.js +0 -58
  342. data/app/assets/javascripts/src/grid/feature/AbstractSummary.js +0 -154
  343. data/app/assets/javascripts/src/grid/feature/Chunking.js +0 -77
  344. data/app/assets/javascripts/src/grid/feature/Feature.js +0 -158
  345. data/app/assets/javascripts/src/grid/feature/Grouping.js +0 -822
  346. data/app/assets/javascripts/src/grid/feature/GroupingSummary.js +0 -243
  347. data/app/assets/javascripts/src/grid/feature/RowBody.js +0 -116
  348. data/app/assets/javascripts/src/grid/feature/RowWrap.js +0 -120
  349. data/app/assets/javascripts/src/grid/feature/Summary.js +0 -167
  350. data/app/assets/javascripts/src/grid/header/Container.js +0 -965
  351. data/app/assets/javascripts/src/grid/header/DragZone.js +0 -69
  352. data/app/assets/javascripts/src/grid/header/DropZone.js +0 -265
  353. data/app/assets/javascripts/src/grid/plugin/CellEditing.js +0 -453
  354. data/app/assets/javascripts/src/grid/plugin/DragDrop.js +0 -254
  355. data/app/assets/javascripts/src/grid/plugin/Editing.js +0 -561
  356. data/app/assets/javascripts/src/grid/plugin/HeaderReorderer.js +0 -49
  357. data/app/assets/javascripts/src/grid/plugin/HeaderResizer.js +0 -292
  358. data/app/assets/javascripts/src/grid/plugin/RowEditing.js +0 -339
  359. data/app/assets/javascripts/src/grid/property/Grid.js +0 -351
  360. data/app/assets/javascripts/src/grid/property/HeaderContainer.js +0 -109
  361. data/app/assets/javascripts/src/grid/property/Property.js +0 -36
  362. data/app/assets/javascripts/src/grid/property/Store.js +0 -141
  363. data/app/assets/javascripts/src/layout/ClassList.js +0 -90
  364. data/app/assets/javascripts/src/layout/Context.js +0 -1232
  365. data/app/assets/javascripts/src/layout/ContextItem.js +0 -1470
  366. data/app/assets/javascripts/src/layout/Layout.js +0 -761
  367. data/app/assets/javascripts/src/layout/component/Auto.js +0 -220
  368. data/app/assets/javascripts/src/layout/component/Body.js +0 -80
  369. data/app/assets/javascripts/src/layout/component/BoundList.js +0 -95
  370. data/app/assets/javascripts/src/layout/component/Button.js +0 -261
  371. data/app/assets/javascripts/src/layout/component/Component.js +0 -427
  372. data/app/assets/javascripts/src/layout/component/Dock.js +0 -1132
  373. data/app/assets/javascripts/src/layout/component/Draw.js +0 -79
  374. data/app/assets/javascripts/src/layout/component/FieldSet.js +0 -62
  375. data/app/assets/javascripts/src/layout/component/ProgressBar.js +0 -54
  376. data/app/assets/javascripts/src/layout/component/Tab.js +0 -23
  377. data/app/assets/javascripts/src/layout/component/field/ComboBox.js +0 -52
  378. data/app/assets/javascripts/src/layout/component/field/Field.js +0 -372
  379. data/app/assets/javascripts/src/layout/component/field/FieldContainer.js +0 -48
  380. data/app/assets/javascripts/src/layout/component/field/HtmlEditor.js +0 -54
  381. data/app/assets/javascripts/src/layout/component/field/Slider.js +0 -58
  382. data/app/assets/javascripts/src/layout/component/field/Text.js +0 -75
  383. data/app/assets/javascripts/src/layout/component/field/TextArea.js +0 -51
  384. data/app/assets/javascripts/src/layout/component/field/Trigger.js +0 -132
  385. data/app/assets/javascripts/src/layout/container/Absolute.js +0 -121
  386. data/app/assets/javascripts/src/layout/container/Accordion.js +0 -308
  387. data/app/assets/javascripts/src/layout/container/Anchor.js +0 -403
  388. data/app/assets/javascripts/src/layout/container/Auto.js +0 -70
  389. data/app/assets/javascripts/src/layout/container/Border-old-js +0 -1079
  390. data/app/assets/javascripts/src/layout/container/Border.js +0 -816
  391. data/app/assets/javascripts/src/layout/container/Box.js +0 -929
  392. data/app/assets/javascripts/src/layout/container/Card.js +0 -361
  393. data/app/assets/javascripts/src/layout/container/CheckboxGroup.js +0 -376
  394. data/app/assets/javascripts/src/layout/container/Column.js +0 -234
  395. data/app/assets/javascripts/src/layout/container/Container.js +0 -961
  396. data/app/assets/javascripts/src/layout/container/Editor.js +0 -74
  397. data/app/assets/javascripts/src/layout/container/Fit.js +0 -287
  398. data/app/assets/javascripts/src/layout/container/Form.js +0 -157
  399. data/app/assets/javascripts/src/layout/container/HBox.js +0 -134
  400. data/app/assets/javascripts/src/layout/container/Table.js +0 -412
  401. data/app/assets/javascripts/src/layout/container/VBox.js +0 -139
  402. data/app/assets/javascripts/src/layout/container/boxOverflow/Menu.js +0 -365
  403. data/app/assets/javascripts/src/layout/container/boxOverflow/None.js +0 -83
  404. data/app/assets/javascripts/src/layout/container/boxOverflow/Scroller.js +0 -475
  405. data/app/assets/javascripts/src/menu/CheckItem.js +0 -169
  406. data/app/assets/javascripts/src/menu/ColorPicker.js +0 -110
  407. data/app/assets/javascripts/src/menu/DatePicker.js +0 -100
  408. data/app/assets/javascripts/src/menu/Item.js +0 -553
  409. data/app/assets/javascripts/src/menu/KeyNav.js +0 -134
  410. data/app/assets/javascripts/src/menu/Manager.js +0 -219
  411. data/app/assets/javascripts/src/menu/Menu.js +0 -579
  412. data/app/assets/javascripts/src/menu/Separator.js +0 -126
  413. data/app/assets/javascripts/src/panel/AbstractPanel.js +0 -323
  414. data/app/assets/javascripts/src/panel/DD.js +0 -99
  415. data/app/assets/javascripts/src/panel/Header.js +0 -518
  416. data/app/assets/javascripts/src/panel/Panel.js +0 -2150
  417. data/app/assets/javascripts/src/panel/Proxy.js +0 -131
  418. data/app/assets/javascripts/src/panel/Table.js +0 -1018
  419. data/app/assets/javascripts/src/panel/Tool.js +0 -304
  420. data/app/assets/javascripts/src/picker/Color.js +0 -219
  421. data/app/assets/javascripts/src/picker/Date.js +0 -1140
  422. data/app/assets/javascripts/src/picker/Month.js +0 -490
  423. data/app/assets/javascripts/src/picker/Time.js +0 -165
  424. data/app/assets/javascripts/src/resizer/BorderSplitter.js +0 -22
  425. data/app/assets/javascripts/src/resizer/BorderSplitterTracker.js +0 -210
  426. data/app/assets/javascripts/src/resizer/Handle.js +0 -29
  427. data/app/assets/javascripts/src/resizer/ResizeTracker.js +0 -346
  428. data/app/assets/javascripts/src/resizer/Resizer.js +0 -477
  429. data/app/assets/javascripts/src/resizer/Splitter.js +0 -242
  430. data/app/assets/javascripts/src/resizer/SplitterTracker.js +0 -230
  431. data/app/assets/javascripts/src/selection/CellModel.js +0 -395
  432. data/app/assets/javascripts/src/selection/CheckboxModel.js +0 -234
  433. data/app/assets/javascripts/src/selection/DataViewModel.js +0 -160
  434. data/app/assets/javascripts/src/selection/Model.js +0 -646
  435. data/app/assets/javascripts/src/selection/RowModel.js +0 -499
  436. data/app/assets/javascripts/src/selection/TreeModel.js +0 -78
  437. data/app/assets/javascripts/src/slider/Multi.js +0 -835
  438. data/app/assets/javascripts/src/slider/Single.js +0 -56
  439. data/app/assets/javascripts/src/slider/Thumb.js +0 -259
  440. data/app/assets/javascripts/src/slider/Tip.js +0 -130
  441. data/app/assets/javascripts/src/state/CookieProvider.js +0 -120
  442. data/app/assets/javascripts/src/state/LocalStorageProvider.js +0 -72
  443. data/app/assets/javascripts/src/state/Manager.js +0 -70
  444. data/app/assets/javascripts/src/state/Provider.js +0 -182
  445. data/app/assets/javascripts/src/state/Stateful.js +0 -364
  446. data/app/assets/javascripts/src/tab/Bar.js +0 -258
  447. data/app/assets/javascripts/src/tab/Panel.js +0 -654
  448. data/app/assets/javascripts/src/tab/Tab.js +0 -358
  449. data/app/assets/javascripts/src/tail.js +0 -10
  450. data/app/assets/javascripts/src/tip/QuickTip.js +0 -335
  451. data/app/assets/javascripts/src/tip/QuickTipManager.js +0 -239
  452. data/app/assets/javascripts/src/tip/Tip.js +0 -160
  453. data/app/assets/javascripts/src/tip/ToolTip.js +0 -691
  454. data/app/assets/javascripts/src/toolbar/Fill.js +0 -28
  455. data/app/assets/javascripts/src/toolbar/Item.js +0 -16
  456. data/app/assets/javascripts/src/toolbar/Paging.js +0 -600
  457. data/app/assets/javascripts/src/toolbar/Separator.js +0 -23
  458. data/app/assets/javascripts/src/toolbar/Spacer.js +0 -33
  459. data/app/assets/javascripts/src/toolbar/TextItem.js +0 -57
  460. data/app/assets/javascripts/src/toolbar/Toolbar-legacy.js +0 -123
  461. data/app/assets/javascripts/src/toolbar/Toolbar.js +0 -447
  462. data/app/assets/javascripts/src/tree/Column.js +0 -90
  463. data/app/assets/javascripts/src/tree/Panel.js +0 -505
  464. data/app/assets/javascripts/src/tree/View.js +0 -658
  465. data/app/assets/javascripts/src/tree/ViewDragZone.js +0 -49
  466. data/app/assets/javascripts/src/tree/ViewDropZone.js +0 -287
  467. data/app/assets/javascripts/src/tree/plugin/TreeViewDragDrop.js +0 -244
  468. data/app/assets/javascripts/src/util/AbstractMixedCollection.js +0 -772
  469. data/app/assets/javascripts/src/util/Animate.js +0 -426
  470. data/app/assets/javascripts/src/util/Bindable.js +0 -102
  471. data/app/assets/javascripts/src/util/CSS.js +0 -185
  472. data/app/assets/javascripts/src/util/ClickRepeater.js +0 -238
  473. data/app/assets/javascripts/src/util/ComponentDragger.js +0 -126
  474. data/app/assets/javascripts/src/util/Cookies.js +0 -91
  475. data/app/assets/javascripts/src/util/ElementContainer.js +0 -293
  476. data/app/assets/javascripts/src/util/Filter.js +0 -159
  477. data/app/assets/javascripts/src/util/Floating.js +0 -321
  478. data/app/assets/javascripts/src/util/Grouper.js +0 -26
  479. data/app/assets/javascripts/src/util/HashMap.js +0 -356
  480. data/app/assets/javascripts/src/util/History.js +0 -285
  481. data/app/assets/javascripts/src/util/Inflector.js +0 -297
  482. data/app/assets/javascripts/src/util/KeyMap.js +0 -427
  483. data/app/assets/javascripts/src/util/KeyNav.js +0 -239
  484. data/app/assets/javascripts/src/util/LruCache.js +0 -257
  485. data/app/assets/javascripts/src/util/Memento.js +0 -131
  486. data/app/assets/javascripts/src/util/MixedCollection.js +0 -239
  487. data/app/assets/javascripts/src/util/Observable.js +0 -1003
  488. data/app/assets/javascripts/src/util/Offset.js +0 -60
  489. data/app/assets/javascripts/src/util/Point.js +0 -93
  490. data/app/assets/javascripts/src/util/ProtoElement.js +0 -205
  491. data/app/assets/javascripts/src/util/Queue.js +0 -76
  492. data/app/assets/javascripts/src/util/Region.js +0 -388
  493. data/app/assets/javascripts/src/util/Renderable.js +0 -1079
  494. data/app/assets/javascripts/src/util/Sortable.js +0 -248
  495. data/app/assets/javascripts/src/util/Sorter.js +0 -179
  496. data/app/assets/javascripts/src/util/TextMetrics.js +0 -148
  497. data/app/assets/javascripts/src/view/AbstractView.js +0 -1103
  498. data/app/assets/javascripts/src/view/BoundList.js +0 -207
  499. data/app/assets/javascripts/src/view/BoundListKeyNav.js +0 -92
  500. data/app/assets/javascripts/src/view/DragZone.js +0 -106
  501. data/app/assets/javascripts/src/view/DropZone.js +0 -240
  502. data/app/assets/javascripts/src/view/Table.js +0 -1229
  503. data/app/assets/javascripts/src/view/TableChunker.js +0 -139
  504. data/app/assets/javascripts/src/view/View.js +0 -636
  505. data/app/assets/javascripts/src/window/MessageBox.js +0 -880
  506. data/app/assets/javascripts/src/window/Window-legacy.js +0 -56
  507. data/app/assets/javascripts/src/window/Window.js +0 -793
@@ -1,204 +0,0 @@
1
- /**
2
- * @private
3
- */
4
- Ext.define('Ext.chart.axis.Radial', {
5
-
6
- /* Begin Definitions */
7
-
8
- extend: 'Ext.chart.axis.Abstract',
9
-
10
- /* End Definitions */
11
-
12
- position: 'radial',
13
-
14
- alias: 'axis.radial',
15
-
16
- drawAxis: function(init) {
17
- var chart = this.chart,
18
- surface = chart.surface,
19
- bbox = chart.chartBBox,
20
- store = chart.store,
21
- l = store.getCount(),
22
- centerX = bbox.x + (bbox.width / 2),
23
- centerY = bbox.y + (bbox.height / 2),
24
- rho = Math.min(bbox.width, bbox.height) /2,
25
- sprites = [], sprite,
26
- steps = this.steps,
27
- i, j, pi2 = Math.PI * 2,
28
- cos = Math.cos, sin = Math.sin;
29
-
30
- if (this.sprites && !chart.resizing) {
31
- this.drawLabel();
32
- return;
33
- }
34
-
35
- if (!this.sprites) {
36
- //draw circles
37
- for (i = 1; i <= steps; i++) {
38
- sprite = surface.add({
39
- type: 'circle',
40
- x: centerX,
41
- y: centerY,
42
- radius: Math.max(rho * i / steps, 0),
43
- stroke: '#ccc'
44
- });
45
- sprite.setAttributes({
46
- hidden: false
47
- }, true);
48
- sprites.push(sprite);
49
- }
50
- //draw lines
51
- for (i = 0; i < l; i++) {
52
- sprite = surface.add({
53
- type: 'path',
54
- path: ['M', centerX, centerY, 'L', centerX + rho * cos(i / l * pi2), centerY + rho * sin(i / l * pi2), 'Z'],
55
- stroke: '#ccc'
56
- });
57
- sprite.setAttributes({
58
- hidden: false
59
- }, true);
60
- sprites.push(sprite);
61
- }
62
- } else {
63
- sprites = this.sprites;
64
- //draw circles
65
- for (i = 0; i < steps; i++) {
66
- sprites[i].setAttributes({
67
- x: centerX,
68
- y: centerY,
69
- radius: Math.max(rho * (i + 1) / steps, 0),
70
- stroke: '#ccc'
71
- }, true);
72
- }
73
- //draw lines
74
- for (j = 0; j < l; j++) {
75
- sprites[i + j].setAttributes({
76
- path: ['M', centerX, centerY, 'L', centerX + rho * cos(j / l * pi2), centerY + rho * sin(j / l * pi2), 'Z'],
77
- stroke: '#ccc'
78
- }, true);
79
- }
80
- }
81
- this.sprites = sprites;
82
-
83
- this.drawLabel();
84
- },
85
-
86
- drawLabel: function() {
87
- var chart = this.chart,
88
- seriesItems = chart.series.items,
89
- series,
90
- surface = chart.surface,
91
- bbox = chart.chartBBox,
92
- store = chart.store,
93
- data = store.data.items,
94
- ln, record,
95
- centerX = bbox.x + (bbox.width / 2),
96
- centerY = bbox.y + (bbox.height / 2),
97
- rho = Math.min(bbox.width, bbox.height) /2,
98
- max = Math.max, round = Math.round,
99
- labelArray = [], label,
100
- fields = [], nfields,
101
- categories = [], xField,
102
- aggregate = !this.maximum,
103
- maxValue = this.maximum || 0,
104
- steps = this.steps, i = 0, j, dx, dy,
105
- pi2 = Math.PI * 2,
106
- cos = Math.cos, sin = Math.sin,
107
- display = this.label.display,
108
- draw = display !== 'none',
109
- margin = 10;
110
-
111
- if (!draw) {
112
- return;
113
- }
114
-
115
- //get all rendered fields
116
- for (i = 0, ln = seriesItems.length; i < ln; i++) {
117
- series = seriesItems[i];
118
- fields.push(series.yField);
119
- xField = series.xField;
120
- }
121
-
122
- //get maxValue to interpolate
123
- for (j = 0, ln = data.length; j < ln; j++) {
124
- record = data[j];
125
- if (aggregate) {
126
- for (i = 0, nfields = fields.length; i < nfields; i++) {
127
- maxValue = max(+record.get(fields[i]), maxValue);
128
- }
129
- }
130
- categories.push(record.get(xField));
131
- }
132
- if (!this.labelArray) {
133
- if (display != 'categories') {
134
- //draw scale
135
- for (i = 1; i <= steps; i++) {
136
- label = surface.add({
137
- type: 'text',
138
- text: round(i / steps * maxValue),
139
- x: centerX,
140
- y: centerY - rho * i / steps,
141
- 'text-anchor': 'middle',
142
- 'stroke-width': 0.1,
143
- stroke: '#333'
144
- });
145
- label.setAttributes({
146
- hidden: false
147
- }, true);
148
- labelArray.push(label);
149
- }
150
- }
151
- if (display != 'scale') {
152
- //draw text
153
- for (j = 0, steps = categories.length; j < steps; j++) {
154
- dx = cos(j / steps * pi2) * (rho + margin);
155
- dy = sin(j / steps * pi2) * (rho + margin);
156
- label = surface.add({
157
- type: 'text',
158
- text: categories[j],
159
- x: centerX + dx,
160
- y: centerY + dy,
161
- 'text-anchor': dx * dx <= 0.001? 'middle' : (dx < 0? 'end' : 'start')
162
- });
163
- label.setAttributes({
164
- hidden: false
165
- }, true);
166
- labelArray.push(label);
167
- }
168
- }
169
- }
170
- else {
171
- labelArray = this.labelArray;
172
- if (display != 'categories') {
173
- //draw values
174
- for (i = 0; i < steps; i++) {
175
- labelArray[i].setAttributes({
176
- text: round((i + 1) / steps * maxValue),
177
- x: centerX,
178
- y: centerY - rho * (i + 1) / steps,
179
- 'text-anchor': 'middle',
180
- 'stroke-width': 0.1,
181
- stroke: '#333'
182
- }, true);
183
- }
184
- }
185
- if (display != 'scale') {
186
- //draw text
187
- for (j = 0, steps = categories.length; j < steps; j++) {
188
- dx = cos(j / steps * pi2) * (rho + margin);
189
- dy = sin(j / steps * pi2) * (rho + margin);
190
- if (labelArray[i + j]) {
191
- labelArray[i + j].setAttributes({
192
- type: 'text',
193
- text: categories[j],
194
- x: centerX + dx,
195
- y: centerY + dy,
196
- 'text-anchor': dx * dx <= 0.001? 'middle' : (dx < 0? 'end' : 'start')
197
- }, true);
198
- }
199
- }
200
- }
201
- }
202
- this.labelArray = labelArray;
203
- }
204
- });
@@ -1,135 +0,0 @@
1
- /**
2
- * @class Ext.chart.axis.Time
3
- * @extends Ext.chart.axis.Axis
4
- *
5
- * A type of axis whose units are measured in time values. Use this axis
6
- * for listing dates that you will want to group or dynamically change.
7
- * If you just want to display dates as categories then use the
8
- * Category class for axis instead.
9
- *
10
- * For example:
11
- *
12
- * axes: [{
13
- * type: 'Time',
14
- * position: 'bottom',
15
- * fields: 'date',
16
- * title: 'Day',
17
- * dateFormat: 'M d',
18
- * groupBy: 'year,month,day',
19
- * aggregateOp: 'sum',
20
- *
21
- * constrain: true,
22
- * fromDate: new Date('1/1/11'),
23
- * toDate: new Date('1/7/11')
24
- * }]
25
- *
26
- * In this example we're creating a time axis that has as title *Day*.
27
- * The field the axis is bound to is `date`.
28
- * The date format to use to display the text for the axis labels is `M d`
29
- * which is a three letter month abbreviation followed by the day number.
30
- * The time axis will show values for dates between `fromDate` and `toDate`.
31
- * Since `constrain` is set to true all other values for other dates not between
32
- * the fromDate and toDate will not be displayed.
33
- *
34
- */
35
- Ext.define('Ext.chart.axis.Time', {
36
-
37
- /* Begin Definitions */
38
-
39
- extend: 'Ext.chart.axis.Numeric',
40
-
41
- alternateClassName: 'Ext.chart.TimeAxis',
42
-
43
- alias: 'axis.time',
44
-
45
- uses: ['Ext.data.Store'],
46
-
47
- /* End Definitions */
48
-
49
- /**
50
- * @cfg {String/Boolean} dateFormat
51
- * Indicates the format the date will be rendered on.
52
- * For example: 'M d' will render the dates as 'Jan 30', etc.
53
- * For a list of possible format strings see {@link Ext.Date Date}
54
- */
55
- dateFormat: false,
56
-
57
- /**
58
- * @cfg {Date} fromDate The starting date for the time axis.
59
- */
60
- fromDate: false,
61
-
62
- /**
63
- * @cfg {Date} toDate The ending date for the time axis.
64
- */
65
- toDate: false,
66
-
67
- /**
68
- * @cfg {Array/Boolean} step
69
- * An array with two components: The first is the unit of the step (day, month, year, etc). The second one is the number of units for the step (1, 2, etc.).
70
- * Default's [Ext.Date.DAY, 1]. If this is specified, {@link #steps} config is omitted.
71
- */
72
- step: [Ext.Date.DAY, 1],
73
-
74
- /**
75
- * @cfg {Boolean} constrain
76
- * If true, the values of the chart will be rendered only if they belong between the fromDate and toDate.
77
- * If false, the time axis will adapt to the new values by adding/removing steps.
78
- * Default's false.
79
- */
80
- constrain: false,
81
-
82
- constructor: function (config) {
83
- var me = this, label, f, df;
84
- me.callParent([config]);
85
- label = me.label || {};
86
- df = this.dateFormat;
87
- if (df) {
88
- if (label.renderer) {
89
- f = label.renderer;
90
- label.renderer = function(v) {
91
- v = f(v);
92
- return Ext.Date.format(new Date(f(v)), df);
93
- };
94
- } else {
95
- label.renderer = function(v) {
96
- return Ext.Date.format(new Date(v >> 0), df);
97
- };
98
- }
99
- }
100
- },
101
-
102
- // Before rendering, set current default step count to be number of records.
103
- processView: function () {
104
- var me = this;
105
- if (me.fromDate) {
106
- me.minimum = +me.fromDate;
107
- }
108
- if (me.toDate) {
109
- me.maximum = +me.toDate;
110
- }
111
- if(me.constrain){
112
- me.doConstrain();
113
- }
114
- },
115
-
116
- // @private modifies the store and creates the labels for the axes.
117
- calcEnds: function() {
118
- var me = this, range, step = me.step;
119
- if (step) {
120
- range = me.getRange();
121
- range = Ext.draw.Draw.snapEndsByDateAndStep(new Date(range.min), new Date(range.max), Ext.isNumber(step) ? [Date.MILLI, step]: step);
122
- if (me.minimum) {
123
- range.from = me.minimum;
124
- }
125
- if (me.maximum) {
126
- range.to = me.maximum;
127
- }
128
- range.step = (range.to - range.from) / range.steps;
129
- return range;
130
- } else {
131
- return me.callParent(arguments);
132
- }
133
- }
134
- });
135
-
@@ -1,803 +0,0 @@
1
- /**
2
- * @class Ext.chart.series.Area
3
- * @extends Ext.chart.series.Cartesian
4
- *
5
- * Creates a Stacked Area Chart. The stacked area chart is useful when displaying multiple aggregated layers of information.
6
- * As with all other series, the Area Series must be appended in the *series* Chart array configuration. See the Chart
7
- * documentation for more information. A typical configuration object for the area series could be:
8
- *
9
- * @example
10
- * var store = Ext.create('Ext.data.JsonStore', {
11
- * fields: ['name', 'data1', 'data2', 'data3', 'data4', 'data5'],
12
- * data: [
13
- * { 'name': 'metric one', 'data1':10, 'data2':12, 'data3':14, 'data4':8, 'data5':13 },
14
- * { 'name': 'metric two', 'data1':7, 'data2':8, 'data3':16, 'data4':10, 'data5':3 },
15
- * { 'name': 'metric three', 'data1':5, 'data2':2, 'data3':14, 'data4':12, 'data5':7 },
16
- * { 'name': 'metric four', 'data1':2, 'data2':14, 'data3':6, 'data4':1, 'data5':23 },
17
- * { 'name': 'metric five', 'data1':27, 'data2':38, 'data3':36, 'data4':13, 'data5':33 }
18
- * ]
19
- * });
20
- *
21
- * Ext.create('Ext.chart.Chart', {
22
- * renderTo: Ext.getBody(),
23
- * width: 500,
24
- * height: 300,
25
- * store: store,
26
- * axes: [
27
- * {
28
- * type: 'Numeric',
29
- * grid: true,
30
- * position: 'left',
31
- * fields: ['data1', 'data2', 'data3', 'data4', 'data5'],
32
- * title: 'Sample Values',
33
- * grid: {
34
- * odd: {
35
- * opacity: 1,
36
- * fill: '#ddd',
37
- * stroke: '#bbb',
38
- * 'stroke-width': 1
39
- * }
40
- * },
41
- * minimum: 0,
42
- * adjustMinimumByMajorUnit: 0
43
- * },
44
- * {
45
- * type: 'Category',
46
- * position: 'bottom',
47
- * fields: ['name'],
48
- * title: 'Sample Metrics',
49
- * grid: true,
50
- * label: {
51
- * rotate: {
52
- * degrees: 315
53
- * }
54
- * }
55
- * }
56
- * ],
57
- * series: [{
58
- * type: 'area',
59
- * highlight: false,
60
- * axis: 'left',
61
- * xField: 'name',
62
- * yField: ['data1', 'data2', 'data3', 'data4', 'data5'],
63
- * style: {
64
- * opacity: 0.93
65
- * }
66
- * }]
67
- * });
68
- *
69
- * In this configuration we set `area` as the type for the series, set highlighting options to true for highlighting elements on hover,
70
- * take the left axis to measure the data in the area series, set as xField (x values) the name field of each element in the store,
71
- * and as yFields (aggregated layers) seven data fields from the same store. Then we override some theming styles by adding some opacity
72
- * to the style object.
73
- *
74
- * @xtype area
75
- */
76
- Ext.define('Ext.chart.series.Area', {
77
-
78
- /* Begin Definitions */
79
-
80
- extend: 'Ext.chart.series.Cartesian',
81
-
82
- alias: 'series.area',
83
-
84
- requires: ['Ext.chart.axis.Axis', 'Ext.draw.Color', 'Ext.fx.Anim'],
85
-
86
- /* End Definitions */
87
-
88
- type: 'area',
89
-
90
- // @private Area charts are alyways stacked
91
- stacked: true,
92
-
93
- /**
94
- * @cfg {Object} style
95
- * Append styling properties to this object for it to override theme properties.
96
- */
97
- style: {},
98
-
99
- constructor: function(config) {
100
- this.callParent(arguments);
101
- var me = this,
102
- surface = me.chart.surface,
103
- i, l;
104
- config.highlightCfg = Ext.Object.merge({}, {
105
- lineWidth: 3,
106
- stroke: '#55c',
107
- opacity: 0.8,
108
- color: '#f00'
109
- }, config.highlightCfg);
110
-
111
- Ext.apply(me, config, {
112
- __excludes: []
113
- });
114
- if (me.highlight) {
115
- me.highlightSprite = surface.add({
116
- type: 'path',
117
- path: ['M', 0, 0],
118
- zIndex: 1000,
119
- opacity: 0.3,
120
- lineWidth: 5,
121
- hidden: true,
122
- stroke: '#444'
123
- });
124
- }
125
- me.group = surface.getGroup(me.seriesId);
126
- },
127
-
128
- // @private Shrinks dataSets down to a smaller size
129
- shrink: function(xValues, yValues, size) {
130
- var len = xValues.length,
131
- ratio = Math.floor(len / size),
132
- i, j,
133
- xSum = 0,
134
- yCompLen = this.areas.length,
135
- ySum = [],
136
- xRes = [],
137
- yRes = [];
138
- //initialize array
139
- for (j = 0; j < yCompLen; ++j) {
140
- ySum[j] = 0;
141
- }
142
- for (i = 0; i < len; ++i) {
143
- xSum += +xValues[i];
144
- for (j = 0; j < yCompLen; ++j) {
145
- ySum[j] += +yValues[i][j];
146
- }
147
- if (i % ratio == 0) {
148
- //push averages
149
- xRes.push(xSum/ratio);
150
- for (j = 0; j < yCompLen; ++j) {
151
- ySum[j] /= ratio;
152
- }
153
- yRes.push(ySum);
154
- //reset sum accumulators
155
- xSum = 0;
156
- for (j = 0, ySum = []; j < yCompLen; ++j) {
157
- ySum[j] = 0;
158
- }
159
- }
160
- }
161
- return {
162
- x: xRes,
163
- y: yRes
164
- };
165
- },
166
-
167
- // @private Get chart and data boundaries
168
- getBounds: function() {
169
- var me = this,
170
- chart = me.chart,
171
- store = chart.getChartStore(),
172
- data = store.data.items,
173
- i, l, record,
174
- areas = [].concat(me.yField),
175
- areasLen = areas.length,
176
- xValues = [],
177
- yValues = [],
178
- infinity = Infinity,
179
- minX = infinity,
180
- minY = infinity,
181
- maxX = -infinity,
182
- maxY = -infinity,
183
- math = Math,
184
- mmin = math.min,
185
- mmax = math.max,
186
- boundAxis = me.getAxesForXAndYFields(),
187
- boundXAxis = boundAxis.xAxis,
188
- boundYAxis = boundAxis.yAxis,
189
- ends, allowDate,
190
- bbox, xScale, yScale, xValue, yValue, areaIndex, acumY, ln, sumValues, clipBox, areaElem, axis, out;
191
-
192
- me.setBBox();
193
- bbox = me.bbox;
194
-
195
- if (axis = chart.axes.get(boundXAxis)) {
196
- if (axis.type === 'Time') {
197
- allowDate = true;
198
- }
199
- ends = axis.applyData();
200
- minX = ends.from;
201
- maxX = ends.to;
202
- }
203
-
204
- if (axis = chart.axes.get(boundYAxis)) {
205
- ends = axis.applyData();
206
- minY = ends.from;
207
- maxY = ends.to;
208
- }
209
-
210
- // If a field was specified without a corresponding axis, create one to get bounds
211
- if (me.xField && !Ext.isNumber(minX)) {
212
- axis = me.getMinMaxXValues();
213
- allowDate = true;
214
- minX = axis[0];
215
- maxX = axis[1];
216
- }
217
-
218
- if (me.yField && !Ext.isNumber(minY)) {
219
- axis = me.getMinMaxYValues();
220
- minY = axis[0];
221
- maxY = axis[1];
222
- }
223
-
224
- if (!Ext.isNumber(minY)) {
225
- minY = 0;
226
- }
227
- if (!Ext.isNumber(maxY)) {
228
- maxY = 0;
229
- }
230
-
231
- for (i = 0, l = data.length; i < l; i++) {
232
- record = data[i];
233
- xValue = record.get(me.xField);
234
- yValue = [];
235
- if (typeof xValue != 'number') {
236
- if (allowDate) {
237
- xValue = +xValue;
238
- } else {
239
- xValue = i;
240
- }
241
- }
242
- xValues.push(xValue);
243
- acumY = 0;
244
- for (areaIndex = 0; areaIndex < areasLen; areaIndex++) {
245
- // Excluded series
246
- if (me.__excludes[areaIndex]) {
247
- continue;
248
- }
249
- areaElem = record.get(areas[areaIndex]);
250
- if (typeof areaElem == 'number') {
251
- minY = mmin(minY, areaElem);
252
- yValue.push(areaElem);
253
- acumY += areaElem;
254
- }
255
- }
256
- minX = mmin(minX, xValue);
257
- maxX = mmax(maxX, xValue);
258
- maxY = mmax(maxY, acumY);
259
- yValues.push(yValue);
260
- }
261
-
262
- xScale = bbox.width / ((maxX - minX) || 1);
263
- yScale = bbox.height / ((maxY - minY) || 1);
264
-
265
- ln = xValues.length;
266
- if ((ln > bbox.width) && me.areas) {
267
- sumValues = me.shrink(xValues, yValues, bbox.width);
268
- xValues = sumValues.x;
269
- yValues = sumValues.y;
270
- }
271
-
272
- return {
273
- bbox: bbox,
274
- minX: minX,
275
- minY: minY,
276
- xValues: xValues,
277
- yValues: yValues,
278
- xScale: xScale,
279
- yScale: yScale,
280
- areasLen: areasLen
281
- };
282
- },
283
-
284
- // @private Build an array of paths for the chart
285
- getPaths: function() {
286
- var me = this,
287
- chart = me.chart,
288
- store = chart.getChartStore(),
289
- first = true,
290
- bounds = me.getBounds(),
291
- bbox = bounds.bbox,
292
- items = me.items = [],
293
- componentPaths = [],
294
- componentPath,
295
- count = 0,
296
- paths = [],
297
- i, ln, x, y, xValue, yValue, acumY, areaIndex, prevAreaIndex, areaElem, path;
298
-
299
- ln = bounds.xValues.length;
300
- // Start the path
301
- for (i = 0; i < ln; i++) {
302
- xValue = bounds.xValues[i];
303
- yValue = bounds.yValues[i];
304
- x = bbox.x + (xValue - bounds.minX) * bounds.xScale;
305
- acumY = 0;
306
- count = 0;
307
- for (areaIndex = 0; areaIndex < bounds.areasLen; areaIndex++) {
308
- // Excluded series
309
- if (me.__excludes[areaIndex]) {
310
- continue;
311
- }
312
- if (!componentPaths[areaIndex]) {
313
- componentPaths[areaIndex] = [];
314
- }
315
- areaElem = yValue[count];
316
- acumY += areaElem;
317
- y = bbox.y + bbox.height - (acumY - bounds.minY) * bounds.yScale;
318
- if (!paths[areaIndex]) {
319
- paths[areaIndex] = ['M', x, y];
320
- componentPaths[areaIndex].push(['L', x, y]);
321
- } else {
322
- paths[areaIndex].push('L', x, y);
323
- componentPaths[areaIndex].push(['L', x, y]);
324
- }
325
- if (!items[areaIndex]) {
326
- items[areaIndex] = {
327
- pointsUp: [],
328
- pointsDown: [],
329
- series: me
330
- };
331
- }
332
- items[areaIndex].pointsUp.push([x, y]);
333
- count++;
334
- }
335
- }
336
-
337
- // Close the paths
338
- for (areaIndex = 0; areaIndex < bounds.areasLen; areaIndex++) {
339
- // Excluded series
340
- if (me.__excludes[areaIndex]) {
341
- continue;
342
- }
343
- path = paths[areaIndex];
344
- // Close bottom path to the axis
345
- if (areaIndex == 0 || first) {
346
- first = false;
347
- path.push('L', x, bbox.y + bbox.height,
348
- 'L', bbox.x, bbox.y + bbox.height,
349
- 'Z');
350
- }
351
- // Close other paths to the one before them
352
- else {
353
- componentPath = componentPaths[prevAreaIndex];
354
- componentPath.reverse();
355
- path.push('L', x, componentPath[0][2]);
356
- for (i = 0; i < ln; i++) {
357
- path.push(componentPath[i][0],
358
- componentPath[i][1],
359
- componentPath[i][2]);
360
- items[areaIndex].pointsDown[ln -i -1] = [componentPath[i][1], componentPath[i][2]];
361
- }
362
- path.push('L', bbox.x, path[2], 'Z');
363
- }
364
- prevAreaIndex = areaIndex;
365
- }
366
- return {
367
- paths: paths,
368
- areasLen: bounds.areasLen
369
- };
370
- },
371
-
372
- /**
373
- * Draws the series for the current chart.
374
- */
375
- drawSeries: function() {
376
- var me = this,
377
- chart = me.chart,
378
- store = chart.getChartStore(),
379
- surface = chart.surface,
380
- animate = chart.animate,
381
- group = me.group,
382
- endLineStyle = Ext.apply(me.seriesStyle, me.style),
383
- colorArrayStyle = me.colorArrayStyle,
384
- colorArrayLength = colorArrayStyle && colorArrayStyle.length || 0,
385
- areaIndex, areaElem, paths, path, rendererAttributes;
386
-
387
- me.unHighlightItem();
388
- me.cleanHighlights();
389
-
390
- if (!store || !store.getCount() || me.seriesIsHidden) {
391
- me.hide();
392
- me.items = [];
393
- return;
394
- }
395
-
396
- paths = me.getPaths();
397
-
398
- if (!me.areas) {
399
- me.areas = [];
400
- }
401
-
402
- for (areaIndex = 0; areaIndex < paths.areasLen; areaIndex++) {
403
- // Excluded series
404
- if (me.__excludes[areaIndex]) {
405
- continue;
406
- }
407
- if (!me.areas[areaIndex]) {
408
- me.items[areaIndex].sprite = me.areas[areaIndex] = surface.add(Ext.apply({}, {
409
- type: 'path',
410
- group: group,
411
- // 'clip-rect': me.clipBox,
412
- path: paths.paths[areaIndex],
413
- stroke: endLineStyle.stroke || colorArrayStyle[areaIndex % colorArrayLength],
414
- fill: colorArrayStyle[areaIndex % colorArrayLength]
415
- }, endLineStyle || {}));
416
- }
417
- areaElem = me.areas[areaIndex];
418
- path = paths.paths[areaIndex];
419
- if (animate) {
420
- //Add renderer to line. There is not a unique record associated with this.
421
- rendererAttributes = me.renderer(areaElem, false, {
422
- path: path,
423
- // 'clip-rect': me.clipBox,
424
- fill: colorArrayStyle[areaIndex % colorArrayLength],
425
- stroke: endLineStyle.stroke || colorArrayStyle[areaIndex % colorArrayLength]
426
- }, areaIndex, store);
427
- //fill should not be used here but when drawing the special fill path object
428
- me.animation = me.onAnimate(areaElem, {
429
- to: rendererAttributes
430
- });
431
- } else {
432
- rendererAttributes = me.renderer(areaElem, false, {
433
- path: path,
434
- // 'clip-rect': me.clipBox,
435
- hidden: false,
436
- fill: colorArrayStyle[areaIndex % colorArrayLength],
437
- stroke: endLineStyle.stroke || colorArrayStyle[areaIndex % colorArrayLength]
438
- }, areaIndex, store);
439
- me.areas[areaIndex].setAttributes(rendererAttributes, true);
440
- }
441
- }
442
- me.renderLabels();
443
- me.renderCallouts();
444
- },
445
-
446
- // @private
447
- onAnimate: function(sprite, attr) {
448
- sprite.show();
449
- return this.callParent(arguments);
450
- },
451
-
452
- // @private
453
- onCreateLabel: function(storeItem, item, i, display) {
454
- var me = this,
455
- group = me.labelsGroup,
456
- config = me.label,
457
- bbox = me.bbox,
458
- endLabelStyle = Ext.apply(config, me.seriesLabelStyle);
459
-
460
- return me.chart.surface.add(Ext.apply({
461
- 'type': 'text',
462
- 'text-anchor': 'middle',
463
- 'group': group,
464
- 'x': item.point[0],
465
- 'y': bbox.y + bbox.height / 2
466
- }, endLabelStyle || {}));
467
- },
468
-
469
- // @private
470
- onPlaceLabel: function(label, storeItem, item, i, display, animate, index) {
471
- var me = this,
472
- chart = me.chart,
473
- resizing = chart.resizing,
474
- config = me.label,
475
- format = config.renderer,
476
- field = config.field,
477
- bbox = me.bbox,
478
- x = item.point[0],
479
- y = item.point[1],
480
- bb, width, height;
481
-
482
- label.setAttributes({
483
- text: format(storeItem.get(field[index])),
484
- hidden: true
485
- }, true);
486
-
487
- bb = label.getBBox();
488
- width = bb.width / 2;
489
- height = bb.height / 2;
490
-
491
- x = x - width < bbox.x? bbox.x + width : x;
492
- x = (x + width > bbox.x + bbox.width) ? (x - (x + width - bbox.x - bbox.width)) : x;
493
- y = y - height < bbox.y? bbox.y + height : y;
494
- y = (y + height > bbox.y + bbox.height) ? (y - (y + height - bbox.y - bbox.height)) : y;
495
-
496
- if (me.chart.animate && !me.chart.resizing) {
497
- label.show(true);
498
- me.onAnimate(label, {
499
- to: {
500
- x: x,
501
- y: y
502
- }
503
- });
504
- } else {
505
- label.setAttributes({
506
- x: x,
507
- y: y
508
- }, true);
509
- if (resizing) {
510
- me.animation.on('afteranimate', function() {
511
- label.show(true);
512
- });
513
- } else {
514
- label.show(true);
515
- }
516
- }
517
- },
518
-
519
- // @private
520
- onPlaceCallout : function(callout, storeItem, item, i, display, animate, index) {
521
- var me = this,
522
- chart = me.chart,
523
- surface = chart.surface,
524
- resizing = chart.resizing,
525
- config = me.callouts,
526
- items = me.items,
527
- prev = (i == 0) ? false : items[i -1].point,
528
- next = (i == items.length -1) ? false : items[i +1].point,
529
- cur = item.point,
530
- dir, norm, normal, a, aprev, anext,
531
- bbox = callout.label.getBBox(),
532
- offsetFromViz = 30,
533
- offsetToSide = 10,
534
- offsetBox = 3,
535
- boxx, boxy, boxw, boxh,
536
- p, clipRect = me.clipRect,
537
- x, y;
538
-
539
- //get the right two points
540
- if (!prev) {
541
- prev = cur;
542
- }
543
- if (!next) {
544
- next = cur;
545
- }
546
- a = (next[1] - prev[1]) / (next[0] - prev[0]);
547
- aprev = (cur[1] - prev[1]) / (cur[0] - prev[0]);
548
- anext = (next[1] - cur[1]) / (next[0] - cur[0]);
549
-
550
- norm = Math.sqrt(1 + a * a);
551
- dir = [1 / norm, a / norm];
552
- normal = [-dir[1], dir[0]];
553
-
554
- //keep the label always on the outer part of the "elbow"
555
- if (aprev > 0 && anext < 0 && normal[1] < 0 || aprev < 0 && anext > 0 && normal[1] > 0) {
556
- normal[0] *= -1;
557
- normal[1] *= -1;
558
- } else if (Math.abs(aprev) < Math.abs(anext) && normal[0] < 0 || Math.abs(aprev) > Math.abs(anext) && normal[0] > 0) {
559
- normal[0] *= -1;
560
- normal[1] *= -1;
561
- }
562
-
563
- //position
564
- x = cur[0] + normal[0] * offsetFromViz;
565
- y = cur[1] + normal[1] * offsetFromViz;
566
-
567
- //box position and dimensions
568
- boxx = x + (normal[0] > 0? 0 : -(bbox.width + 2 * offsetBox));
569
- boxy = y - bbox.height /2 - offsetBox;
570
- boxw = bbox.width + 2 * offsetBox;
571
- boxh = bbox.height + 2 * offsetBox;
572
-
573
- //now check if we're out of bounds and invert the normal vector correspondingly
574
- //this may add new overlaps between labels (but labels won't be out of bounds).
575
- if (boxx < clipRect[0] || (boxx + boxw) > (clipRect[0] + clipRect[2])) {
576
- normal[0] *= -1;
577
- }
578
- if (boxy < clipRect[1] || (boxy + boxh) > (clipRect[1] + clipRect[3])) {
579
- normal[1] *= -1;
580
- }
581
-
582
- //update positions
583
- x = cur[0] + normal[0] * offsetFromViz;
584
- y = cur[1] + normal[1] * offsetFromViz;
585
-
586
- //update box position and dimensions
587
- boxx = x + (normal[0] > 0? 0 : -(bbox.width + 2 * offsetBox));
588
- boxy = y - bbox.height /2 - offsetBox;
589
- boxw = bbox.width + 2 * offsetBox;
590
- boxh = bbox.height + 2 * offsetBox;
591
-
592
- //set the line from the middle of the pie to the box.
593
- callout.lines.setAttributes({
594
- path: ["M", cur[0], cur[1], "L", x, y, "Z"]
595
- }, true);
596
- //set box position
597
- callout.box.setAttributes({
598
- x: boxx,
599
- y: boxy,
600
- width: boxw,
601
- height: boxh
602
- }, true);
603
- //set text position
604
- callout.label.setAttributes({
605
- x: x + (normal[0] > 0? offsetBox : -(bbox.width + offsetBox)),
606
- y: y
607
- }, true);
608
- for (p in callout) {
609
- callout[p].show(true);
610
- }
611
- },
612
-
613
- isItemInPoint: function(x, y, item, i) {
614
- var me = this,
615
- pointsUp = item.pointsUp,
616
- pointsDown = item.pointsDown,
617
- abs = Math.abs,
618
- distChanged = false,
619
- last = false,
620
- dist = Infinity, p, pln, point;
621
-
622
- for (p = 0, pln = pointsUp.length; p < pln; p++) {
623
- point = [pointsUp[p][0], pointsUp[p][1]];
624
-
625
- distChanged = false;
626
- last = p == pln -1;
627
-
628
- if (dist > abs(x - point[0])) {
629
- dist = abs(x - point[0]);
630
- distChanged = true;
631
- if (last) {
632
- ++p;
633
- }
634
- }
635
-
636
- if (!distChanged || (distChanged && last)) {
637
- point = pointsUp[p -1];
638
- if (y >= point[1] && (!pointsDown.length || y <= (pointsDown[p -1][1]))) {
639
- item.storeIndex = p -1;
640
- item.storeField = me.yField[i];
641
- item.storeItem = me.chart.store.getAt(p -1);
642
- item._points = pointsDown.length? [point, pointsDown[p -1]] : [point];
643
- return true;
644
- } else {
645
- break;
646
- }
647
- }
648
- }
649
- return false;
650
- },
651
-
652
- /**
653
- * Highlight this entire series.
654
- * @param {Object} item Info about the item; same format as returned by #getItemForPoint.
655
- */
656
- highlightSeries: function() {
657
- var area, to, fillColor;
658
- if (this._index !== undefined) {
659
- area = this.areas[this._index];
660
- if (area.__highlightAnim) {
661
- area.__highlightAnim.paused = true;
662
- }
663
- area.__highlighted = true;
664
- area.__prevOpacity = area.__prevOpacity || area.attr.opacity || 1;
665
- area.__prevFill = area.__prevFill || area.attr.fill;
666
- area.__prevLineWidth = area.__prevLineWidth || area.attr.lineWidth;
667
- fillColor = Ext.draw.Color.fromString(area.__prevFill);
668
- to = {
669
- lineWidth: (area.__prevLineWidth || 0) + 2
670
- };
671
- if (fillColor) {
672
- to.fill = fillColor.getLighter(0.2).toString();
673
- }
674
- else {
675
- to.opacity = Math.max(area.__prevOpacity - 0.3, 0);
676
- }
677
- if (this.chart.animate) {
678
- area.__highlightAnim = new Ext.fx.Anim(Ext.apply({
679
- target: area,
680
- to: to
681
- }, this.chart.animate));
682
- }
683
- else {
684
- area.setAttributes(to, true);
685
- }
686
- }
687
- },
688
-
689
- /**
690
- * UnHighlight this entire series.
691
- * @param {Object} item Info about the item; same format as returned by #getItemForPoint.
692
- */
693
- unHighlightSeries: function() {
694
- var area;
695
- if (this._index !== undefined) {
696
- area = this.areas[this._index];
697
- if (area.__highlightAnim) {
698
- area.__highlightAnim.paused = true;
699
- }
700
- if (area.__highlighted) {
701
- area.__highlighted = false;
702
- area.__highlightAnim = new Ext.fx.Anim({
703
- target: area,
704
- to: {
705
- fill: area.__prevFill,
706
- opacity: area.__prevOpacity,
707
- lineWidth: area.__prevLineWidth
708
- }
709
- });
710
- }
711
- }
712
- },
713
-
714
- /**
715
- * Highlight the specified item. If no item is provided the whole series will be highlighted.
716
- * @param item {Object} Info about the item; same format as returned by #getItemForPoint
717
- */
718
- highlightItem: function(item) {
719
- var me = this,
720
- points, path;
721
- if (!item) {
722
- this.highlightSeries();
723
- return;
724
- }
725
- points = item._points;
726
- path = points.length == 2? ['M', points[0][0], points[0][1], 'L', points[1][0], points[1][1]]
727
- : ['M', points[0][0], points[0][1], 'L', points[0][0], me.bbox.y + me.bbox.height];
728
- me.highlightSprite.setAttributes({
729
- path: path,
730
- hidden: false
731
- }, true);
732
- },
733
-
734
- /**
735
- * Un-highlights the specified item. If no item is provided it will un-highlight the entire series.
736
- * @param {Object} item Info about the item; same format as returned by #getItemForPoint
737
- */
738
- unHighlightItem: function(item) {
739
- if (!item) {
740
- this.unHighlightSeries();
741
- }
742
-
743
- if (this.highlightSprite) {
744
- this.highlightSprite.hide(true);
745
- }
746
- },
747
-
748
- // @private
749
- hideAll: function(index) {
750
- var me = this;
751
- index = (isNaN(me._index) ? index : me._index) || 0;
752
- me.__excludes[index] = true;
753
- me.areas[index].hide(true);
754
- me.redraw();
755
- },
756
-
757
- // @private
758
- showAll: function(index) {
759
- var me = this;
760
- index = (isNaN(me._index) ? index : me._index) || 0;
761
- me.__excludes[index] = false;
762
- me.areas[index].show(true);
763
- me.redraw();
764
- },
765
-
766
- redraw: function() {
767
- //store previous configuration for the legend
768
- //and set it to false so we don't
769
- //re-build label elements if not necessary.
770
- var me = this,
771
- prevLegendConfig;
772
- prevLegendConfig = me.chart.legend.rebuild;
773
- me.chart.legend.rebuild = false;
774
- me.chart.redraw();
775
- me.chart.legend.rebuild = prevLegendConfig;
776
- },
777
-
778
- hide: function() {
779
- if (this.areas) {
780
- var me = this,
781
- areas = me.areas,
782
- i, j, l, ln, shadows;
783
-
784
- if (areas && areas.length) {
785
- for (i = 0, ln = areas.length; i < ln; ++i) {
786
- if (areas[i]) {
787
- areas[i].hide(true);
788
- }
789
- }
790
- me.hideLabels();
791
- }
792
- }
793
- },
794
-
795
- /**
796
- * Returns the color of the series (to be displayed as color for the series legend item).
797
- * @param {Object} item Info about the item; same format as returned by #getItemForPoint
798
- */
799
- getLegendColor: function(index) {
800
- var me = this;
801
- return me.colorArrayStyle[index % me.colorArrayStyle.length];
802
- }
803
- });