adminlte 1.3.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (489) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +53 -0
  4. data/lib/adminlte.rb +6 -0
  5. data/lib/adminlte/version.rb +3 -0
  6. data/vendor/assets/fonts/FontAwesome.otf +0 -0
  7. data/vendor/assets/fonts/fontawesome-webfont.eot +0 -0
  8. data/vendor/assets/fonts/fontawesome-webfont.svg +414 -0
  9. data/vendor/assets/fonts/fontawesome-webfont.ttf +0 -0
  10. data/vendor/assets/fonts/fontawesome-webfont.woff +0 -0
  11. data/vendor/assets/fonts/glyphicons-halflings-regular.eot +0 -0
  12. data/vendor/assets/fonts/glyphicons-halflings-regular.svg +229 -0
  13. data/vendor/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
  14. data/vendor/assets/fonts/glyphicons-halflings-regular.woff +0 -0
  15. data/vendor/assets/fonts/ionicons.eot +0 -0
  16. data/vendor/assets/fonts/ionicons.svg +1623 -0
  17. data/vendor/assets/fonts/ionicons.ttf +0 -0
  18. data/vendor/assets/fonts/ionicons.woff +0 -0
  19. data/vendor/assets/img/ajax-loader.gif +0 -0
  20. data/vendor/assets/img/ajax-loader1.gif +0 -0
  21. data/vendor/assets/img/avatar.png +0 -0
  22. data/vendor/assets/img/avatar04.png +0 -0
  23. data/vendor/assets/img/avatar2.png +0 -0
  24. data/vendor/assets/img/avatar3.png +0 -0
  25. data/vendor/assets/img/avatar5.png +0 -0
  26. data/vendor/assets/img/blur-background04.jpg +0 -0
  27. data/vendor/assets/img/blur-background08.jpg +0 -0
  28. data/vendor/assets/img/blur-background09.jpg +0 -0
  29. data/vendor/assets/img/bootstrap-colorpicker/alpha-horizontal.png +0 -0
  30. data/vendor/assets/img/bootstrap-colorpicker/alpha.png +0 -0
  31. data/vendor/assets/img/bootstrap-colorpicker/hue-horizontal.png +0 -0
  32. data/vendor/assets/img/bootstrap-colorpicker/hue.png +0 -0
  33. data/vendor/assets/img/bootstrap-colorpicker/saturation.png +0 -0
  34. data/vendor/assets/img/credit/american-express.png +0 -0
  35. data/vendor/assets/img/credit/cirrus.png +0 -0
  36. data/vendor/assets/img/credit/mastercard.png +0 -0
  37. data/vendor/assets/img/credit/mestro.png +0 -0
  38. data/vendor/assets/img/credit/paypal.png +0 -0
  39. data/vendor/assets/img/credit/paypal2.png +0 -0
  40. data/vendor/assets/img/credit/visa.png +0 -0
  41. data/vendor/assets/img/icons.png +0 -0
  42. data/vendor/assets/img/sprite-skin-flat.png +0 -0
  43. data/vendor/assets/img/sprite-skin-nice.png +0 -0
  44. data/vendor/assets/img/user-bg.png +0 -0
  45. data/vendor/assets/img/user.jpg +0 -0
  46. data/vendor/assets/img/user2.jpg +0 -0
  47. data/vendor/assets/javascripts/AdminLTE/app.js +1060 -0
  48. data/vendor/assets/javascripts/AdminLTE/bootstrap.js +2006 -0
  49. data/vendor/assets/javascripts/AdminLTE/dashboard.js +254 -0
  50. data/vendor/assets/javascripts/AdminLTE/plugins/bootstrap-slider/bootstrap-slider.js +388 -0
  51. data/vendor/assets/javascripts/AdminLTE/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js +6 -0
  52. data/vendor/assets/javascripts/AdminLTE/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.js +350 -0
  53. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/CHANGES.md +378 -0
  54. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/LICENSE.md +1264 -0
  55. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/README.md +39 -0
  56. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/adapters/jquery.js +10 -0
  57. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/build-config.js +142 -0
  58. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/ckeditor.js +900 -0
  59. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/config.js +38 -0
  60. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/contents.css +123 -0
  61. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/af.js +5 -0
  62. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/ar.js +5 -0
  63. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/bg.js +5 -0
  64. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/bn.js +5 -0
  65. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/bs.js +5 -0
  66. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/ca.js +5 -0
  67. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/cs.js +5 -0
  68. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/cy.js +5 -0
  69. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/da.js +5 -0
  70. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/de.js +5 -0
  71. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/el.js +5 -0
  72. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/en-au.js +5 -0
  73. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/en-ca.js +5 -0
  74. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/en-gb.js +5 -0
  75. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/en.js +5 -0
  76. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/eo.js +5 -0
  77. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/es.js +5 -0
  78. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/et.js +5 -0
  79. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/eu.js +5 -0
  80. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/fa.js +5 -0
  81. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/fi.js +5 -0
  82. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/fo.js +5 -0
  83. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/fr-ca.js +5 -0
  84. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/fr.js +5 -0
  85. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/gl.js +5 -0
  86. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/gu.js +5 -0
  87. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/he.js +5 -0
  88. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/hi.js +5 -0
  89. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/hr.js +5 -0
  90. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/hu.js +5 -0
  91. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/id.js +5 -0
  92. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/is.js +5 -0
  93. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/it.js +5 -0
  94. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/ja.js +5 -0
  95. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/ka.js +5 -0
  96. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/km.js +5 -0
  97. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/ko.js +5 -0
  98. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/ku.js +5 -0
  99. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/lt.js +5 -0
  100. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/lv.js +5 -0
  101. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/mk.js +5 -0
  102. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/mn.js +5 -0
  103. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/ms.js +5 -0
  104. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/nb.js +5 -0
  105. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/nl.js +5 -0
  106. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/no.js +5 -0
  107. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/pl.js +5 -0
  108. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/pt-br.js +5 -0
  109. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/pt.js +5 -0
  110. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/ro.js +5 -0
  111. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/ru.js +5 -0
  112. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/si.js +5 -0
  113. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/sk.js +5 -0
  114. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/sl.js +5 -0
  115. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/sq.js +5 -0
  116. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/sr-latn.js +5 -0
  117. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/sr.js +5 -0
  118. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/sv.js +5 -0
  119. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/th.js +5 -0
  120. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/tr.js +5 -0
  121. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/ug.js +5 -0
  122. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/uk.js +5 -0
  123. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/vi.js +5 -0
  124. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/zh-cn.js +5 -0
  125. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/zh.js +5 -0
  126. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +10 -0
  127. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/_translationstatus.txt +25 -0
  128. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/ar.js +9 -0
  129. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/bg.js +9 -0
  130. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/ca.js +10 -0
  131. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/cs.js +10 -0
  132. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/cy.js +9 -0
  133. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/da.js +9 -0
  134. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/de.js +10 -0
  135. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/el.js +10 -0
  136. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/en.js +9 -0
  137. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/eo.js +10 -0
  138. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/es.js +10 -0
  139. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/et.js +9 -0
  140. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/fa.js +9 -0
  141. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/fi.js +10 -0
  142. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/fr-ca.js +10 -0
  143. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/fr.js +11 -0
  144. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/gl.js +10 -0
  145. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/gu.js +9 -0
  146. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/he.js +9 -0
  147. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/hi.js +9 -0
  148. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/hr.js +9 -0
  149. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/hu.js +10 -0
  150. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/id.js +9 -0
  151. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/it.js +10 -0
  152. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/ja.js +8 -0
  153. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/km.js +9 -0
  154. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/ko.js +9 -0
  155. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/ku.js +10 -0
  156. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/lt.js +9 -0
  157. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/lv.js +11 -0
  158. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/mk.js +9 -0
  159. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/mn.js +9 -0
  160. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/nb.js +9 -0
  161. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/nl.js +10 -0
  162. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/no.js +9 -0
  163. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/pl.js +10 -0
  164. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/pt-br.js +9 -0
  165. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/pt.js +10 -0
  166. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/ro.js +9 -0
  167. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js +9 -0
  168. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/si.js +8 -0
  169. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/sk.js +10 -0
  170. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/sl.js +10 -0
  171. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/sq.js +9 -0
  172. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/sr-latn.js +9 -0
  173. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/sr.js +9 -0
  174. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/sv.js +10 -0
  175. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/th.js +9 -0
  176. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/tr.js +10 -0
  177. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/ug.js +9 -0
  178. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/uk.js +10 -0
  179. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/vi.js +9 -0
  180. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/zh-cn.js +7 -0
  181. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/zh.js +7 -0
  182. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/about/dialogs/about.js +7 -0
  183. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/about/dialogs/hidpi/logo_ckeditor.png +0 -0
  184. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
  185. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/clipboard/dialogs/paste.js +11 -0
  186. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/dialog/dialogDefinition.js +4 -0
  187. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/fakeobjects/images/spacer.gif +0 -0
  188. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/icons.png +0 -0
  189. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/icons_hidpi.png +0 -0
  190. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/image/dialogs/image.js +43 -0
  191. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/image/images/noimage.png +0 -0
  192. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/link/dialogs/anchor.js +8 -0
  193. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/link/dialogs/link.js +37 -0
  194. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/link/images/anchor.png +0 -0
  195. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/link/images/hidpi/anchor.png +0 -0
  196. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/magicline/images/hidpi/icon.png +0 -0
  197. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/magicline/images/icon.png +0 -0
  198. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/pastefromword/filter/default.js +31 -0
  199. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/scayt/LICENSE.md +28 -0
  200. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/scayt/README.md +25 -0
  201. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/scayt/dialogs/options.js +20 -0
  202. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/scayt/dialogs/toolbar.css +71 -0
  203. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/_translationstatus.txt +20 -0
  204. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/ar.js +13 -0
  205. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/bg.js +13 -0
  206. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/ca.js +14 -0
  207. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/cs.js +13 -0
  208. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/cy.js +14 -0
  209. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/de.js +13 -0
  210. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/el.js +13 -0
  211. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/en.js +13 -0
  212. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/eo.js +12 -0
  213. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/es.js +13 -0
  214. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/et.js +13 -0
  215. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/fa.js +12 -0
  216. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/fi.js +13 -0
  217. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/fr-ca.js +10 -0
  218. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/fr.js +11 -0
  219. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/gl.js +13 -0
  220. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/he.js +12 -0
  221. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/hr.js +13 -0
  222. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/hu.js +12 -0
  223. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/id.js +13 -0
  224. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/it.js +14 -0
  225. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/ja.js +9 -0
  226. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/km.js +13 -0
  227. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/ku.js +13 -0
  228. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/lv.js +13 -0
  229. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/nb.js +11 -0
  230. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/nl.js +13 -0
  231. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/no.js +11 -0
  232. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/pl.js +12 -0
  233. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/pt-br.js +11 -0
  234. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/pt.js +13 -0
  235. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/ru.js +13 -0
  236. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/si.js +13 -0
  237. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/sk.js +13 -0
  238. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/sl.js +12 -0
  239. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/sq.js +13 -0
  240. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/sv.js +11 -0
  241. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/th.js +13 -0
  242. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/tr.js +12 -0
  243. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/ug.js +13 -0
  244. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/uk.js +12 -0
  245. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/vi.js +14 -0
  246. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/zh-cn.js +9 -0
  247. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/zh.js +12 -0
  248. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/specialchar.js +14 -0
  249. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/table/dialogs/table.js +21 -0
  250. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/tabletools/dialogs/tableCell.js +16 -0
  251. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/wsc/LICENSE.md +28 -0
  252. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/wsc/README.md +25 -0
  253. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/wsc/dialogs/ciframe.html +66 -0
  254. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/wsc/dialogs/tmp.html +118 -0
  255. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +52 -0
  256. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/wsc/dialogs/wsc.css +82 -0
  257. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/wsc/dialogs/wsc.js +67 -0
  258. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/wsc/dialogs/wsc_ie.js +11 -0
  259. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/skins/moono/dialog.css +5 -0
  260. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/skins/moono/dialog_ie.css +5 -0
  261. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/skins/moono/dialog_ie7.css +5 -0
  262. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/skins/moono/dialog_ie8.css +5 -0
  263. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/skins/moono/dialog_iequirks.css +5 -0
  264. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/skins/moono/dialog_opera.css +5 -0
  265. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/skins/moono/editor.css +5 -0
  266. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/skins/moono/editor_gecko.css +5 -0
  267. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/skins/moono/editor_ie.css +5 -0
  268. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/skins/moono/editor_ie7.css +5 -0
  269. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/skins/moono/editor_ie8.css +5 -0
  270. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/skins/moono/editor_iequirks.css +5 -0
  271. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/skins/moono/icons.png +0 -0
  272. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/skins/moono/icons_hidpi.png +0 -0
  273. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/skins/moono/images/arrow.png +0 -0
  274. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/skins/moono/images/close.png +0 -0
  275. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/skins/moono/images/hidpi/close.png +0 -0
  276. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/skins/moono/images/hidpi/lock-open.png +0 -0
  277. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/skins/moono/images/hidpi/lock.png +0 -0
  278. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/skins/moono/images/hidpi/refresh.png +0 -0
  279. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/skins/moono/images/lock-open.png +0 -0
  280. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/skins/moono/images/lock.png +0 -0
  281. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/skins/moono/images/refresh.png +0 -0
  282. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/skins/moono/readme.md +51 -0
  283. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/styles.js +111 -0
  284. data/vendor/assets/javascripts/AdminLTE/plugins/colorpicker/bootstrap-colorpicker.js +949 -0
  285. data/vendor/assets/javascripts/AdminLTE/plugins/colorpicker/bootstrap-colorpicker.min.js +1 -0
  286. data/vendor/assets/javascripts/AdminLTE/plugins/datatables/dataTables.bootstrap.js +250 -0
  287. data/vendor/assets/javascripts/AdminLTE/plugins/datatables/jquery.dataTables.js +12099 -0
  288. data/vendor/assets/javascripts/AdminLTE/plugins/daterangepicker/daterangepicker.js +883 -0
  289. data/vendor/assets/javascripts/AdminLTE/plugins/flot/excanvas.js +1428 -0
  290. data/vendor/assets/javascripts/AdminLTE/plugins/flot/excanvas.min.js +1 -0
  291. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.colorhelpers.js +180 -0
  292. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.colorhelpers.min.js +1 -0
  293. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.canvas.js +345 -0
  294. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.canvas.min.js +1 -0
  295. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.categories.js +190 -0
  296. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.categories.min.js +1 -0
  297. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.crosshair.js +176 -0
  298. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.crosshair.min.js +1 -0
  299. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.errorbars.js +353 -0
  300. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.errorbars.min.js +1 -0
  301. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.fillbetween.js +226 -0
  302. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.fillbetween.min.js +1 -0
  303. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.image.js +241 -0
  304. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.image.min.js +1 -0
  305. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.js +3137 -0
  306. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.min.js +2 -0
  307. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.navigate.js +346 -0
  308. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.navigate.min.js +1 -0
  309. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.pie.js +817 -0
  310. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.pie.min.js +1 -0
  311. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.resize.js +60 -0
  312. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.resize.min.js +1 -0
  313. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.selection.js +360 -0
  314. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.selection.min.js +1 -0
  315. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.stack.js +188 -0
  316. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.stack.min.js +1 -0
  317. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.symbol.js +71 -0
  318. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.symbol.min.js +1 -0
  319. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.threshold.js +142 -0
  320. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.threshold.min.js +1 -0
  321. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.time.js +431 -0
  322. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.time.min.js +1 -0
  323. data/vendor/assets/javascripts/AdminLTE/plugins/fullcalendar/fullcalendar.js +6110 -0
  324. data/vendor/assets/javascripts/AdminLTE/plugins/fullcalendar/fullcalendar.min.js +7 -0
  325. data/vendor/assets/javascripts/AdminLTE/plugins/iCheck/icheck.js +506 -0
  326. data/vendor/assets/javascripts/AdminLTE/plugins/iCheck/icheck.min.js +10 -0
  327. data/vendor/assets/javascripts/AdminLTE/plugins/input-mask/jquery.inputmask.date.extensions.js +488 -0
  328. data/vendor/assets/javascripts/AdminLTE/plugins/input-mask/jquery.inputmask.extensions.js +122 -0
  329. data/vendor/assets/javascripts/AdminLTE/plugins/input-mask/jquery.inputmask.js +1632 -0
  330. data/vendor/assets/javascripts/AdminLTE/plugins/input-mask/jquery.inputmask.numeric.extensions.js +177 -0
  331. data/vendor/assets/javascripts/AdminLTE/plugins/input-mask/jquery.inputmask.phone.extensions.js +50 -0
  332. data/vendor/assets/javascripts/AdminLTE/plugins/input-mask/jquery.inputmask.regex.extensions.js +170 -0
  333. data/vendor/assets/javascripts/AdminLTE/plugins/input-mask/phone-codes/phone-be.json +45 -0
  334. data/vendor/assets/javascripts/AdminLTE/plugins/input-mask/phone-codes/phone-codes.json +294 -0
  335. data/vendor/assets/javascripts/AdminLTE/plugins/input-mask/phone-codes/readme.txt +1 -0
  336. data/vendor/assets/javascripts/AdminLTE/plugins/ionslider/ion.rangeSlider.min.js +22 -0
  337. data/vendor/assets/javascripts/AdminLTE/plugins/jqueryKnob/jquery.knob.js +764 -0
  338. data/vendor/assets/javascripts/AdminLTE/plugins/jvectormap/jquery-jvectormap-1.2.2.min.js +8 -0
  339. data/vendor/assets/javascripts/AdminLTE/plugins/jvectormap/jquery-jvectormap-world-mill-en.js +1 -0
  340. data/vendor/assets/javascripts/AdminLTE/plugins/misc/html5shiv.js +8 -0
  341. data/vendor/assets/javascripts/AdminLTE/plugins/misc/jquery.ba-resize.min.js +9 -0
  342. data/vendor/assets/javascripts/AdminLTE/plugins/misc/jquery.placeholder.js +187 -0
  343. data/vendor/assets/javascripts/AdminLTE/plugins/misc/modernizr.min.js +4 -0
  344. data/vendor/assets/javascripts/AdminLTE/plugins/misc/respond.min.js +1 -0
  345. data/vendor/assets/javascripts/AdminLTE/plugins/morris/morris.js +1888 -0
  346. data/vendor/assets/javascripts/AdminLTE/plugins/morris/morris.min.js +2 -0
  347. data/vendor/assets/javascripts/AdminLTE/plugins/slimScroll/jquery.slimscroll.js +464 -0
  348. data/vendor/assets/javascripts/AdminLTE/plugins/slimScroll/jquery.slimscroll.min.js +16 -0
  349. data/vendor/assets/javascripts/AdminLTE/plugins/slimScroll/slimScroll.jquery.json +30 -0
  350. data/vendor/assets/javascripts/AdminLTE/plugins/sparkline/jquery.sparkline.js +3054 -0
  351. data/vendor/assets/javascripts/AdminLTE/plugins/sparkline/jquery.sparkline.min.js +5 -0
  352. data/vendor/assets/javascripts/AdminLTE/plugins/timepicker/bootstrap-timepicker.js +903 -0
  353. data/vendor/assets/javascripts/AdminLTE/plugins/timepicker/bootstrap-timepicker.min.js +5 -0
  354. data/vendor/assets/stylesheets/AdminLTE.css.scss +3539 -0
  355. data/vendor/assets/stylesheets/adminlte/plugins/bootstrap-slider/slider.css.scss.css +166 -0
  356. data/vendor/assets/stylesheets/adminlte/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.css.scss.css +102 -0
  357. data/vendor/assets/stylesheets/adminlte/plugins/colorpicker/bootstrap-colorpicker.css.scss.css +214 -0
  358. data/vendor/assets/stylesheets/adminlte/plugins/datatables/dataTables.bootstrap.css.scss.css +223 -0
  359. data/vendor/assets/stylesheets/adminlte/plugins/datatables/images/sort_asc.png +0 -0
  360. data/vendor/assets/stylesheets/adminlte/plugins/datatables/images/sort_asc_disabled.png +0 -0
  361. data/vendor/assets/stylesheets/adminlte/plugins/datatables/images/sort_both.png +0 -0
  362. data/vendor/assets/stylesheets/adminlte/plugins/datatables/images/sort_desc.png +0 -0
  363. data/vendor/assets/stylesheets/adminlte/plugins/datatables/images/sort_desc_disabled.png +0 -0
  364. data/vendor/assets/stylesheets/adminlte/plugins/daterangepicker/daterangepicker-bs3.css.scss.css +245 -0
  365. data/vendor/assets/stylesheets/adminlte/plugins/fullcalendar/fullcalendar.css.scss.css +617 -0
  366. data/vendor/assets/stylesheets/adminlte/plugins/fullcalendar/fullcalendar.print.css.scss.css +29 -0
  367. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/all.css +61 -0
  368. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/_all.css +560 -0
  369. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/aero.css +56 -0
  370. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/aero.png +0 -0
  371. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/aero@2x.png +0 -0
  372. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/blue.css +56 -0
  373. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/blue.png +0 -0
  374. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/blue@2x.png +0 -0
  375. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/flat.css +56 -0
  376. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/flat.png +0 -0
  377. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/flat@2x.png +0 -0
  378. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/green.css +56 -0
  379. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/green.png +0 -0
  380. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/green@2x.png +0 -0
  381. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/grey.css +56 -0
  382. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/grey.png +0 -0
  383. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/grey@2x.png +0 -0
  384. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/orange.css +56 -0
  385. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/orange.png +0 -0
  386. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/orange@2x.png +0 -0
  387. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/pink.css +56 -0
  388. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/pink.png +0 -0
  389. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/pink@2x.png +0 -0
  390. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/purple.css +56 -0
  391. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/purple.png +0 -0
  392. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/purple@2x.png +0 -0
  393. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/red.css +56 -0
  394. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/red.png +0 -0
  395. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/red@2x.png +0 -0
  396. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/yellow.css +56 -0
  397. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/yellow.png +0 -0
  398. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/yellow@2x.png +0 -0
  399. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/futurico/futurico.css +56 -0
  400. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/futurico/futurico.png +0 -0
  401. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/futurico/futurico@2x.png +0 -0
  402. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/line/_all.css +740 -0
  403. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/line/aero.css +74 -0
  404. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/line/blue.css +74 -0
  405. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/line/green.css +74 -0
  406. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/line/grey.css +74 -0
  407. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/line/line.css +74 -0
  408. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/line/line.png +0 -0
  409. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/line/line@2x.png +0 -0
  410. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/line/orange.css +74 -0
  411. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/line/pink.css +74 -0
  412. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/line/purple.css +74 -0
  413. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/line/red.css +74 -0
  414. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/line/yellow.css +74 -0
  415. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/_all.css +557 -0
  416. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/aero.css +62 -0
  417. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/aero.png +0 -0
  418. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/aero@2x.png +0 -0
  419. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/blue.css +62 -0
  420. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/blue.png +0 -0
  421. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/blue@2x.png +0 -0
  422. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/green.css +62 -0
  423. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/green.png +0 -0
  424. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/green@2x.png +0 -0
  425. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/grey.css +62 -0
  426. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/grey.png +0 -0
  427. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/grey@2x.png +0 -0
  428. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/minimal.css +62 -0
  429. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/minimal.png +0 -0
  430. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/minimal@2x.png +0 -0
  431. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/orange.css +62 -0
  432. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/orange.png +0 -0
  433. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/orange@2x.png +0 -0
  434. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/pink.css +62 -0
  435. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/pink.png +0 -0
  436. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/pink@2x.png +0 -0
  437. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/purple.css +62 -0
  438. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/purple.png +0 -0
  439. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/purple@2x.png +0 -0
  440. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/red.css +62 -0
  441. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/red.png +0 -0
  442. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/red@2x.png +0 -0
  443. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/yellow.css +62 -0
  444. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/yellow.png +0 -0
  445. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/yellow@2x.png +0 -0
  446. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/polaris/polaris.css +62 -0
  447. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/polaris/polaris.png +0 -0
  448. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/polaris/polaris@2x.png +0 -0
  449. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/_all.css +620 -0
  450. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/aero.css +62 -0
  451. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/aero.png +0 -0
  452. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/aero@2x.png +0 -0
  453. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/blue.css +62 -0
  454. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/blue.png +0 -0
  455. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/blue@2x.png +0 -0
  456. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/green.css +62 -0
  457. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/green.png +0 -0
  458. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/green@2x.png +0 -0
  459. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/grey.css +62 -0
  460. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/grey.png +0 -0
  461. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/grey@2x.png +0 -0
  462. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/orange.css +62 -0
  463. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/orange.png +0 -0
  464. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/orange@2x.png +0 -0
  465. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/pink.css +62 -0
  466. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/pink.png +0 -0
  467. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/pink@2x.png +0 -0
  468. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/purple.css +62 -0
  469. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/purple.png +0 -0
  470. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/purple@2x.png +0 -0
  471. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/red.css +62 -0
  472. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/red.png +0 -0
  473. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/red@2x.png +0 -0
  474. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/square.css +62 -0
  475. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/square.png +0 -0
  476. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/square@2x.png +0 -0
  477. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/yellow.css +62 -0
  478. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/yellow.png +0 -0
  479. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/yellow@2x.png +0 -0
  480. data/vendor/assets/stylesheets/adminlte/plugins/ionslider/ion.rangeSlider.css.scss.css +126 -0
  481. data/vendor/assets/stylesheets/adminlte/plugins/ionslider/ion.rangeSlider.skinFlat.css.scss.css +89 -0
  482. data/vendor/assets/stylesheets/adminlte/plugins/ionslider/ion.rangeSlider.skinNice.css.scss.css +85 -0
  483. data/vendor/assets/stylesheets/adminlte/plugins/jvectormap/jquery-jvectormap-1.2.2.css.scss.css +36 -0
  484. data/vendor/assets/stylesheets/adminlte/plugins/morris/morris.css.scss.css +2 -0
  485. data/vendor/assets/stylesheets/adminlte/plugins/timepicker/bootstrap-timepicker.css.scss +121 -0
  486. data/vendor/assets/stylesheets/bootstrap.css.scss +7118 -0
  487. data/vendor/assets/stylesheets/font-awesome.css.scss +1338 -0
  488. data/vendor/assets/stylesheets/ionicons.css.scss +2183 -0
  489. metadata +574 -0
@@ -0,0 +1,2 @@
1
+ (function($){$.color={};$.color.make=function(r,g,b,a){var o={};o.r=r||0;o.g=g||0;o.b=b||0;o.a=a!=null?a:1;o.add=function(c,d){for(var i=0;i<c.length;++i)o[c.charAt(i)]+=d;return o.normalize()};o.scale=function(c,f){for(var i=0;i<c.length;++i)o[c.charAt(i)]*=f;return o.normalize()};o.toString=function(){if(o.a>=1){return"rgb("+[o.r,o.g,o.b].join(",")+")"}else{return"rgba("+[o.r,o.g,o.b,o.a].join(",")+")"}};o.normalize=function(){function clamp(min,value,max){return value<min?min:value>max?max:value}o.r=clamp(0,parseInt(o.r),255);o.g=clamp(0,parseInt(o.g),255);o.b=clamp(0,parseInt(o.b),255);o.a=clamp(0,o.a,1);return o};o.clone=function(){return $.color.make(o.r,o.b,o.g,o.a)};return o.normalize()};$.color.extract=function(elem,css){var c;do{c=elem.css(css).toLowerCase();if(c!=""&&c!="transparent")break;elem=elem.parent()}while(elem.length&&!$.nodeName(elem.get(0),"body"));if(c=="rgba(0, 0, 0, 0)")c="transparent";return $.color.parse(c)};$.color.parse=function(str){var res,m=$.color.make;if(res=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(str))return m(parseInt(res[1],10),parseInt(res[2],10),parseInt(res[3],10));if(res=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(str))return m(parseInt(res[1],10),parseInt(res[2],10),parseInt(res[3],10),parseFloat(res[4]));if(res=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(str))return m(parseFloat(res[1])*2.55,parseFloat(res[2])*2.55,parseFloat(res[3])*2.55);if(res=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(str))return m(parseFloat(res[1])*2.55,parseFloat(res[2])*2.55,parseFloat(res[3])*2.55,parseFloat(res[4]));if(res=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(str))return m(parseInt(res[1],16),parseInt(res[2],16),parseInt(res[3],16));if(res=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(str))return m(parseInt(res[1]+res[1],16),parseInt(res[2]+res[2],16),parseInt(res[3]+res[3],16));var name=$.trim(str).toLowerCase();if(name=="transparent")return m(255,255,255,0);else{res=lookupColors[name]||[0,0,0];return m(res[0],res[1],res[2])}};var lookupColors={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}})(jQuery);(function($){var hasOwnProperty=Object.prototype.hasOwnProperty;function Canvas(cls,container){var element=container.children("."+cls)[0];if(element==null){element=document.createElement("canvas");element.className=cls;$(element).css({direction:"ltr",position:"absolute",left:0,top:0}).appendTo(container);if(!element.getContext){if(window.G_vmlCanvasManager){element=window.G_vmlCanvasManager.initElement(element)}else{throw new Error("Canvas is not available. If you're using IE with a fall-back such as Excanvas, then there's either a mistake in your conditional include, or the page has no DOCTYPE and is rendering in Quirks Mode.")}}}this.element=element;var context=this.context=element.getContext("2d");var devicePixelRatio=window.devicePixelRatio||1,backingStoreRatio=context.webkitBackingStorePixelRatio||context.mozBackingStorePixelRatio||context.msBackingStorePixelRatio||context.oBackingStorePixelRatio||context.backingStorePixelRatio||1;this.pixelRatio=devicePixelRatio/backingStoreRatio;this.resize(container.width(),container.height());this.textContainer=null;this.text={};this._textCache={}}Canvas.prototype.resize=function(width,height){if(width<=0||height<=0){throw new Error("Invalid dimensions for plot, width = "+width+", height = "+height)}var element=this.element,context=this.context,pixelRatio=this.pixelRatio;if(this.width!=width){element.width=width*pixelRatio;element.style.width=width+"px";this.width=width}if(this.height!=height){element.height=height*pixelRatio;element.style.height=height+"px";this.height=height}context.restore();context.save();context.scale(pixelRatio,pixelRatio)};Canvas.prototype.clear=function(){this.context.clearRect(0,0,this.width,this.height)};Canvas.prototype.render=function(){var cache=this._textCache;for(var layerKey in cache){if(hasOwnProperty.call(cache,layerKey)){var layer=this.getTextLayer(layerKey),layerCache=cache[layerKey];layer.hide();for(var styleKey in layerCache){if(hasOwnProperty.call(layerCache,styleKey)){var styleCache=layerCache[styleKey];for(var key in styleCache){if(hasOwnProperty.call(styleCache,key)){var positions=styleCache[key].positions;for(var i=0,position;position=positions[i];i++){if(position.active){if(!position.rendered){layer.append(position.element);position.rendered=true}}else{positions.splice(i--,1);if(position.rendered){position.element.detach()}}}if(positions.length==0){delete styleCache[key]}}}}}layer.show()}}};Canvas.prototype.getTextLayer=function(classes){var layer=this.text[classes];if(layer==null){if(this.textContainer==null){this.textContainer=$("<div class='flot-text'></div>").css({position:"absolute",top:0,left:0,bottom:0,right:0,"font-size":"smaller",color:"#545454"}).insertAfter(this.element)}layer=this.text[classes]=$("<div></div>").addClass(classes).css({position:"absolute",top:0,left:0,bottom:0,right:0}).appendTo(this.textContainer)}return layer};Canvas.prototype.getTextInfo=function(layer,text,font,angle,width){var textStyle,layerCache,styleCache,info;text=""+text;if(typeof font==="object"){textStyle=font.style+" "+font.variant+" "+font.weight+" "+font.size+"px/"+font.lineHeight+"px "+font.family}else{textStyle=font}layerCache=this._textCache[layer];if(layerCache==null){layerCache=this._textCache[layer]={}}styleCache=layerCache[textStyle];if(styleCache==null){styleCache=layerCache[textStyle]={}}info=styleCache[text];if(info==null){var element=$("<div></div>").html(text).css({position:"absolute","max-width":width,top:-9999}).appendTo(this.getTextLayer(layer));if(typeof font==="object"){element.css({font:textStyle,color:font.color})}else if(typeof font==="string"){element.addClass(font)}info=styleCache[text]={width:element.outerWidth(true),height:element.outerHeight(true),element:element,positions:[]};element.detach()}return info};Canvas.prototype.addText=function(layer,x,y,text,font,angle,width,halign,valign){var info=this.getTextInfo(layer,text,font,angle,width),positions=info.positions;if(halign=="center"){x-=info.width/2}else if(halign=="right"){x-=info.width}if(valign=="middle"){y-=info.height/2}else if(valign=="bottom"){y-=info.height}for(var i=0,position;position=positions[i];i++){if(position.x==x&&position.y==y){position.active=true;return}}position={active:true,rendered:false,element:positions.length?info.element.clone():info.element,x:x,y:y};positions.push(position);position.element.css({top:Math.round(y),left:Math.round(x),"text-align":halign})};Canvas.prototype.removeText=function(layer,x,y,text,font,angle){if(text==null){var layerCache=this._textCache[layer];if(layerCache!=null){for(var styleKey in layerCache){if(hasOwnProperty.call(layerCache,styleKey)){var styleCache=layerCache[styleKey];for(var key in styleCache){if(hasOwnProperty.call(styleCache,key)){var positions=styleCache[key].positions;for(var i=0,position;position=positions[i];i++){position.active=false}}}}}}}else{var positions=this.getTextInfo(layer,text,font,angle).positions;for(var i=0,position;position=positions[i];i++){if(position.x==x&&position.y==y){position.active=false}}}};function Plot(placeholder,data_,options_,plugins){var series=[],options={colors:["#edc240","#afd8f8","#cb4b4b","#4da74d","#9440ed"],legend:{show:true,noColumns:1,labelFormatter:null,labelBoxBorderColor:"#ccc",container:null,position:"ne",margin:5,backgroundColor:null,backgroundOpacity:.85,sorted:null},xaxis:{show:null,position:"bottom",mode:null,font:null,color:null,tickColor:null,transform:null,inverseTransform:null,min:null,max:null,autoscaleMargin:null,ticks:null,tickFormatter:null,labelWidth:null,labelHeight:null,reserveSpace:null,tickLength:null,alignTicksWithAxis:null,tickDecimals:null,tickSize:null,minTickSize:null},yaxis:{autoscaleMargin:.02,position:"left"},xaxes:[],yaxes:[],series:{points:{show:false,radius:3,lineWidth:2,fill:true,fillColor:"#ffffff",symbol:"circle"},lines:{lineWidth:2,fill:false,fillColor:null,steps:false},bars:{show:false,lineWidth:2,barWidth:1,fill:true,fillColor:null,align:"left",horizontal:false,zero:true},shadowSize:3,highlightColor:null},grid:{show:true,aboveData:false,color:"#545454",backgroundColor:null,borderColor:null,tickColor:null,margin:0,labelMargin:5,axisMargin:8,borderWidth:2,minBorderMargin:null,markings:null,markingsColor:"#f4f4f4",markingsLineWidth:2,clickable:false,hoverable:false,autoHighlight:true,mouseActiveRadius:10},interaction:{redrawOverlayInterval:1e3/60},hooks:{}},surface=null,overlay=null,eventHolder=null,ctx=null,octx=null,xaxes=[],yaxes=[],plotOffset={left:0,right:0,top:0,bottom:0},plotWidth=0,plotHeight=0,hooks={processOptions:[],processRawData:[],processDatapoints:[],processOffset:[],drawBackground:[],drawSeries:[],draw:[],bindEvents:[],drawOverlay:[],shutdown:[]},plot=this;plot.setData=setData;plot.setupGrid=setupGrid;plot.draw=draw;plot.getPlaceholder=function(){return placeholder};plot.getCanvas=function(){return surface.element};plot.getPlotOffset=function(){return plotOffset};plot.width=function(){return plotWidth};plot.height=function(){return plotHeight};plot.offset=function(){var o=eventHolder.offset();o.left+=plotOffset.left;o.top+=plotOffset.top;return o};plot.getData=function(){return series};plot.getAxes=function(){var res={},i;$.each(xaxes.concat(yaxes),function(_,axis){if(axis)res[axis.direction+(axis.n!=1?axis.n:"")+"axis"]=axis});return res};plot.getXAxes=function(){return xaxes};plot.getYAxes=function(){return yaxes};plot.c2p=canvasToAxisCoords;plot.p2c=axisToCanvasCoords;plot.getOptions=function(){return options};plot.highlight=highlight;plot.unhighlight=unhighlight;plot.triggerRedrawOverlay=triggerRedrawOverlay;plot.pointOffset=function(point){return{left:parseInt(xaxes[axisNumber(point,"x")-1].p2c(+point.x)+plotOffset.left,10),top:parseInt(yaxes[axisNumber(point,"y")-1].p2c(+point.y)+plotOffset.top,10)}};plot.shutdown=shutdown;plot.destroy=function(){shutdown();placeholder.removeData("plot").empty();series=[];options=null;surface=null;overlay=null;eventHolder=null;ctx=null;octx=null;xaxes=[];yaxes=[];hooks=null;highlights=[];plot=null};plot.resize=function(){var width=placeholder.width(),height=placeholder.height();surface.resize(width,height);overlay.resize(width,height)};plot.hooks=hooks;initPlugins(plot);parseOptions(options_);setupCanvases();setData(data_);setupGrid();draw();bindEvents();function executeHooks(hook,args){args=[plot].concat(args);for(var i=0;i<hook.length;++i)hook[i].apply(this,args)}function initPlugins(){var classes={Canvas:Canvas};for(var i=0;i<plugins.length;++i){var p=plugins[i];p.init(plot,classes);if(p.options)$.extend(true,options,p.options)}}function parseOptions(opts){$.extend(true,options,opts);if(opts&&opts.colors){options.colors=opts.colors}if(options.xaxis.color==null)options.xaxis.color=$.color.parse(options.grid.color).scale("a",.22).toString();if(options.yaxis.color==null)options.yaxis.color=$.color.parse(options.grid.color).scale("a",.22).toString();if(options.xaxis.tickColor==null)options.xaxis.tickColor=options.grid.tickColor||options.xaxis.color;if(options.yaxis.tickColor==null)options.yaxis.tickColor=options.grid.tickColor||options.yaxis.color;if(options.grid.borderColor==null)options.grid.borderColor=options.grid.color;if(options.grid.tickColor==null)options.grid.tickColor=$.color.parse(options.grid.color).scale("a",.22).toString();var i,axisOptions,axisCount,fontSize=placeholder.css("font-size"),fontSizeDefault=fontSize?+fontSize.replace("px",""):13,fontDefaults={style:placeholder.css("font-style"),size:Math.round(.8*fontSizeDefault),variant:placeholder.css("font-variant"),weight:placeholder.css("font-weight"),family:placeholder.css("font-family")};axisCount=options.xaxes.length||1;for(i=0;i<axisCount;++i){axisOptions=options.xaxes[i];if(axisOptions&&!axisOptions.tickColor){axisOptions.tickColor=axisOptions.color}axisOptions=$.extend(true,{},options.xaxis,axisOptions);options.xaxes[i]=axisOptions;if(axisOptions.font){axisOptions.font=$.extend({},fontDefaults,axisOptions.font);if(!axisOptions.font.color){axisOptions.font.color=axisOptions.color}if(!axisOptions.font.lineHeight){axisOptions.font.lineHeight=Math.round(axisOptions.font.size*1.15)}}}axisCount=options.yaxes.length||1;for(i=0;i<axisCount;++i){axisOptions=options.yaxes[i];if(axisOptions&&!axisOptions.tickColor){axisOptions.tickColor=axisOptions.color}axisOptions=$.extend(true,{},options.yaxis,axisOptions);options.yaxes[i]=axisOptions;if(axisOptions.font){axisOptions.font=$.extend({},fontDefaults,axisOptions.font);if(!axisOptions.font.color){axisOptions.font.color=axisOptions.color}if(!axisOptions.font.lineHeight){axisOptions.font.lineHeight=Math.round(axisOptions.font.size*1.15)}}}if(options.xaxis.noTicks&&options.xaxis.ticks==null)options.xaxis.ticks=options.xaxis.noTicks;if(options.yaxis.noTicks&&options.yaxis.ticks==null)options.yaxis.ticks=options.yaxis.noTicks;if(options.x2axis){options.xaxes[1]=$.extend(true,{},options.xaxis,options.x2axis);options.xaxes[1].position="top"}if(options.y2axis){options.yaxes[1]=$.extend(true,{},options.yaxis,options.y2axis);options.yaxes[1].position="right"}if(options.grid.coloredAreas)options.grid.markings=options.grid.coloredAreas;if(options.grid.coloredAreasColor)options.grid.markingsColor=options.grid.coloredAreasColor;if(options.lines)$.extend(true,options.series.lines,options.lines);if(options.points)$.extend(true,options.series.points,options.points);if(options.bars)$.extend(true,options.series.bars,options.bars);if(options.shadowSize!=null)options.series.shadowSize=options.shadowSize;if(options.highlightColor!=null)options.series.highlightColor=options.highlightColor;for(i=0;i<options.xaxes.length;++i)getOrCreateAxis(xaxes,i+1).options=options.xaxes[i];for(i=0;i<options.yaxes.length;++i)getOrCreateAxis(yaxes,i+1).options=options.yaxes[i];for(var n in hooks)if(options.hooks[n]&&options.hooks[n].length)hooks[n]=hooks[n].concat(options.hooks[n]);executeHooks(hooks.processOptions,[options])}function setData(d){series=parseData(d);fillInSeriesOptions();processData()}function parseData(d){var res=[];for(var i=0;i<d.length;++i){var s=$.extend(true,{},options.series);if(d[i].data!=null){s.data=d[i].data;delete d[i].data;$.extend(true,s,d[i]);d[i].data=s.data}else s.data=d[i];res.push(s)}return res}function axisNumber(obj,coord){var a=obj[coord+"axis"];if(typeof a=="object")a=a.n;if(typeof a!="number")a=1;return a}function allAxes(){return $.grep(xaxes.concat(yaxes),function(a){return a})}function canvasToAxisCoords(pos){var res={},i,axis;for(i=0;i<xaxes.length;++i){axis=xaxes[i];if(axis&&axis.used)res["x"+axis.n]=axis.c2p(pos.left)}for(i=0;i<yaxes.length;++i){axis=yaxes[i];if(axis&&axis.used)res["y"+axis.n]=axis.c2p(pos.top)}if(res.x1!==undefined)res.x=res.x1;if(res.y1!==undefined)res.y=res.y1;return res}function axisToCanvasCoords(pos){var res={},i,axis,key;for(i=0;i<xaxes.length;++i){axis=xaxes[i];if(axis&&axis.used){key="x"+axis.n;if(pos[key]==null&&axis.n==1)key="x";if(pos[key]!=null){res.left=axis.p2c(pos[key]);break}}}for(i=0;i<yaxes.length;++i){axis=yaxes[i];if(axis&&axis.used){key="y"+axis.n;if(pos[key]==null&&axis.n==1)key="y";if(pos[key]!=null){res.top=axis.p2c(pos[key]);break}}}return res}function getOrCreateAxis(axes,number){if(!axes[number-1])axes[number-1]={n:number,direction:axes==xaxes?"x":"y",options:$.extend(true,{},axes==xaxes?options.xaxis:options.yaxis)};return axes[number-1]}function fillInSeriesOptions(){var neededColors=series.length,maxIndex=-1,i;for(i=0;i<series.length;++i){var sc=series[i].color;if(sc!=null){neededColors--;if(typeof sc=="number"&&sc>maxIndex){maxIndex=sc}}}if(neededColors<=maxIndex){neededColors=maxIndex+1}var c,colors=[],colorPool=options.colors,colorPoolSize=colorPool.length,variation=0;for(i=0;i<neededColors;i++){c=$.color.parse(colorPool[i%colorPoolSize]||"#666");if(i%colorPoolSize==0&&i){if(variation>=0){if(variation<.5){variation=-variation-.2}else variation=0}else variation=-variation}colors[i]=c.scale("rgb",1+variation)}var colori=0,s;for(i=0;i<series.length;++i){s=series[i];if(s.color==null){s.color=colors[colori].toString();++colori}else if(typeof s.color=="number")s.color=colors[s.color].toString();if(s.lines.show==null){var v,show=true;for(v in s)if(s[v]&&s[v].show){show=false;break}if(show)s.lines.show=true}if(s.lines.zero==null){s.lines.zero=!!s.lines.fill}s.xaxis=getOrCreateAxis(xaxes,axisNumber(s,"x"));s.yaxis=getOrCreateAxis(yaxes,axisNumber(s,"y"))}}function processData(){var topSentry=Number.POSITIVE_INFINITY,bottomSentry=Number.NEGATIVE_INFINITY,fakeInfinity=Number.MAX_VALUE,i,j,k,m,length,s,points,ps,x,y,axis,val,f,p,data,format;function updateAxis(axis,min,max){if(min<axis.datamin&&min!=-fakeInfinity)axis.datamin=min;if(max>axis.datamax&&max!=fakeInfinity)axis.datamax=max}$.each(allAxes(),function(_,axis){axis.datamin=topSentry;axis.datamax=bottomSentry;axis.used=false});for(i=0;i<series.length;++i){s=series[i];s.datapoints={points:[]};executeHooks(hooks.processRawData,[s,s.data,s.datapoints])}for(i=0;i<series.length;++i){s=series[i];data=s.data;format=s.datapoints.format;if(!format){format=[];format.push({x:true,number:true,required:true});format.push({y:true,number:true,required:true});if(s.bars.show||s.lines.show&&s.lines.fill){var autoscale=!!(s.bars.show&&s.bars.zero||s.lines.show&&s.lines.zero);format.push({y:true,number:true,required:false,defaultValue:0,autoscale:autoscale});if(s.bars.horizontal){delete format[format.length-1].y;format[format.length-1].x=true}}s.datapoints.format=format}if(s.datapoints.pointsize!=null)continue;s.datapoints.pointsize=format.length;ps=s.datapoints.pointsize;points=s.datapoints.points;var insertSteps=s.lines.show&&s.lines.steps;s.xaxis.used=s.yaxis.used=true;for(j=k=0;j<data.length;++j,k+=ps){p=data[j];var nullify=p==null;if(!nullify){for(m=0;m<ps;++m){val=p[m];f=format[m];if(f){if(f.number&&val!=null){val=+val;if(isNaN(val))val=null;else if(val==Infinity)val=fakeInfinity;else if(val==-Infinity)val=-fakeInfinity}if(val==null){if(f.required)nullify=true;if(f.defaultValue!=null)val=f.defaultValue}}points[k+m]=val}}if(nullify){for(m=0;m<ps;++m){val=points[k+m];if(val!=null){f=format[m];if(f.autoscale!==false){if(f.x){updateAxis(s.xaxis,val,val)}if(f.y){updateAxis(s.yaxis,val,val)}}}points[k+m]=null}}else{if(insertSteps&&k>0&&points[k-ps]!=null&&points[k-ps]!=points[k]&&points[k-ps+1]!=points[k+1]){for(m=0;m<ps;++m)points[k+ps+m]=points[k+m];points[k+1]=points[k-ps+1];k+=ps}}}}for(i=0;i<series.length;++i){s=series[i];executeHooks(hooks.processDatapoints,[s,s.datapoints])}for(i=0;i<series.length;++i){s=series[i];points=s.datapoints.points;ps=s.datapoints.pointsize;format=s.datapoints.format;var xmin=topSentry,ymin=topSentry,xmax=bottomSentry,ymax=bottomSentry;for(j=0;j<points.length;j+=ps){if(points[j]==null)continue;for(m=0;m<ps;++m){val=points[j+m];f=format[m];if(!f||f.autoscale===false||val==fakeInfinity||val==-fakeInfinity)continue;if(f.x){if(val<xmin)xmin=val;if(val>xmax)xmax=val}if(f.y){if(val<ymin)ymin=val;if(val>ymax)ymax=val}}}if(s.bars.show){var delta;switch(s.bars.align){case"left":delta=0;break;case"right":delta=-s.bars.barWidth;break;default:delta=-s.bars.barWidth/2}if(s.bars.horizontal){ymin+=delta;ymax+=delta+s.bars.barWidth}else{xmin+=delta;xmax+=delta+s.bars.barWidth}}updateAxis(s.xaxis,xmin,xmax);updateAxis(s.yaxis,ymin,ymax)}$.each(allAxes(),function(_,axis){if(axis.datamin==topSentry)axis.datamin=null;if(axis.datamax==bottomSentry)axis.datamax=null})}function setupCanvases(){placeholder.css("padding",0).children().filter(function(){return!$(this).hasClass("flot-overlay")&&!$(this).hasClass("flot-base")}).remove();if(placeholder.css("position")=="static")placeholder.css("position","relative");surface=new Canvas("flot-base",placeholder);overlay=new Canvas("flot-overlay",placeholder);ctx=surface.context;octx=overlay.context;eventHolder=$(overlay.element).unbind();var existing=placeholder.data("plot");if(existing){existing.shutdown();overlay.clear()}placeholder.data("plot",plot)}function bindEvents(){if(options.grid.hoverable){eventHolder.mousemove(onMouseMove);eventHolder.bind("mouseleave",onMouseLeave)}if(options.grid.clickable)eventHolder.click(onClick);executeHooks(hooks.bindEvents,[eventHolder])}function shutdown(){if(redrawTimeout)clearTimeout(redrawTimeout);eventHolder.unbind("mousemove",onMouseMove);eventHolder.unbind("mouseleave",onMouseLeave);eventHolder.unbind("click",onClick);executeHooks(hooks.shutdown,[eventHolder])}function setTransformationHelpers(axis){function identity(x){return x}var s,m,t=axis.options.transform||identity,it=axis.options.inverseTransform;if(axis.direction=="x"){s=axis.scale=plotWidth/Math.abs(t(axis.max)-t(axis.min));m=Math.min(t(axis.max),t(axis.min))}else{s=axis.scale=plotHeight/Math.abs(t(axis.max)-t(axis.min));s=-s;m=Math.max(t(axis.max),t(axis.min))}if(t==identity)axis.p2c=function(p){return(p-m)*s};else axis.p2c=function(p){return(t(p)-m)*s};if(!it)axis.c2p=function(c){return m+c/s};else axis.c2p=function(c){return it(m+c/s)}}function measureTickLabels(axis){var opts=axis.options,ticks=axis.ticks||[],labelWidth=opts.labelWidth||0,labelHeight=opts.labelHeight||0,maxWidth=labelWidth||(axis.direction=="x"?Math.floor(surface.width/(ticks.length||1)):null),legacyStyles=axis.direction+"Axis "+axis.direction+axis.n+"Axis",layer="flot-"+axis.direction+"-axis flot-"+axis.direction+axis.n+"-axis "+legacyStyles,font=opts.font||"flot-tick-label tickLabel";for(var i=0;i<ticks.length;++i){var t=ticks[i];if(!t.label)continue;var info=surface.getTextInfo(layer,t.label,font,null,maxWidth);labelWidth=Math.max(labelWidth,info.width);labelHeight=Math.max(labelHeight,info.height)}axis.labelWidth=opts.labelWidth||labelWidth;axis.labelHeight=opts.labelHeight||labelHeight}function allocateAxisBoxFirstPhase(axis){var lw=axis.labelWidth,lh=axis.labelHeight,pos=axis.options.position,isXAxis=axis.direction==="x",tickLength=axis.options.tickLength,axisMargin=options.grid.axisMargin,padding=options.grid.labelMargin,innermost=true,outermost=true,first=true,found=false;$.each(isXAxis?xaxes:yaxes,function(i,a){if(a&&a.reserveSpace){if(a===axis){found=true}else if(a.options.position===pos){if(found){outermost=false}else{innermost=false}}if(!found){first=false}}});if(outermost){axisMargin=0}if(tickLength==null){tickLength=first?"full":5}if(!isNaN(+tickLength))padding+=+tickLength;if(isXAxis){lh+=padding;if(pos=="bottom"){plotOffset.bottom+=lh+axisMargin;axis.box={top:surface.height-plotOffset.bottom,height:lh}}else{axis.box={top:plotOffset.top+axisMargin,height:lh};plotOffset.top+=lh+axisMargin}}else{lw+=padding;if(pos=="left"){axis.box={left:plotOffset.left+axisMargin,width:lw};plotOffset.left+=lw+axisMargin}else{plotOffset.right+=lw+axisMargin;axis.box={left:surface.width-plotOffset.right,width:lw}}}axis.position=pos;axis.tickLength=tickLength;axis.box.padding=padding;axis.innermost=innermost}function allocateAxisBoxSecondPhase(axis){if(axis.direction=="x"){axis.box.left=plotOffset.left-axis.labelWidth/2;axis.box.width=surface.width-plotOffset.left-plotOffset.right+axis.labelWidth}else{axis.box.top=plotOffset.top-axis.labelHeight/2;axis.box.height=surface.height-plotOffset.bottom-plotOffset.top+axis.labelHeight}}function adjustLayoutForThingsStickingOut(){var minMargin=options.grid.minBorderMargin,axis,i;if(minMargin==null){minMargin=0;for(i=0;i<series.length;++i)minMargin=Math.max(minMargin,2*(series[i].points.radius+series[i].points.lineWidth/2))}var margins={left:minMargin,right:minMargin,top:minMargin,bottom:minMargin};$.each(allAxes(),function(_,axis){if(axis.reserveSpace&&axis.ticks&&axis.ticks.length){var lastTick=axis.ticks[axis.ticks.length-1];if(axis.direction==="x"){margins.left=Math.max(margins.left,axis.labelWidth/2);if(lastTick.v<=axis.max){margins.right=Math.max(margins.right,axis.labelWidth/2)}}else{margins.bottom=Math.max(margins.bottom,axis.labelHeight/2);if(lastTick.v<=axis.max){margins.top=Math.max(margins.top,axis.labelHeight/2)}}}});plotOffset.left=Math.ceil(Math.max(margins.left,plotOffset.left));plotOffset.right=Math.ceil(Math.max(margins.right,plotOffset.right));plotOffset.top=Math.ceil(Math.max(margins.top,plotOffset.top));plotOffset.bottom=Math.ceil(Math.max(margins.bottom,plotOffset.bottom))}function setupGrid(){var i,axes=allAxes(),showGrid=options.grid.show;for(var a in plotOffset){var margin=options.grid.margin||0;plotOffset[a]=typeof margin=="number"?margin:margin[a]||0}executeHooks(hooks.processOffset,[plotOffset]);for(var a in plotOffset){if(typeof options.grid.borderWidth=="object"){plotOffset[a]+=showGrid?options.grid.borderWidth[a]:0}else{plotOffset[a]+=showGrid?options.grid.borderWidth:0}}$.each(axes,function(_,axis){axis.show=axis.options.show;if(axis.show==null)axis.show=axis.used;axis.reserveSpace=axis.show||axis.options.reserveSpace;setRange(axis)});if(showGrid){var allocatedAxes=$.grep(axes,function(axis){return axis.reserveSpace});$.each(allocatedAxes,function(_,axis){setupTickGeneration(axis);setTicks(axis);snapRangeToTicks(axis,axis.ticks);measureTickLabels(axis)});for(i=allocatedAxes.length-1;i>=0;--i)allocateAxisBoxFirstPhase(allocatedAxes[i]);adjustLayoutForThingsStickingOut();$.each(allocatedAxes,function(_,axis){allocateAxisBoxSecondPhase(axis)})}plotWidth=surface.width-plotOffset.left-plotOffset.right;plotHeight=surface.height-plotOffset.bottom-plotOffset.top;$.each(axes,function(_,axis){setTransformationHelpers(axis)});if(showGrid){drawAxisLabels()}insertLegend()}function setRange(axis){var opts=axis.options,min=+(opts.min!=null?opts.min:axis.datamin),max=+(opts.max!=null?opts.max:axis.datamax),delta=max-min;if(delta==0){var widen=max==0?1:.01;if(opts.min==null)min-=widen;if(opts.max==null||opts.min!=null)max+=widen}else{var margin=opts.autoscaleMargin;if(margin!=null){if(opts.min==null){min-=delta*margin;if(min<0&&axis.datamin!=null&&axis.datamin>=0)min=0}if(opts.max==null){max+=delta*margin;if(max>0&&axis.datamax!=null&&axis.datamax<=0)max=0}}}axis.min=min;axis.max=max}function setupTickGeneration(axis){var opts=axis.options;var noTicks;if(typeof opts.ticks=="number"&&opts.ticks>0)noTicks=opts.ticks;else noTicks=.3*Math.sqrt(axis.direction=="x"?surface.width:surface.height);var delta=(axis.max-axis.min)/noTicks,dec=-Math.floor(Math.log(delta)/Math.LN10),maxDec=opts.tickDecimals;if(maxDec!=null&&dec>maxDec){dec=maxDec}var magn=Math.pow(10,-dec),norm=delta/magn,size;if(norm<1.5){size=1}else if(norm<3){size=2;if(norm>2.25&&(maxDec==null||dec+1<=maxDec)){size=2.5;++dec}}else if(norm<7.5){size=5}else{size=10}size*=magn;if(opts.minTickSize!=null&&size<opts.minTickSize){size=opts.minTickSize}axis.delta=delta;axis.tickDecimals=Math.max(0,maxDec!=null?maxDec:dec);axis.tickSize=opts.tickSize||size;if(opts.mode=="time"&&!axis.tickGenerator){throw new Error("Time mode requires the flot.time plugin.")}if(!axis.tickGenerator){axis.tickGenerator=function(axis){var ticks=[],start=floorInBase(axis.min,axis.tickSize),i=0,v=Number.NaN,prev;do{prev=v;v=start+i*axis.tickSize;ticks.push(v);++i}while(v<axis.max&&v!=prev);return ticks};axis.tickFormatter=function(value,axis){var factor=axis.tickDecimals?Math.pow(10,axis.tickDecimals):1;var formatted=""+Math.round(value*factor)/factor;if(axis.tickDecimals!=null){var decimal=formatted.indexOf(".");var precision=decimal==-1?0:formatted.length-decimal-1;if(precision<axis.tickDecimals){return(precision?formatted:formatted+".")+(""+factor).substr(1,axis.tickDecimals-precision)}}return formatted}}if($.isFunction(opts.tickFormatter))axis.tickFormatter=function(v,axis){return""+opts.tickFormatter(v,axis)};if(opts.alignTicksWithAxis!=null){var otherAxis=(axis.direction=="x"?xaxes:yaxes)[opts.alignTicksWithAxis-1];if(otherAxis&&otherAxis.used&&otherAxis!=axis){var niceTicks=axis.tickGenerator(axis);if(niceTicks.length>0){if(opts.min==null)axis.min=Math.min(axis.min,niceTicks[0]);if(opts.max==null&&niceTicks.length>1)axis.max=Math.max(axis.max,niceTicks[niceTicks.length-1])}axis.tickGenerator=function(axis){var ticks=[],v,i;for(i=0;i<otherAxis.ticks.length;++i){v=(otherAxis.ticks[i].v-otherAxis.min)/(otherAxis.max-otherAxis.min);v=axis.min+v*(axis.max-axis.min);ticks.push(v)}return ticks};if(!axis.mode&&opts.tickDecimals==null){var extraDec=Math.max(0,-Math.floor(Math.log(axis.delta)/Math.LN10)+1),ts=axis.tickGenerator(axis);if(!(ts.length>1&&/\..*0$/.test((ts[1]-ts[0]).toFixed(extraDec))))axis.tickDecimals=extraDec}}}}function setTicks(axis){var oticks=axis.options.ticks,ticks=[];if(oticks==null||typeof oticks=="number"&&oticks>0)ticks=axis.tickGenerator(axis);else if(oticks){if($.isFunction(oticks))ticks=oticks(axis);else ticks=oticks}var i,v;axis.ticks=[];for(i=0;i<ticks.length;++i){var label=null;var t=ticks[i];if(typeof t=="object"){v=+t[0];if(t.length>1)label=t[1]}else v=+t;if(label==null)label=axis.tickFormatter(v,axis);if(!isNaN(v))axis.ticks.push({v:v,label:label})}}function snapRangeToTicks(axis,ticks){if(axis.options.autoscaleMargin&&ticks.length>0){if(axis.options.min==null)axis.min=Math.min(axis.min,ticks[0].v);if(axis.options.max==null&&ticks.length>1)axis.max=Math.max(axis.max,ticks[ticks.length-1].v)}}function draw(){surface.clear();executeHooks(hooks.drawBackground,[ctx]);var grid=options.grid;if(grid.show&&grid.backgroundColor)drawBackground();if(grid.show&&!grid.aboveData){drawGrid()}for(var i=0;i<series.length;++i){executeHooks(hooks.drawSeries,[ctx,series[i]]);drawSeries(series[i])}executeHooks(hooks.draw,[ctx]);if(grid.show&&grid.aboveData){drawGrid()}surface.render();triggerRedrawOverlay()}function extractRange(ranges,coord){var axis,from,to,key,axes=allAxes();for(var i=0;i<axes.length;++i){axis=axes[i];if(axis.direction==coord){key=coord+axis.n+"axis";if(!ranges[key]&&axis.n==1)key=coord+"axis";if(ranges[key]){from=ranges[key].from;to=ranges[key].to;break}}}if(!ranges[key]){axis=coord=="x"?xaxes[0]:yaxes[0];from=ranges[coord+"1"];to=ranges[coord+"2"]}if(from!=null&&to!=null&&from>to){var tmp=from;from=to;to=tmp}return{from:from,to:to,axis:axis}}function drawBackground(){ctx.save();ctx.translate(plotOffset.left,plotOffset.top);ctx.fillStyle=getColorOrGradient(options.grid.backgroundColor,plotHeight,0,"rgba(255, 255, 255, 0)");ctx.fillRect(0,0,plotWidth,plotHeight);ctx.restore()}function drawGrid(){var i,axes,bw,bc;ctx.save();ctx.translate(plotOffset.left,plotOffset.top);var markings=options.grid.markings;if(markings){if($.isFunction(markings)){axes=plot.getAxes();axes.xmin=axes.xaxis.min;axes.xmax=axes.xaxis.max;axes.ymin=axes.yaxis.min;axes.ymax=axes.yaxis.max;markings=markings(axes)}for(i=0;i<markings.length;++i){var m=markings[i],xrange=extractRange(m,"x"),yrange=extractRange(m,"y");if(xrange.from==null)xrange.from=xrange.axis.min;if(xrange.to==null)xrange.to=xrange.axis.max;if(yrange.from==null)yrange.from=yrange.axis.min;if(yrange.to==null)yrange.to=yrange.axis.max;if(xrange.to<xrange.axis.min||xrange.from>xrange.axis.max||yrange.to<yrange.axis.min||yrange.from>yrange.axis.max)continue;xrange.from=Math.max(xrange.from,xrange.axis.min);xrange.to=Math.min(xrange.to,xrange.axis.max);
2
+ yrange.from=Math.max(yrange.from,yrange.axis.min);yrange.to=Math.min(yrange.to,yrange.axis.max);if(xrange.from==xrange.to&&yrange.from==yrange.to)continue;xrange.from=xrange.axis.p2c(xrange.from);xrange.to=xrange.axis.p2c(xrange.to);yrange.from=yrange.axis.p2c(yrange.from);yrange.to=yrange.axis.p2c(yrange.to);if(xrange.from==xrange.to||yrange.from==yrange.to){ctx.beginPath();ctx.strokeStyle=m.color||options.grid.markingsColor;ctx.lineWidth=m.lineWidth||options.grid.markingsLineWidth;ctx.moveTo(xrange.from,yrange.from);ctx.lineTo(xrange.to,yrange.to);ctx.stroke()}else{ctx.fillStyle=m.color||options.grid.markingsColor;ctx.fillRect(xrange.from,yrange.to,xrange.to-xrange.from,yrange.from-yrange.to)}}}axes=allAxes();bw=options.grid.borderWidth;for(var j=0;j<axes.length;++j){var axis=axes[j],box=axis.box,t=axis.tickLength,x,y,xoff,yoff;if(!axis.show||axis.ticks.length==0)continue;ctx.lineWidth=1;if(axis.direction=="x"){x=0;if(t=="full")y=axis.position=="top"?0:plotHeight;else y=box.top-plotOffset.top+(axis.position=="top"?box.height:0)}else{y=0;if(t=="full")x=axis.position=="left"?0:plotWidth;else x=box.left-plotOffset.left+(axis.position=="left"?box.width:0)}if(!axis.innermost){ctx.strokeStyle=axis.options.color;ctx.beginPath();xoff=yoff=0;if(axis.direction=="x")xoff=plotWidth+1;else yoff=plotHeight+1;if(ctx.lineWidth==1){if(axis.direction=="x"){y=Math.floor(y)+.5}else{x=Math.floor(x)+.5}}ctx.moveTo(x,y);ctx.lineTo(x+xoff,y+yoff);ctx.stroke()}ctx.strokeStyle=axis.options.tickColor;ctx.beginPath();for(i=0;i<axis.ticks.length;++i){var v=axis.ticks[i].v;xoff=yoff=0;if(isNaN(v)||v<axis.min||v>axis.max||t=="full"&&(typeof bw=="object"&&bw[axis.position]>0||bw>0)&&(v==axis.min||v==axis.max))continue;if(axis.direction=="x"){x=axis.p2c(v);yoff=t=="full"?-plotHeight:t;if(axis.position=="top")yoff=-yoff}else{y=axis.p2c(v);xoff=t=="full"?-plotWidth:t;if(axis.position=="left")xoff=-xoff}if(ctx.lineWidth==1){if(axis.direction=="x")x=Math.floor(x)+.5;else y=Math.floor(y)+.5}ctx.moveTo(x,y);ctx.lineTo(x+xoff,y+yoff)}ctx.stroke()}if(bw){bc=options.grid.borderColor;if(typeof bw=="object"||typeof bc=="object"){if(typeof bw!=="object"){bw={top:bw,right:bw,bottom:bw,left:bw}}if(typeof bc!=="object"){bc={top:bc,right:bc,bottom:bc,left:bc}}if(bw.top>0){ctx.strokeStyle=bc.top;ctx.lineWidth=bw.top;ctx.beginPath();ctx.moveTo(0-bw.left,0-bw.top/2);ctx.lineTo(plotWidth,0-bw.top/2);ctx.stroke()}if(bw.right>0){ctx.strokeStyle=bc.right;ctx.lineWidth=bw.right;ctx.beginPath();ctx.moveTo(plotWidth+bw.right/2,0-bw.top);ctx.lineTo(plotWidth+bw.right/2,plotHeight);ctx.stroke()}if(bw.bottom>0){ctx.strokeStyle=bc.bottom;ctx.lineWidth=bw.bottom;ctx.beginPath();ctx.moveTo(plotWidth+bw.right,plotHeight+bw.bottom/2);ctx.lineTo(0,plotHeight+bw.bottom/2);ctx.stroke()}if(bw.left>0){ctx.strokeStyle=bc.left;ctx.lineWidth=bw.left;ctx.beginPath();ctx.moveTo(0-bw.left/2,plotHeight+bw.bottom);ctx.lineTo(0-bw.left/2,0);ctx.stroke()}}else{ctx.lineWidth=bw;ctx.strokeStyle=options.grid.borderColor;ctx.strokeRect(-bw/2,-bw/2,plotWidth+bw,plotHeight+bw)}}ctx.restore()}function drawAxisLabels(){$.each(allAxes(),function(_,axis){var box=axis.box,legacyStyles=axis.direction+"Axis "+axis.direction+axis.n+"Axis",layer="flot-"+axis.direction+"-axis flot-"+axis.direction+axis.n+"-axis "+legacyStyles,font=axis.options.font||"flot-tick-label tickLabel",tick,x,y,halign,valign;surface.removeText(layer);if(!axis.show||axis.ticks.length==0)return;for(var i=0;i<axis.ticks.length;++i){tick=axis.ticks[i];if(!tick.label||tick.v<axis.min||tick.v>axis.max)continue;if(axis.direction=="x"){halign="center";x=plotOffset.left+axis.p2c(tick.v);if(axis.position=="bottom"){y=box.top+box.padding}else{y=box.top+box.height-box.padding;valign="bottom"}}else{valign="middle";y=plotOffset.top+axis.p2c(tick.v);if(axis.position=="left"){x=box.left+box.width-box.padding;halign="right"}else{x=box.left+box.padding}}surface.addText(layer,x,y,tick.label,font,null,null,halign,valign)}})}function drawSeries(series){if(series.lines.show)drawSeriesLines(series);if(series.bars.show)drawSeriesBars(series);if(series.points.show)drawSeriesPoints(series)}function drawSeriesLines(series){function plotLine(datapoints,xoffset,yoffset,axisx,axisy){var points=datapoints.points,ps=datapoints.pointsize,prevx=null,prevy=null;ctx.beginPath();for(var i=ps;i<points.length;i+=ps){var x1=points[i-ps],y1=points[i-ps+1],x2=points[i],y2=points[i+1];if(x1==null||x2==null)continue;if(y1<=y2&&y1<axisy.min){if(y2<axisy.min)continue;x1=(axisy.min-y1)/(y2-y1)*(x2-x1)+x1;y1=axisy.min}else if(y2<=y1&&y2<axisy.min){if(y1<axisy.min)continue;x2=(axisy.min-y1)/(y2-y1)*(x2-x1)+x1;y2=axisy.min}if(y1>=y2&&y1>axisy.max){if(y2>axisy.max)continue;x1=(axisy.max-y1)/(y2-y1)*(x2-x1)+x1;y1=axisy.max}else if(y2>=y1&&y2>axisy.max){if(y1>axisy.max)continue;x2=(axisy.max-y1)/(y2-y1)*(x2-x1)+x1;y2=axisy.max}if(x1<=x2&&x1<axisx.min){if(x2<axisx.min)continue;y1=(axisx.min-x1)/(x2-x1)*(y2-y1)+y1;x1=axisx.min}else if(x2<=x1&&x2<axisx.min){if(x1<axisx.min)continue;y2=(axisx.min-x1)/(x2-x1)*(y2-y1)+y1;x2=axisx.min}if(x1>=x2&&x1>axisx.max){if(x2>axisx.max)continue;y1=(axisx.max-x1)/(x2-x1)*(y2-y1)+y1;x1=axisx.max}else if(x2>=x1&&x2>axisx.max){if(x1>axisx.max)continue;y2=(axisx.max-x1)/(x2-x1)*(y2-y1)+y1;x2=axisx.max}if(x1!=prevx||y1!=prevy)ctx.moveTo(axisx.p2c(x1)+xoffset,axisy.p2c(y1)+yoffset);prevx=x2;prevy=y2;ctx.lineTo(axisx.p2c(x2)+xoffset,axisy.p2c(y2)+yoffset)}ctx.stroke()}function plotLineArea(datapoints,axisx,axisy){var points=datapoints.points,ps=datapoints.pointsize,bottom=Math.min(Math.max(0,axisy.min),axisy.max),i=0,top,areaOpen=false,ypos=1,segmentStart=0,segmentEnd=0;while(true){if(ps>0&&i>points.length+ps)break;i+=ps;var x1=points[i-ps],y1=points[i-ps+ypos],x2=points[i],y2=points[i+ypos];if(areaOpen){if(ps>0&&x1!=null&&x2==null){segmentEnd=i;ps=-ps;ypos=2;continue}if(ps<0&&i==segmentStart+ps){ctx.fill();areaOpen=false;ps=-ps;ypos=1;i=segmentStart=segmentEnd+ps;continue}}if(x1==null||x2==null)continue;if(x1<=x2&&x1<axisx.min){if(x2<axisx.min)continue;y1=(axisx.min-x1)/(x2-x1)*(y2-y1)+y1;x1=axisx.min}else if(x2<=x1&&x2<axisx.min){if(x1<axisx.min)continue;y2=(axisx.min-x1)/(x2-x1)*(y2-y1)+y1;x2=axisx.min}if(x1>=x2&&x1>axisx.max){if(x2>axisx.max)continue;y1=(axisx.max-x1)/(x2-x1)*(y2-y1)+y1;x1=axisx.max}else if(x2>=x1&&x2>axisx.max){if(x1>axisx.max)continue;y2=(axisx.max-x1)/(x2-x1)*(y2-y1)+y1;x2=axisx.max}if(!areaOpen){ctx.beginPath();ctx.moveTo(axisx.p2c(x1),axisy.p2c(bottom));areaOpen=true}if(y1>=axisy.max&&y2>=axisy.max){ctx.lineTo(axisx.p2c(x1),axisy.p2c(axisy.max));ctx.lineTo(axisx.p2c(x2),axisy.p2c(axisy.max));continue}else if(y1<=axisy.min&&y2<=axisy.min){ctx.lineTo(axisx.p2c(x1),axisy.p2c(axisy.min));ctx.lineTo(axisx.p2c(x2),axisy.p2c(axisy.min));continue}var x1old=x1,x2old=x2;if(y1<=y2&&y1<axisy.min&&y2>=axisy.min){x1=(axisy.min-y1)/(y2-y1)*(x2-x1)+x1;y1=axisy.min}else if(y2<=y1&&y2<axisy.min&&y1>=axisy.min){x2=(axisy.min-y1)/(y2-y1)*(x2-x1)+x1;y2=axisy.min}if(y1>=y2&&y1>axisy.max&&y2<=axisy.max){x1=(axisy.max-y1)/(y2-y1)*(x2-x1)+x1;y1=axisy.max}else if(y2>=y1&&y2>axisy.max&&y1<=axisy.max){x2=(axisy.max-y1)/(y2-y1)*(x2-x1)+x1;y2=axisy.max}if(x1!=x1old){ctx.lineTo(axisx.p2c(x1old),axisy.p2c(y1))}ctx.lineTo(axisx.p2c(x1),axisy.p2c(y1));ctx.lineTo(axisx.p2c(x2),axisy.p2c(y2));if(x2!=x2old){ctx.lineTo(axisx.p2c(x2),axisy.p2c(y2));ctx.lineTo(axisx.p2c(x2old),axisy.p2c(y2))}}}ctx.save();ctx.translate(plotOffset.left,plotOffset.top);ctx.lineJoin="round";var lw=series.lines.lineWidth,sw=series.shadowSize;if(lw>0&&sw>0){ctx.lineWidth=sw;ctx.strokeStyle="rgba(0,0,0,0.1)";var angle=Math.PI/18;plotLine(series.datapoints,Math.sin(angle)*(lw/2+sw/2),Math.cos(angle)*(lw/2+sw/2),series.xaxis,series.yaxis);ctx.lineWidth=sw/2;plotLine(series.datapoints,Math.sin(angle)*(lw/2+sw/4),Math.cos(angle)*(lw/2+sw/4),series.xaxis,series.yaxis)}ctx.lineWidth=lw;ctx.strokeStyle=series.color;var fillStyle=getFillStyle(series.lines,series.color,0,plotHeight);if(fillStyle){ctx.fillStyle=fillStyle;plotLineArea(series.datapoints,series.xaxis,series.yaxis)}if(lw>0)plotLine(series.datapoints,0,0,series.xaxis,series.yaxis);ctx.restore()}function drawSeriesPoints(series){function plotPoints(datapoints,radius,fillStyle,offset,shadow,axisx,axisy,symbol){var points=datapoints.points,ps=datapoints.pointsize;for(var i=0;i<points.length;i+=ps){var x=points[i],y=points[i+1];if(x==null||x<axisx.min||x>axisx.max||y<axisy.min||y>axisy.max)continue;ctx.beginPath();x=axisx.p2c(x);y=axisy.p2c(y)+offset;if(symbol=="circle")ctx.arc(x,y,radius,0,shadow?Math.PI:Math.PI*2,false);else symbol(ctx,x,y,radius,shadow);ctx.closePath();if(fillStyle){ctx.fillStyle=fillStyle;ctx.fill()}ctx.stroke()}}ctx.save();ctx.translate(plotOffset.left,plotOffset.top);var lw=series.points.lineWidth,sw=series.shadowSize,radius=series.points.radius,symbol=series.points.symbol;if(lw==0)lw=1e-4;if(lw>0&&sw>0){var w=sw/2;ctx.lineWidth=w;ctx.strokeStyle="rgba(0,0,0,0.1)";plotPoints(series.datapoints,radius,null,w+w/2,true,series.xaxis,series.yaxis,symbol);ctx.strokeStyle="rgba(0,0,0,0.2)";plotPoints(series.datapoints,radius,null,w/2,true,series.xaxis,series.yaxis,symbol)}ctx.lineWidth=lw;ctx.strokeStyle=series.color;plotPoints(series.datapoints,radius,getFillStyle(series.points,series.color),0,false,series.xaxis,series.yaxis,symbol);ctx.restore()}function drawBar(x,y,b,barLeft,barRight,fillStyleCallback,axisx,axisy,c,horizontal,lineWidth){var left,right,bottom,top,drawLeft,drawRight,drawTop,drawBottom,tmp;if(horizontal){drawBottom=drawRight=drawTop=true;drawLeft=false;left=b;right=x;top=y+barLeft;bottom=y+barRight;if(right<left){tmp=right;right=left;left=tmp;drawLeft=true;drawRight=false}}else{drawLeft=drawRight=drawTop=true;drawBottom=false;left=x+barLeft;right=x+barRight;bottom=b;top=y;if(top<bottom){tmp=top;top=bottom;bottom=tmp;drawBottom=true;drawTop=false}}if(right<axisx.min||left>axisx.max||top<axisy.min||bottom>axisy.max)return;if(left<axisx.min){left=axisx.min;drawLeft=false}if(right>axisx.max){right=axisx.max;drawRight=false}if(bottom<axisy.min){bottom=axisy.min;drawBottom=false}if(top>axisy.max){top=axisy.max;drawTop=false}left=axisx.p2c(left);bottom=axisy.p2c(bottom);right=axisx.p2c(right);top=axisy.p2c(top);if(fillStyleCallback){c.fillStyle=fillStyleCallback(bottom,top);c.fillRect(left,top,right-left,bottom-top)}if(lineWidth>0&&(drawLeft||drawRight||drawTop||drawBottom)){c.beginPath();c.moveTo(left,bottom);if(drawLeft)c.lineTo(left,top);else c.moveTo(left,top);if(drawTop)c.lineTo(right,top);else c.moveTo(right,top);if(drawRight)c.lineTo(right,bottom);else c.moveTo(right,bottom);if(drawBottom)c.lineTo(left,bottom);else c.moveTo(left,bottom);c.stroke()}}function drawSeriesBars(series){function plotBars(datapoints,barLeft,barRight,fillStyleCallback,axisx,axisy){var points=datapoints.points,ps=datapoints.pointsize;for(var i=0;i<points.length;i+=ps){if(points[i]==null)continue;drawBar(points[i],points[i+1],points[i+2],barLeft,barRight,fillStyleCallback,axisx,axisy,ctx,series.bars.horizontal,series.bars.lineWidth)}}ctx.save();ctx.translate(plotOffset.left,plotOffset.top);ctx.lineWidth=series.bars.lineWidth;ctx.strokeStyle=series.color;var barLeft;switch(series.bars.align){case"left":barLeft=0;break;case"right":barLeft=-series.bars.barWidth;break;default:barLeft=-series.bars.barWidth/2}var fillStyleCallback=series.bars.fill?function(bottom,top){return getFillStyle(series.bars,series.color,bottom,top)}:null;plotBars(series.datapoints,barLeft,barLeft+series.bars.barWidth,fillStyleCallback,series.xaxis,series.yaxis);ctx.restore()}function getFillStyle(filloptions,seriesColor,bottom,top){var fill=filloptions.fill;if(!fill)return null;if(filloptions.fillColor)return getColorOrGradient(filloptions.fillColor,bottom,top,seriesColor);var c=$.color.parse(seriesColor);c.a=typeof fill=="number"?fill:.4;c.normalize();return c.toString()}function insertLegend(){if(options.legend.container!=null){$(options.legend.container).html("")}else{placeholder.find(".legend").remove()}if(!options.legend.show){return}var fragments=[],entries=[],rowStarted=false,lf=options.legend.labelFormatter,s,label;for(var i=0;i<series.length;++i){s=series[i];if(s.label){label=lf?lf(s.label,s):s.label;if(label){entries.push({label:label,color:s.color})}}}if(options.legend.sorted){if($.isFunction(options.legend.sorted)){entries.sort(options.legend.sorted)}else if(options.legend.sorted=="reverse"){entries.reverse()}else{var ascending=options.legend.sorted!="descending";entries.sort(function(a,b){return a.label==b.label?0:a.label<b.label!=ascending?1:-1})}}for(var i=0;i<entries.length;++i){var entry=entries[i];if(i%options.legend.noColumns==0){if(rowStarted)fragments.push("</tr>");fragments.push("<tr>");rowStarted=true}fragments.push('<td class="legendColorBox"><div style="border:1px solid '+options.legend.labelBoxBorderColor+';padding:1px"><div style="width:4px;height:0;border:5px solid '+entry.color+';overflow:hidden"></div></div></td>'+'<td class="legendLabel">'+entry.label+"</td>")}if(rowStarted)fragments.push("</tr>");if(fragments.length==0)return;var table='<table style="font-size:smaller;color:'+options.grid.color+'">'+fragments.join("")+"</table>";if(options.legend.container!=null)$(options.legend.container).html(table);else{var pos="",p=options.legend.position,m=options.legend.margin;if(m[0]==null)m=[m,m];if(p.charAt(0)=="n")pos+="top:"+(m[1]+plotOffset.top)+"px;";else if(p.charAt(0)=="s")pos+="bottom:"+(m[1]+plotOffset.bottom)+"px;";if(p.charAt(1)=="e")pos+="right:"+(m[0]+plotOffset.right)+"px;";else if(p.charAt(1)=="w")pos+="left:"+(m[0]+plotOffset.left)+"px;";var legend=$('<div class="legend">'+table.replace('style="','style="position:absolute;'+pos+";")+"</div>").appendTo(placeholder);if(options.legend.backgroundOpacity!=0){var c=options.legend.backgroundColor;if(c==null){c=options.grid.backgroundColor;if(c&&typeof c=="string")c=$.color.parse(c);else c=$.color.extract(legend,"background-color");c.a=1;c=c.toString()}var div=legend.children();$('<div style="position:absolute;width:'+div.width()+"px;height:"+div.height()+"px;"+pos+"background-color:"+c+';"> </div>').prependTo(legend).css("opacity",options.legend.backgroundOpacity)}}}var highlights=[],redrawTimeout=null;function findNearbyItem(mouseX,mouseY,seriesFilter){var maxDistance=options.grid.mouseActiveRadius,smallestDistance=maxDistance*maxDistance+1,item=null,foundPoint=false,i,j,ps;for(i=series.length-1;i>=0;--i){if(!seriesFilter(series[i]))continue;var s=series[i],axisx=s.xaxis,axisy=s.yaxis,points=s.datapoints.points,mx=axisx.c2p(mouseX),my=axisy.c2p(mouseY),maxx=maxDistance/axisx.scale,maxy=maxDistance/axisy.scale;ps=s.datapoints.pointsize;if(axisx.options.inverseTransform)maxx=Number.MAX_VALUE;if(axisy.options.inverseTransform)maxy=Number.MAX_VALUE;if(s.lines.show||s.points.show){for(j=0;j<points.length;j+=ps){var x=points[j],y=points[j+1];if(x==null)continue;if(x-mx>maxx||x-mx<-maxx||y-my>maxy||y-my<-maxy)continue;var dx=Math.abs(axisx.p2c(x)-mouseX),dy=Math.abs(axisy.p2c(y)-mouseY),dist=dx*dx+dy*dy;if(dist<smallestDistance){smallestDistance=dist;item=[i,j/ps]}}}if(s.bars.show&&!item){var barLeft,barRight;switch(s.bars.align){case"left":barLeft=0;break;case"right":barLeft=-s.bars.barWidth;break;default:barLeft=-s.bars.barWidth/2}barRight=barLeft+s.bars.barWidth;for(j=0;j<points.length;j+=ps){var x=points[j],y=points[j+1],b=points[j+2];if(x==null)continue;if(series[i].bars.horizontal?mx<=Math.max(b,x)&&mx>=Math.min(b,x)&&my>=y+barLeft&&my<=y+barRight:mx>=x+barLeft&&mx<=x+barRight&&my>=Math.min(b,y)&&my<=Math.max(b,y))item=[i,j/ps]}}}if(item){i=item[0];j=item[1];ps=series[i].datapoints.pointsize;return{datapoint:series[i].datapoints.points.slice(j*ps,(j+1)*ps),dataIndex:j,series:series[i],seriesIndex:i}}return null}function onMouseMove(e){if(options.grid.hoverable)triggerClickHoverEvent("plothover",e,function(s){return s["hoverable"]!=false})}function onMouseLeave(e){if(options.grid.hoverable)triggerClickHoverEvent("plothover",e,function(s){return false})}function onClick(e){triggerClickHoverEvent("plotclick",e,function(s){return s["clickable"]!=false})}function triggerClickHoverEvent(eventname,event,seriesFilter){var offset=eventHolder.offset(),canvasX=event.pageX-offset.left-plotOffset.left,canvasY=event.pageY-offset.top-plotOffset.top,pos=canvasToAxisCoords({left:canvasX,top:canvasY});pos.pageX=event.pageX;pos.pageY=event.pageY;var item=findNearbyItem(canvasX,canvasY,seriesFilter);if(item){item.pageX=parseInt(item.series.xaxis.p2c(item.datapoint[0])+offset.left+plotOffset.left,10);item.pageY=parseInt(item.series.yaxis.p2c(item.datapoint[1])+offset.top+plotOffset.top,10)}if(options.grid.autoHighlight){for(var i=0;i<highlights.length;++i){var h=highlights[i];if(h.auto==eventname&&!(item&&h.series==item.series&&h.point[0]==item.datapoint[0]&&h.point[1]==item.datapoint[1]))unhighlight(h.series,h.point)}if(item)highlight(item.series,item.datapoint,eventname)}placeholder.trigger(eventname,[pos,item])}function triggerRedrawOverlay(){var t=options.interaction.redrawOverlayInterval;if(t==-1){drawOverlay();return}if(!redrawTimeout)redrawTimeout=setTimeout(drawOverlay,t)}function drawOverlay(){redrawTimeout=null;octx.save();overlay.clear();octx.translate(plotOffset.left,plotOffset.top);var i,hi;for(i=0;i<highlights.length;++i){hi=highlights[i];if(hi.series.bars.show)drawBarHighlight(hi.series,hi.point);else drawPointHighlight(hi.series,hi.point)}octx.restore();executeHooks(hooks.drawOverlay,[octx])}function highlight(s,point,auto){if(typeof s=="number")s=series[s];if(typeof point=="number"){var ps=s.datapoints.pointsize;point=s.datapoints.points.slice(ps*point,ps*(point+1))}var i=indexOfHighlight(s,point);if(i==-1){highlights.push({series:s,point:point,auto:auto});triggerRedrawOverlay()}else if(!auto)highlights[i].auto=false}function unhighlight(s,point){if(s==null&&point==null){highlights=[];triggerRedrawOverlay();return}if(typeof s=="number")s=series[s];if(typeof point=="number"){var ps=s.datapoints.pointsize;point=s.datapoints.points.slice(ps*point,ps*(point+1))}var i=indexOfHighlight(s,point);if(i!=-1){highlights.splice(i,1);triggerRedrawOverlay()}}function indexOfHighlight(s,p){for(var i=0;i<highlights.length;++i){var h=highlights[i];if(h.series==s&&h.point[0]==p[0]&&h.point[1]==p[1])return i}return-1}function drawPointHighlight(series,point){var x=point[0],y=point[1],axisx=series.xaxis,axisy=series.yaxis,highlightColor=typeof series.highlightColor==="string"?series.highlightColor:$.color.parse(series.color).scale("a",.5).toString();if(x<axisx.min||x>axisx.max||y<axisy.min||y>axisy.max)return;var pointRadius=series.points.radius+series.points.lineWidth/2;octx.lineWidth=pointRadius;octx.strokeStyle=highlightColor;var radius=1.5*pointRadius;x=axisx.p2c(x);y=axisy.p2c(y);octx.beginPath();if(series.points.symbol=="circle")octx.arc(x,y,radius,0,2*Math.PI,false);else series.points.symbol(octx,x,y,radius,false);octx.closePath();octx.stroke()}function drawBarHighlight(series,point){var highlightColor=typeof series.highlightColor==="string"?series.highlightColor:$.color.parse(series.color).scale("a",.5).toString(),fillStyle=highlightColor,barLeft;switch(series.bars.align){case"left":barLeft=0;break;case"right":barLeft=-series.bars.barWidth;break;default:barLeft=-series.bars.barWidth/2}octx.lineWidth=series.bars.lineWidth;octx.strokeStyle=highlightColor;drawBar(point[0],point[1],point[2]||0,barLeft,barLeft+series.bars.barWidth,function(){return fillStyle},series.xaxis,series.yaxis,octx,series.bars.horizontal,series.bars.lineWidth)}function getColorOrGradient(spec,bottom,top,defaultColor){if(typeof spec=="string")return spec;else{var gradient=ctx.createLinearGradient(0,top,0,bottom);for(var i=0,l=spec.colors.length;i<l;++i){var c=spec.colors[i];if(typeof c!="string"){var co=$.color.parse(defaultColor);if(c.brightness!=null)co=co.scale("rgb",c.brightness);if(c.opacity!=null)co.a*=c.opacity;c=co.toString()}gradient.addColorStop(i/(l-1),c)}return gradient}}}$.plot=function(placeholder,data,options){var plot=new Plot($(placeholder),data,options,$.plot.plugins);return plot};$.plot.version="0.8.2";$.plot.plugins=[];$.fn.plot=function(data,options){return this.each(function(){$.plot(this,data,options)})};function floorInBase(n,base){return base*Math.floor(n/base)}})(jQuery);
@@ -0,0 +1,346 @@
1
+ /* Flot plugin for adding the ability to pan and zoom the plot.
2
+
3
+ Copyright (c) 2007-2013 IOLA and Ole Laursen.
4
+ Licensed under the MIT license.
5
+
6
+ The default behaviour is double click and scrollwheel up/down to zoom in, drag
7
+ to pan. The plugin defines plot.zoom({ center }), plot.zoomOut() and
8
+ plot.pan( offset ) so you easily can add custom controls. It also fires
9
+ "plotpan" and "plotzoom" events, useful for synchronizing plots.
10
+
11
+ The plugin supports these options:
12
+
13
+ zoom: {
14
+ interactive: false
15
+ trigger: "dblclick" // or "click" for single click
16
+ amount: 1.5 // 2 = 200% (zoom in), 0.5 = 50% (zoom out)
17
+ }
18
+
19
+ pan: {
20
+ interactive: false
21
+ cursor: "move" // CSS mouse cursor value used when dragging, e.g. "pointer"
22
+ frameRate: 20
23
+ }
24
+
25
+ xaxis, yaxis, x2axis, y2axis: {
26
+ zoomRange: null // or [ number, number ] (min range, max range) or false
27
+ panRange: null // or [ number, number ] (min, max) or false
28
+ }
29
+
30
+ "interactive" enables the built-in drag/click behaviour. If you enable
31
+ interactive for pan, then you'll have a basic plot that supports moving
32
+ around; the same for zoom.
33
+
34
+ "amount" specifies the default amount to zoom in (so 1.5 = 150%) relative to
35
+ the current viewport.
36
+
37
+ "cursor" is a standard CSS mouse cursor string used for visual feedback to the
38
+ user when dragging.
39
+
40
+ "frameRate" specifies the maximum number of times per second the plot will
41
+ update itself while the user is panning around on it (set to null to disable
42
+ intermediate pans, the plot will then not update until the mouse button is
43
+ released).
44
+
45
+ "zoomRange" is the interval in which zooming can happen, e.g. with zoomRange:
46
+ [1, 100] the zoom will never scale the axis so that the difference between min
47
+ and max is smaller than 1 or larger than 100. You can set either end to null
48
+ to ignore, e.g. [1, null]. If you set zoomRange to false, zooming on that axis
49
+ will be disabled.
50
+
51
+ "panRange" confines the panning to stay within a range, e.g. with panRange:
52
+ [-10, 20] panning stops at -10 in one end and at 20 in the other. Either can
53
+ be null, e.g. [-10, null]. If you set panRange to false, panning on that axis
54
+ will be disabled.
55
+
56
+ Example API usage:
57
+
58
+ plot = $.plot(...);
59
+
60
+ // zoom default amount in on the pixel ( 10, 20 )
61
+ plot.zoom({ center: { left: 10, top: 20 } });
62
+
63
+ // zoom out again
64
+ plot.zoomOut({ center: { left: 10, top: 20 } });
65
+
66
+ // zoom 200% in on the pixel (10, 20)
67
+ plot.zoom({ amount: 2, center: { left: 10, top: 20 } });
68
+
69
+ // pan 100 pixels to the left and 20 down
70
+ plot.pan({ left: -100, top: 20 })
71
+
72
+ Here, "center" specifies where the center of the zooming should happen. Note
73
+ that this is defined in pixel space, not the space of the data points (you can
74
+ use the p2c helpers on the axes in Flot to help you convert between these).
75
+
76
+ "amount" is the amount to zoom the viewport relative to the current range, so
77
+ 1 is 100% (i.e. no change), 1.5 is 150% (zoom in), 0.7 is 70% (zoom out). You
78
+ can set the default in the options.
79
+
80
+ */
81
+
82
+ // First two dependencies, jquery.event.drag.js and
83
+ // jquery.mousewheel.js, we put them inline here to save people the
84
+ // effort of downloading them.
85
+
86
+ /*
87
+ jquery.event.drag.js ~ v1.5 ~ Copyright (c) 2008, Three Dub Media (http://threedubmedia.com)
88
+ Licensed under the MIT License ~ http://threedubmedia.googlecode.com/files/MIT-LICENSE.txt
89
+ */
90
+ (function(a){function e(h){var k,j=this,l=h.data||{};if(l.elem)j=h.dragTarget=l.elem,h.dragProxy=d.proxy||j,h.cursorOffsetX=l.pageX-l.left,h.cursorOffsetY=l.pageY-l.top,h.offsetX=h.pageX-h.cursorOffsetX,h.offsetY=h.pageY-h.cursorOffsetY;else if(d.dragging||l.which>0&&h.which!=l.which||a(h.target).is(l.not))return;switch(h.type){case"mousedown":return a.extend(l,a(j).offset(),{elem:j,target:h.target,pageX:h.pageX,pageY:h.pageY}),b.add(document,"mousemove mouseup",e,l),i(j,!1),d.dragging=null,!1;case!d.dragging&&"mousemove":if(g(h.pageX-l.pageX)+g(h.pageY-l.pageY)<l.distance)break;h.target=l.target,k=f(h,"dragstart",j),k!==!1&&(d.dragging=j,d.proxy=h.dragProxy=a(k||j)[0]);case"mousemove":if(d.dragging){if(k=f(h,"drag",j),c.drop&&(c.drop.allowed=k!==!1,c.drop.handler(h)),k!==!1)break;h.type="mouseup"}case"mouseup":b.remove(document,"mousemove mouseup",e),d.dragging&&(c.drop&&c.drop.handler(h),f(h,"dragend",j)),i(j,!0),d.dragging=d.proxy=l.elem=!1}return!0}function f(b,c,d){b.type=c;var e=a.event.dispatch.call(d,b);return e===!1?!1:e||b.result}function g(a){return Math.pow(a,2)}function h(){return d.dragging===!1}function i(a,b){a&&(a.unselectable=b?"off":"on",a.onselectstart=function(){return b},a.style&&(a.style.MozUserSelect=b?"":"none"))}a.fn.drag=function(a,b,c){return b&&this.bind("dragstart",a),c&&this.bind("dragend",c),a?this.bind("drag",b?b:a):this.trigger("drag")};var b=a.event,c=b.special,d=c.drag={not:":input",distance:0,which:1,dragging:!1,setup:function(c){c=a.extend({distance:d.distance,which:d.which,not:d.not},c||{}),c.distance=g(c.distance),b.add(this,"mousedown",e,c),this.attachEvent&&this.attachEvent("ondragstart",h)},teardown:function(){b.remove(this,"mousedown",e),this===d.dragging&&(d.dragging=d.proxy=!1),i(this,!0),this.detachEvent&&this.detachEvent("ondragstart",h)}};c.dragstart=c.dragend={setup:function(){},teardown:function(){}}})(jQuery);
91
+
92
+ /* jquery.mousewheel.min.js
93
+ * Copyright (c) 2011 Brandon Aaron (http://brandonaaron.net)
94
+ * Licensed under the MIT License (LICENSE.txt).
95
+ * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
96
+ * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
97
+ * Thanks to: Seamus Leahy for adding deltaX and deltaY
98
+ *
99
+ * Version: 3.0.6
100
+ *
101
+ * Requires: 1.2.2+
102
+ */
103
+ (function(d){function e(a){var b=a||window.event,c=[].slice.call(arguments,1),f=0,e=0,g=0,a=d.event.fix(b);a.type="mousewheel";b.wheelDelta&&(f=b.wheelDelta/120);b.detail&&(f=-b.detail/3);g=f;void 0!==b.axis&&b.axis===b.HORIZONTAL_AXIS&&(g=0,e=-1*f);void 0!==b.wheelDeltaY&&(g=b.wheelDeltaY/120);void 0!==b.wheelDeltaX&&(e=-1*b.wheelDeltaX/120);c.unshift(a,f,e,g);return(d.event.dispatch||d.event.handle).apply(this,c)}var c=["DOMMouseScroll","mousewheel"];if(d.event.fixHooks)for(var h=c.length;h;)d.event.fixHooks[c[--h]]=d.event.mouseHooks;d.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=c.length;a;)this.addEventListener(c[--a],e,!1);else this.onmousewheel=e},teardown:function(){if(this.removeEventListener)for(var a=c.length;a;)this.removeEventListener(c[--a],e,!1);else this.onmousewheel=null}};d.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery);
104
+
105
+
106
+
107
+
108
+ (function ($) {
109
+ var options = {
110
+ xaxis: {
111
+ zoomRange: null, // or [number, number] (min range, max range)
112
+ panRange: null // or [number, number] (min, max)
113
+ },
114
+ zoom: {
115
+ interactive: false,
116
+ trigger: "dblclick", // or "click" for single click
117
+ amount: 1.5 // how much to zoom relative to current position, 2 = 200% (zoom in), 0.5 = 50% (zoom out)
118
+ },
119
+ pan: {
120
+ interactive: false,
121
+ cursor: "move",
122
+ frameRate: 20
123
+ }
124
+ };
125
+
126
+ function init(plot) {
127
+ function onZoomClick(e, zoomOut) {
128
+ var c = plot.offset();
129
+ c.left = e.pageX - c.left;
130
+ c.top = e.pageY - c.top;
131
+ if (zoomOut)
132
+ plot.zoomOut({ center: c });
133
+ else
134
+ plot.zoom({ center: c });
135
+ }
136
+
137
+ function onMouseWheel(e, delta) {
138
+ e.preventDefault();
139
+ onZoomClick(e, delta < 0);
140
+ return false;
141
+ }
142
+
143
+ var prevCursor = 'default', prevPageX = 0, prevPageY = 0,
144
+ panTimeout = null;
145
+
146
+ function onDragStart(e) {
147
+ if (e.which != 1) // only accept left-click
148
+ return false;
149
+ var c = plot.getPlaceholder().css('cursor');
150
+ if (c)
151
+ prevCursor = c;
152
+ plot.getPlaceholder().css('cursor', plot.getOptions().pan.cursor);
153
+ prevPageX = e.pageX;
154
+ prevPageY = e.pageY;
155
+ }
156
+
157
+ function onDrag(e) {
158
+ var frameRate = plot.getOptions().pan.frameRate;
159
+ if (panTimeout || !frameRate)
160
+ return;
161
+
162
+ panTimeout = setTimeout(function () {
163
+ plot.pan({ left: prevPageX - e.pageX,
164
+ top: prevPageY - e.pageY });
165
+ prevPageX = e.pageX;
166
+ prevPageY = e.pageY;
167
+
168
+ panTimeout = null;
169
+ }, 1 / frameRate * 1000);
170
+ }
171
+
172
+ function onDragEnd(e) {
173
+ if (panTimeout) {
174
+ clearTimeout(panTimeout);
175
+ panTimeout = null;
176
+ }
177
+
178
+ plot.getPlaceholder().css('cursor', prevCursor);
179
+ plot.pan({ left: prevPageX - e.pageX,
180
+ top: prevPageY - e.pageY });
181
+ }
182
+
183
+ function bindEvents(plot, eventHolder) {
184
+ var o = plot.getOptions();
185
+ if (o.zoom.interactive) {
186
+ eventHolder[o.zoom.trigger](onZoomClick);
187
+ eventHolder.mousewheel(onMouseWheel);
188
+ }
189
+
190
+ if (o.pan.interactive) {
191
+ eventHolder.bind("dragstart", { distance: 10 }, onDragStart);
192
+ eventHolder.bind("drag", onDrag);
193
+ eventHolder.bind("dragend", onDragEnd);
194
+ }
195
+ }
196
+
197
+ plot.zoomOut = function (args) {
198
+ if (!args)
199
+ args = {};
200
+
201
+ if (!args.amount)
202
+ args.amount = plot.getOptions().zoom.amount;
203
+
204
+ args.amount = 1 / args.amount;
205
+ plot.zoom(args);
206
+ };
207
+
208
+ plot.zoom = function (args) {
209
+ if (!args)
210
+ args = {};
211
+
212
+ var c = args.center,
213
+ amount = args.amount || plot.getOptions().zoom.amount,
214
+ w = plot.width(), h = plot.height();
215
+
216
+ if (!c)
217
+ c = { left: w / 2, top: h / 2 };
218
+
219
+ var xf = c.left / w,
220
+ yf = c.top / h,
221
+ minmax = {
222
+ x: {
223
+ min: c.left - xf * w / amount,
224
+ max: c.left + (1 - xf) * w / amount
225
+ },
226
+ y: {
227
+ min: c.top - yf * h / amount,
228
+ max: c.top + (1 - yf) * h / amount
229
+ }
230
+ };
231
+
232
+ $.each(plot.getAxes(), function(_, axis) {
233
+ var opts = axis.options,
234
+ min = minmax[axis.direction].min,
235
+ max = minmax[axis.direction].max,
236
+ zr = opts.zoomRange,
237
+ pr = opts.panRange;
238
+
239
+ if (zr === false) // no zooming on this axis
240
+ return;
241
+
242
+ min = axis.c2p(min);
243
+ max = axis.c2p(max);
244
+ if (min > max) {
245
+ // make sure min < max
246
+ var tmp = min;
247
+ min = max;
248
+ max = tmp;
249
+ }
250
+
251
+ //Check that we are in panRange
252
+ if (pr) {
253
+ if (pr[0] != null && min < pr[0]) {
254
+ min = pr[0];
255
+ }
256
+ if (pr[1] != null && max > pr[1]) {
257
+ max = pr[1];
258
+ }
259
+ }
260
+
261
+ var range = max - min;
262
+ if (zr &&
263
+ ((zr[0] != null && range < zr[0]) ||
264
+ (zr[1] != null && range > zr[1])))
265
+ return;
266
+
267
+ opts.min = min;
268
+ opts.max = max;
269
+ });
270
+
271
+ plot.setupGrid();
272
+ plot.draw();
273
+
274
+ if (!args.preventEvent)
275
+ plot.getPlaceholder().trigger("plotzoom", [ plot, args ]);
276
+ };
277
+
278
+ plot.pan = function (args) {
279
+ var delta = {
280
+ x: +args.left,
281
+ y: +args.top
282
+ };
283
+
284
+ if (isNaN(delta.x))
285
+ delta.x = 0;
286
+ if (isNaN(delta.y))
287
+ delta.y = 0;
288
+
289
+ $.each(plot.getAxes(), function (_, axis) {
290
+ var opts = axis.options,
291
+ min, max, d = delta[axis.direction];
292
+
293
+ min = axis.c2p(axis.p2c(axis.min) + d),
294
+ max = axis.c2p(axis.p2c(axis.max) + d);
295
+
296
+ var pr = opts.panRange;
297
+ if (pr === false) // no panning on this axis
298
+ return;
299
+
300
+ if (pr) {
301
+ // check whether we hit the wall
302
+ if (pr[0] != null && pr[0] > min) {
303
+ d = pr[0] - min;
304
+ min += d;
305
+ max += d;
306
+ }
307
+
308
+ if (pr[1] != null && pr[1] < max) {
309
+ d = pr[1] - max;
310
+ min += d;
311
+ max += d;
312
+ }
313
+ }
314
+
315
+ opts.min = min;
316
+ opts.max = max;
317
+ });
318
+
319
+ plot.setupGrid();
320
+ plot.draw();
321
+
322
+ if (!args.preventEvent)
323
+ plot.getPlaceholder().trigger("plotpan", [ plot, args ]);
324
+ };
325
+
326
+ function shutdown(plot, eventHolder) {
327
+ eventHolder.unbind(plot.getOptions().zoom.trigger, onZoomClick);
328
+ eventHolder.unbind("mousewheel", onMouseWheel);
329
+ eventHolder.unbind("dragstart", onDragStart);
330
+ eventHolder.unbind("drag", onDrag);
331
+ eventHolder.unbind("dragend", onDragEnd);
332
+ if (panTimeout)
333
+ clearTimeout(panTimeout);
334
+ }
335
+
336
+ plot.hooks.bindEvents.push(bindEvents);
337
+ plot.hooks.shutdown.push(shutdown);
338
+ }
339
+
340
+ $.plot.plugins.push({
341
+ init: init,
342
+ options: options,
343
+ name: 'navigate',
344
+ version: '1.3'
345
+ });
346
+ })(jQuery);
@@ -0,0 +1 @@
1
+ (function(a){function e(h){var k,j=this,l=h.data||{};if(l.elem)j=h.dragTarget=l.elem,h.dragProxy=d.proxy||j,h.cursorOffsetX=l.pageX-l.left,h.cursorOffsetY=l.pageY-l.top,h.offsetX=h.pageX-h.cursorOffsetX,h.offsetY=h.pageY-h.cursorOffsetY;else if(d.dragging||l.which>0&&h.which!=l.which||a(h.target).is(l.not))return;switch(h.type){case"mousedown":return a.extend(l,a(j).offset(),{elem:j,target:h.target,pageX:h.pageX,pageY:h.pageY}),b.add(document,"mousemove mouseup",e,l),i(j,!1),d.dragging=null,!1;case!d.dragging&&"mousemove":if(g(h.pageX-l.pageX)+g(h.pageY-l.pageY)<l.distance)break;h.target=l.target,k=f(h,"dragstart",j),k!==!1&&(d.dragging=j,d.proxy=h.dragProxy=a(k||j)[0]);case"mousemove":if(d.dragging){if(k=f(h,"drag",j),c.drop&&(c.drop.allowed=k!==!1,c.drop.handler(h)),k!==!1)break;h.type="mouseup"}case"mouseup":b.remove(document,"mousemove mouseup",e),d.dragging&&(c.drop&&c.drop.handler(h),f(h,"dragend",j)),i(j,!0),d.dragging=d.proxy=l.elem=!1}return!0}function f(b,c,d){b.type=c;var e=a.event.dispatch.call(d,b);return e===!1?!1:e||b.result}function g(a){return Math.pow(a,2)}function h(){return d.dragging===!1}function i(a,b){a&&(a.unselectable=b?"off":"on",a.onselectstart=function(){return b},a.style&&(a.style.MozUserSelect=b?"":"none"))}a.fn.drag=function(a,b,c){return b&&this.bind("dragstart",a),c&&this.bind("dragend",c),a?this.bind("drag",b?b:a):this.trigger("drag")};var b=a.event,c=b.special,d=c.drag={not:":input",distance:0,which:1,dragging:!1,setup:function(c){c=a.extend({distance:d.distance,which:d.which,not:d.not},c||{}),c.distance=g(c.distance),b.add(this,"mousedown",e,c),this.attachEvent&&this.attachEvent("ondragstart",h)},teardown:function(){b.remove(this,"mousedown",e),this===d.dragging&&(d.dragging=d.proxy=!1),i(this,!0),this.detachEvent&&this.detachEvent("ondragstart",h)}};c.dragstart=c.dragend={setup:function(){},teardown:function(){}}})(jQuery);(function(d){function e(a){var b=a||window.event,c=[].slice.call(arguments,1),f=0,e=0,g=0,a=d.event.fix(b);a.type="mousewheel";b.wheelDelta&&(f=b.wheelDelta/120);b.detail&&(f=-b.detail/3);g=f;void 0!==b.axis&&b.axis===b.HORIZONTAL_AXIS&&(g=0,e=-1*f);void 0!==b.wheelDeltaY&&(g=b.wheelDeltaY/120);void 0!==b.wheelDeltaX&&(e=-1*b.wheelDeltaX/120);c.unshift(a,f,e,g);return(d.event.dispatch||d.event.handle).apply(this,c)}var c=["DOMMouseScroll","mousewheel"];if(d.event.fixHooks)for(var h=c.length;h;)d.event.fixHooks[c[--h]]=d.event.mouseHooks;d.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=c.length;a;)this.addEventListener(c[--a],e,!1);else this.onmousewheel=e},teardown:function(){if(this.removeEventListener)for(var a=c.length;a;)this.removeEventListener(c[--a],e,!1);else this.onmousewheel=null}};d.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery);(function($){var options={xaxis:{zoomRange:null,panRange:null},zoom:{interactive:false,trigger:"dblclick",amount:1.5},pan:{interactive:false,cursor:"move",frameRate:20}};function init(plot){function onZoomClick(e,zoomOut){var c=plot.offset();c.left=e.pageX-c.left;c.top=e.pageY-c.top;if(zoomOut)plot.zoomOut({center:c});else plot.zoom({center:c})}function onMouseWheel(e,delta){e.preventDefault();onZoomClick(e,delta<0);return false}var prevCursor="default",prevPageX=0,prevPageY=0,panTimeout=null;function onDragStart(e){if(e.which!=1)return false;var c=plot.getPlaceholder().css("cursor");if(c)prevCursor=c;plot.getPlaceholder().css("cursor",plot.getOptions().pan.cursor);prevPageX=e.pageX;prevPageY=e.pageY}function onDrag(e){var frameRate=plot.getOptions().pan.frameRate;if(panTimeout||!frameRate)return;panTimeout=setTimeout(function(){plot.pan({left:prevPageX-e.pageX,top:prevPageY-e.pageY});prevPageX=e.pageX;prevPageY=e.pageY;panTimeout=null},1/frameRate*1e3)}function onDragEnd(e){if(panTimeout){clearTimeout(panTimeout);panTimeout=null}plot.getPlaceholder().css("cursor",prevCursor);plot.pan({left:prevPageX-e.pageX,top:prevPageY-e.pageY})}function bindEvents(plot,eventHolder){var o=plot.getOptions();if(o.zoom.interactive){eventHolder[o.zoom.trigger](onZoomClick);eventHolder.mousewheel(onMouseWheel)}if(o.pan.interactive){eventHolder.bind("dragstart",{distance:10},onDragStart);eventHolder.bind("drag",onDrag);eventHolder.bind("dragend",onDragEnd)}}plot.zoomOut=function(args){if(!args)args={};if(!args.amount)args.amount=plot.getOptions().zoom.amount;args.amount=1/args.amount;plot.zoom(args)};plot.zoom=function(args){if(!args)args={};var c=args.center,amount=args.amount||plot.getOptions().zoom.amount,w=plot.width(),h=plot.height();if(!c)c={left:w/2,top:h/2};var xf=c.left/w,yf=c.top/h,minmax={x:{min:c.left-xf*w/amount,max:c.left+(1-xf)*w/amount},y:{min:c.top-yf*h/amount,max:c.top+(1-yf)*h/amount}};$.each(plot.getAxes(),function(_,axis){var opts=axis.options,min=minmax[axis.direction].min,max=minmax[axis.direction].max,zr=opts.zoomRange,pr=opts.panRange;if(zr===false)return;min=axis.c2p(min);max=axis.c2p(max);if(min>max){var tmp=min;min=max;max=tmp}if(pr){if(pr[0]!=null&&min<pr[0]){min=pr[0]}if(pr[1]!=null&&max>pr[1]){max=pr[1]}}var range=max-min;if(zr&&(zr[0]!=null&&range<zr[0]||zr[1]!=null&&range>zr[1]))return;opts.min=min;opts.max=max});plot.setupGrid();plot.draw();if(!args.preventEvent)plot.getPlaceholder().trigger("plotzoom",[plot,args])};plot.pan=function(args){var delta={x:+args.left,y:+args.top};if(isNaN(delta.x))delta.x=0;if(isNaN(delta.y))delta.y=0;$.each(plot.getAxes(),function(_,axis){var opts=axis.options,min,max,d=delta[axis.direction];min=axis.c2p(axis.p2c(axis.min)+d),max=axis.c2p(axis.p2c(axis.max)+d);var pr=opts.panRange;if(pr===false)return;if(pr){if(pr[0]!=null&&pr[0]>min){d=pr[0]-min;min+=d;max+=d}if(pr[1]!=null&&pr[1]<max){d=pr[1]-max;min+=d;max+=d}}opts.min=min;opts.max=max});plot.setupGrid();plot.draw();if(!args.preventEvent)plot.getPlaceholder().trigger("plotpan",[plot,args])};function shutdown(plot,eventHolder){eventHolder.unbind(plot.getOptions().zoom.trigger,onZoomClick);eventHolder.unbind("mousewheel",onMouseWheel);eventHolder.unbind("dragstart",onDragStart);eventHolder.unbind("drag",onDrag);eventHolder.unbind("dragend",onDragEnd);if(panTimeout)clearTimeout(panTimeout)}plot.hooks.bindEvents.push(bindEvents);plot.hooks.shutdown.push(shutdown)}$.plot.plugins.push({init:init,options:options,name:"navigate",version:"1.3"})})(jQuery);
@@ -0,0 +1,817 @@
1
+ /* Flot plugin for rendering pie charts.
2
+
3
+ Copyright (c) 2007-2013 IOLA and Ole Laursen.
4
+ Licensed under the MIT license.
5
+
6
+ The plugin assumes that each series has a single data value, and that each
7
+ value is a positive integer or zero. Negative numbers don't make sense for a
8
+ pie chart, and have unpredictable results. The values do NOT need to be
9
+ passed in as percentages; the plugin will calculate the total and per-slice
10
+ percentages internally.
11
+
12
+ * Created by Brian Medendorp
13
+
14
+ * Updated with contributions from btburnett3, Anthony Aragues and Xavi Ivars
15
+
16
+ The plugin supports these options:
17
+
18
+ series: {
19
+ pie: {
20
+ show: true/false
21
+ radius: 0-1 for percentage of fullsize, or a specified pixel length, or 'auto'
22
+ innerRadius: 0-1 for percentage of fullsize or a specified pixel length, for creating a donut effect
23
+ startAngle: 0-2 factor of PI used for starting angle (in radians) i.e 3/2 starts at the top, 0 and 2 have the same result
24
+ tilt: 0-1 for percentage to tilt the pie, where 1 is no tilt, and 0 is completely flat (nothing will show)
25
+ offset: {
26
+ top: integer value to move the pie up or down
27
+ left: integer value to move the pie left or right, or 'auto'
28
+ },
29
+ stroke: {
30
+ color: any hexidecimal color value (other formats may or may not work, so best to stick with something like '#FFF')
31
+ width: integer pixel width of the stroke
32
+ },
33
+ label: {
34
+ show: true/false, or 'auto'
35
+ formatter: a user-defined function that modifies the text/style of the label text
36
+ radius: 0-1 for percentage of fullsize, or a specified pixel length
37
+ background: {
38
+ color: any hexidecimal color value (other formats may or may not work, so best to stick with something like '#000')
39
+ opacity: 0-1
40
+ },
41
+ threshold: 0-1 for the percentage value at which to hide labels (if they're too small)
42
+ },
43
+ combine: {
44
+ threshold: 0-1 for the percentage value at which to combine slices (if they're too small)
45
+ color: any hexidecimal color value (other formats may or may not work, so best to stick with something like '#CCC'), if null, the plugin will automatically use the color of the first slice to be combined
46
+ label: any text value of what the combined slice should be labeled
47
+ }
48
+ highlight: {
49
+ opacity: 0-1
50
+ }
51
+ }
52
+ }
53
+
54
+ More detail and specific examples can be found in the included HTML file.
55
+
56
+ */
57
+
58
+ (function($) {
59
+
60
+ // Maximum redraw attempts when fitting labels within the plot
61
+
62
+ var REDRAW_ATTEMPTS = 10;
63
+
64
+ // Factor by which to shrink the pie when fitting labels within the plot
65
+
66
+ var REDRAW_SHRINK = 0.95;
67
+
68
+ function init(plot) {
69
+
70
+ var canvas = null,
71
+ target = null,
72
+ options = null,
73
+ maxRadius = null,
74
+ centerLeft = null,
75
+ centerTop = null,
76
+ processed = false,
77
+ ctx = null;
78
+
79
+ // interactive variables
80
+
81
+ var highlights = [];
82
+
83
+ // add hook to determine if pie plugin in enabled, and then perform necessary operations
84
+
85
+ plot.hooks.processOptions.push(function(plot, options) {
86
+ if (options.series.pie.show) {
87
+
88
+ options.grid.show = false;
89
+
90
+ // set labels.show
91
+
92
+ if (options.series.pie.label.show == "auto") {
93
+ if (options.legend.show) {
94
+ options.series.pie.label.show = false;
95
+ } else {
96
+ options.series.pie.label.show = true;
97
+ }
98
+ }
99
+
100
+ // set radius
101
+
102
+ if (options.series.pie.radius == "auto") {
103
+ if (options.series.pie.label.show) {
104
+ options.series.pie.radius = 3/4;
105
+ } else {
106
+ options.series.pie.radius = 1;
107
+ }
108
+ }
109
+
110
+ // ensure sane tilt
111
+
112
+ if (options.series.pie.tilt > 1) {
113
+ options.series.pie.tilt = 1;
114
+ } else if (options.series.pie.tilt < 0) {
115
+ options.series.pie.tilt = 0;
116
+ }
117
+ }
118
+ });
119
+
120
+ plot.hooks.bindEvents.push(function(plot, eventHolder) {
121
+ var options = plot.getOptions();
122
+ if (options.series.pie.show) {
123
+ if (options.grid.hoverable) {
124
+ eventHolder.unbind("mousemove").mousemove(onMouseMove);
125
+ }
126
+ if (options.grid.clickable) {
127
+ eventHolder.unbind("click").click(onClick);
128
+ }
129
+ }
130
+ });
131
+
132
+ plot.hooks.processDatapoints.push(function(plot, series, data, datapoints) {
133
+ var options = plot.getOptions();
134
+ if (options.series.pie.show) {
135
+ processDatapoints(plot, series, data, datapoints);
136
+ }
137
+ });
138
+
139
+ plot.hooks.drawOverlay.push(function(plot, octx) {
140
+ var options = plot.getOptions();
141
+ if (options.series.pie.show) {
142
+ drawOverlay(plot, octx);
143
+ }
144
+ });
145
+
146
+ plot.hooks.draw.push(function(plot, newCtx) {
147
+ var options = plot.getOptions();
148
+ if (options.series.pie.show) {
149
+ draw(plot, newCtx);
150
+ }
151
+ });
152
+
153
+ function processDatapoints(plot, series, datapoints) {
154
+ if (!processed) {
155
+ processed = true;
156
+ canvas = plot.getCanvas();
157
+ target = $(canvas).parent();
158
+ options = plot.getOptions();
159
+ plot.setData(combine(plot.getData()));
160
+ }
161
+ }
162
+
163
+ function combine(data) {
164
+
165
+ var total = 0,
166
+ combined = 0,
167
+ numCombined = 0,
168
+ color = options.series.pie.combine.color,
169
+ newdata = [];
170
+
171
+ // Fix up the raw data from Flot, ensuring the data is numeric
172
+
173
+ for (var i = 0; i < data.length; ++i) {
174
+
175
+ var value = data[i].data;
176
+
177
+ // If the data is an array, we'll assume that it's a standard
178
+ // Flot x-y pair, and are concerned only with the second value.
179
+
180
+ // Note how we use the original array, rather than creating a
181
+ // new one; this is more efficient and preserves any extra data
182
+ // that the user may have stored in higher indexes.
183
+
184
+ if ($.isArray(value) && value.length == 1) {
185
+ value = value[0];
186
+ }
187
+
188
+ if ($.isArray(value)) {
189
+ // Equivalent to $.isNumeric() but compatible with jQuery < 1.7
190
+ if (!isNaN(parseFloat(value[1])) && isFinite(value[1])) {
191
+ value[1] = +value[1];
192
+ } else {
193
+ value[1] = 0;
194
+ }
195
+ } else if (!isNaN(parseFloat(value)) && isFinite(value)) {
196
+ value = [1, +value];
197
+ } else {
198
+ value = [1, 0];
199
+ }
200
+
201
+ data[i].data = [value];
202
+ }
203
+
204
+ // Sum up all the slices, so we can calculate percentages for each
205
+
206
+ for (var i = 0; i < data.length; ++i) {
207
+ total += data[i].data[0][1];
208
+ }
209
+
210
+ // Count the number of slices with percentages below the combine
211
+ // threshold; if it turns out to be just one, we won't combine.
212
+
213
+ for (var i = 0; i < data.length; ++i) {
214
+ var value = data[i].data[0][1];
215
+ if (value / total <= options.series.pie.combine.threshold) {
216
+ combined += value;
217
+ numCombined++;
218
+ if (!color) {
219
+ color = data[i].color;
220
+ }
221
+ }
222
+ }
223
+
224
+ for (var i = 0; i < data.length; ++i) {
225
+ var value = data[i].data[0][1];
226
+ if (numCombined < 2 || value / total > options.series.pie.combine.threshold) {
227
+ newdata.push({
228
+ data: [[1, value]],
229
+ color: data[i].color,
230
+ label: data[i].label,
231
+ angle: value * Math.PI * 2 / total,
232
+ percent: value / (total / 100)
233
+ });
234
+ }
235
+ }
236
+
237
+ if (numCombined > 1) {
238
+ newdata.push({
239
+ data: [[1, combined]],
240
+ color: color,
241
+ label: options.series.pie.combine.label,
242
+ angle: combined * Math.PI * 2 / total,
243
+ percent: combined / (total / 100)
244
+ });
245
+ }
246
+
247
+ return newdata;
248
+ }
249
+
250
+ function draw(plot, newCtx) {
251
+
252
+ if (!target) {
253
+ return; // if no series were passed
254
+ }
255
+
256
+ var canvasWidth = plot.getPlaceholder().width(),
257
+ canvasHeight = plot.getPlaceholder().height(),
258
+ legendWidth = target.children().filter(".legend").children().width() || 0;
259
+
260
+ ctx = newCtx;
261
+
262
+ // WARNING: HACK! REWRITE THIS CODE AS SOON AS POSSIBLE!
263
+
264
+ // When combining smaller slices into an 'other' slice, we need to
265
+ // add a new series. Since Flot gives plugins no way to modify the
266
+ // list of series, the pie plugin uses a hack where the first call
267
+ // to processDatapoints results in a call to setData with the new
268
+ // list of series, then subsequent processDatapoints do nothing.
269
+
270
+ // The plugin-global 'processed' flag is used to control this hack;
271
+ // it starts out false, and is set to true after the first call to
272
+ // processDatapoints.
273
+
274
+ // Unfortunately this turns future setData calls into no-ops; they
275
+ // call processDatapoints, the flag is true, and nothing happens.
276
+
277
+ // To fix this we'll set the flag back to false here in draw, when
278
+ // all series have been processed, so the next sequence of calls to
279
+ // processDatapoints once again starts out with a slice-combine.
280
+ // This is really a hack; in 0.9 we need to give plugins a proper
281
+ // way to modify series before any processing begins.
282
+
283
+ processed = false;
284
+
285
+ // calculate maximum radius and center point
286
+
287
+ maxRadius = Math.min(canvasWidth, canvasHeight / options.series.pie.tilt) / 2;
288
+ centerTop = canvasHeight / 2 + options.series.pie.offset.top;
289
+ centerLeft = canvasWidth / 2;
290
+
291
+ if (options.series.pie.offset.left == "auto") {
292
+ if (options.legend.position.match("w")) {
293
+ centerLeft += legendWidth / 2;
294
+ } else {
295
+ centerLeft -= legendWidth / 2;
296
+ }
297
+ if (centerLeft < maxRadius) {
298
+ centerLeft = maxRadius;
299
+ } else if (centerLeft > canvasWidth - maxRadius) {
300
+ centerLeft = canvasWidth - maxRadius;
301
+ }
302
+ } else {
303
+ centerLeft += options.series.pie.offset.left;
304
+ }
305
+
306
+ var slices = plot.getData(),
307
+ attempts = 0;
308
+
309
+ // Keep shrinking the pie's radius until drawPie returns true,
310
+ // indicating that all the labels fit, or we try too many times.
311
+
312
+ do {
313
+ if (attempts > 0) {
314
+ maxRadius *= REDRAW_SHRINK;
315
+ }
316
+ attempts += 1;
317
+ clear();
318
+ if (options.series.pie.tilt <= 0.8) {
319
+ drawShadow();
320
+ }
321
+ } while (!drawPie() && attempts < REDRAW_ATTEMPTS)
322
+
323
+ if (attempts >= REDRAW_ATTEMPTS) {
324
+ clear();
325
+ target.prepend("<div class='error'>Could not draw pie with labels contained inside canvas</div>");
326
+ }
327
+
328
+ if (plot.setSeries && plot.insertLegend) {
329
+ plot.setSeries(slices);
330
+ plot.insertLegend();
331
+ }
332
+
333
+ // we're actually done at this point, just defining internal functions at this point
334
+
335
+ function clear() {
336
+ ctx.clearRect(0, 0, canvasWidth, canvasHeight);
337
+ target.children().filter(".pieLabel, .pieLabelBackground").remove();
338
+ }
339
+
340
+ function drawShadow() {
341
+
342
+ var shadowLeft = options.series.pie.shadow.left;
343
+ var shadowTop = options.series.pie.shadow.top;
344
+ var edge = 10;
345
+ var alpha = options.series.pie.shadow.alpha;
346
+ var radius = options.series.pie.radius > 1 ? options.series.pie.radius : maxRadius * options.series.pie.radius;
347
+
348
+ if (radius >= canvasWidth / 2 - shadowLeft || radius * options.series.pie.tilt >= canvasHeight / 2 - shadowTop || radius <= edge) {
349
+ return; // shadow would be outside canvas, so don't draw it
350
+ }
351
+
352
+ ctx.save();
353
+ ctx.translate(shadowLeft,shadowTop);
354
+ ctx.globalAlpha = alpha;
355
+ ctx.fillStyle = "#000";
356
+
357
+ // center and rotate to starting position
358
+
359
+ ctx.translate(centerLeft,centerTop);
360
+ ctx.scale(1, options.series.pie.tilt);
361
+
362
+ //radius -= edge;
363
+
364
+ for (var i = 1; i <= edge; i++) {
365
+ ctx.beginPath();
366
+ ctx.arc(0, 0, radius, 0, Math.PI * 2, false);
367
+ ctx.fill();
368
+ radius -= i;
369
+ }
370
+
371
+ ctx.restore();
372
+ }
373
+
374
+ function drawPie() {
375
+
376
+ var startAngle = Math.PI * options.series.pie.startAngle;
377
+ var radius = options.series.pie.radius > 1 ? options.series.pie.radius : maxRadius * options.series.pie.radius;
378
+
379
+ // center and rotate to starting position
380
+
381
+ ctx.save();
382
+ ctx.translate(centerLeft,centerTop);
383
+ ctx.scale(1, options.series.pie.tilt);
384
+ //ctx.rotate(startAngle); // start at top; -- This doesn't work properly in Opera
385
+
386
+ // draw slices
387
+
388
+ ctx.save();
389
+ var currentAngle = startAngle;
390
+ for (var i = 0; i < slices.length; ++i) {
391
+ slices[i].startAngle = currentAngle;
392
+ drawSlice(slices[i].angle, slices[i].color, true);
393
+ }
394
+ ctx.restore();
395
+
396
+ // draw slice outlines
397
+
398
+ if (options.series.pie.stroke.width > 0) {
399
+ ctx.save();
400
+ ctx.lineWidth = options.series.pie.stroke.width;
401
+ currentAngle = startAngle;
402
+ for (var i = 0; i < slices.length; ++i) {
403
+ drawSlice(slices[i].angle, options.series.pie.stroke.color, false);
404
+ }
405
+ ctx.restore();
406
+ }
407
+
408
+ // draw donut hole
409
+
410
+ drawDonutHole(ctx);
411
+
412
+ ctx.restore();
413
+
414
+ // Draw the labels, returning true if they fit within the plot
415
+
416
+ if (options.series.pie.label.show) {
417
+ return drawLabels();
418
+ } else return true;
419
+
420
+ function drawSlice(angle, color, fill) {
421
+
422
+ if (angle <= 0 || isNaN(angle)) {
423
+ return;
424
+ }
425
+
426
+ if (fill) {
427
+ ctx.fillStyle = color;
428
+ } else {
429
+ ctx.strokeStyle = color;
430
+ ctx.lineJoin = "round";
431
+ }
432
+
433
+ ctx.beginPath();
434
+ if (Math.abs(angle - Math.PI * 2) > 0.000000001) {
435
+ ctx.moveTo(0, 0); // Center of the pie
436
+ }
437
+
438
+ //ctx.arc(0, 0, radius, 0, angle, false); // This doesn't work properly in Opera
439
+ ctx.arc(0, 0, radius,currentAngle, currentAngle + angle / 2, false);
440
+ ctx.arc(0, 0, radius,currentAngle + angle / 2, currentAngle + angle, false);
441
+ ctx.closePath();
442
+ //ctx.rotate(angle); // This doesn't work properly in Opera
443
+ currentAngle += angle;
444
+
445
+ if (fill) {
446
+ ctx.fill();
447
+ } else {
448
+ ctx.stroke();
449
+ }
450
+ }
451
+
452
+ function drawLabels() {
453
+
454
+ var currentAngle = startAngle;
455
+ var radius = options.series.pie.label.radius > 1 ? options.series.pie.label.radius : maxRadius * options.series.pie.label.radius;
456
+
457
+ for (var i = 0; i < slices.length; ++i) {
458
+ if (slices[i].percent >= options.series.pie.label.threshold * 100) {
459
+ if (!drawLabel(slices[i], currentAngle, i)) {
460
+ return false;
461
+ }
462
+ }
463
+ currentAngle += slices[i].angle;
464
+ }
465
+
466
+ return true;
467
+
468
+ function drawLabel(slice, startAngle, index) {
469
+
470
+ if (slice.data[0][1] == 0) {
471
+ return true;
472
+ }
473
+
474
+ // format label text
475
+
476
+ var lf = options.legend.labelFormatter, text, plf = options.series.pie.label.formatter;
477
+
478
+ if (lf) {
479
+ text = lf(slice.label, slice);
480
+ } else {
481
+ text = slice.label;
482
+ }
483
+
484
+ if (plf) {
485
+ text = plf(text, slice);
486
+ }
487
+
488
+ var halfAngle = ((startAngle + slice.angle) + startAngle) / 2;
489
+ var x = centerLeft + Math.round(Math.cos(halfAngle) * radius);
490
+ var y = centerTop + Math.round(Math.sin(halfAngle) * radius) * options.series.pie.tilt;
491
+
492
+ var html = "<span class='pieLabel' id='pieLabel" + index + "' style='position:absolute;top:" + y + "px;left:" + x + "px;'>" + text + "</span>";
493
+ target.append(html);
494
+
495
+ var label = target.children("#pieLabel" + index);
496
+ var labelTop = (y - label.height() / 2);
497
+ var labelLeft = (x - label.width() / 2);
498
+
499
+ label.css("top", labelTop);
500
+ label.css("left", labelLeft);
501
+
502
+ // check to make sure that the label is not outside the canvas
503
+
504
+ if (0 - labelTop > 0 || 0 - labelLeft > 0 || canvasHeight - (labelTop + label.height()) < 0 || canvasWidth - (labelLeft + label.width()) < 0) {
505
+ return false;
506
+ }
507
+
508
+ if (options.series.pie.label.background.opacity != 0) {
509
+
510
+ // put in the transparent background separately to avoid blended labels and label boxes
511
+
512
+ var c = options.series.pie.label.background.color;
513
+
514
+ if (c == null) {
515
+ c = slice.color;
516
+ }
517
+
518
+ var pos = "top:" + labelTop + "px;left:" + labelLeft + "px;";
519
+ $("<div class='pieLabelBackground' style='position:absolute;width:" + label.width() + "px;height:" + label.height() + "px;" + pos + "background-color:" + c + ";'></div>")
520
+ .css("opacity", options.series.pie.label.background.opacity)
521
+ .insertBefore(label);
522
+ }
523
+
524
+ return true;
525
+ } // end individual label function
526
+ } // end drawLabels function
527
+ } // end drawPie function
528
+ } // end draw function
529
+
530
+ // Placed here because it needs to be accessed from multiple locations
531
+
532
+ function drawDonutHole(layer) {
533
+ if (options.series.pie.innerRadius > 0) {
534
+
535
+ // subtract the center
536
+
537
+ layer.save();
538
+ var innerRadius = options.series.pie.innerRadius > 1 ? options.series.pie.innerRadius : maxRadius * options.series.pie.innerRadius;
539
+ layer.globalCompositeOperation = "destination-out"; // this does not work with excanvas, but it will fall back to using the stroke color
540
+ layer.beginPath();
541
+ layer.fillStyle = options.series.pie.stroke.color;
542
+ layer.arc(0, 0, innerRadius, 0, Math.PI * 2, false);
543
+ layer.fill();
544
+ layer.closePath();
545
+ layer.restore();
546
+
547
+ // add inner stroke
548
+
549
+ layer.save();
550
+ layer.beginPath();
551
+ layer.strokeStyle = options.series.pie.stroke.color;
552
+ layer.arc(0, 0, innerRadius, 0, Math.PI * 2, false);
553
+ layer.stroke();
554
+ layer.closePath();
555
+ layer.restore();
556
+
557
+ // TODO: add extra shadow inside hole (with a mask) if the pie is tilted.
558
+ }
559
+ }
560
+
561
+ //-- Additional Interactive related functions --
562
+
563
+ function isPointInPoly(poly, pt) {
564
+ for(var c = false, i = -1, l = poly.length, j = l - 1; ++i < l; j = i)
565
+ ((poly[i][1] <= pt[1] && pt[1] < poly[j][1]) || (poly[j][1] <= pt[1] && pt[1]< poly[i][1]))
566
+ && (pt[0] < (poly[j][0] - poly[i][0]) * (pt[1] - poly[i][1]) / (poly[j][1] - poly[i][1]) + poly[i][0])
567
+ && (c = !c);
568
+ return c;
569
+ }
570
+
571
+ function findNearbySlice(mouseX, mouseY) {
572
+
573
+ var slices = plot.getData(),
574
+ options = plot.getOptions(),
575
+ radius = options.series.pie.radius > 1 ? options.series.pie.radius : maxRadius * options.series.pie.radius,
576
+ x, y;
577
+
578
+ for (var i = 0; i < slices.length; ++i) {
579
+
580
+ var s = slices[i];
581
+
582
+ if (s.pie.show) {
583
+
584
+ ctx.save();
585
+ ctx.beginPath();
586
+ ctx.moveTo(0, 0); // Center of the pie
587
+ //ctx.scale(1, options.series.pie.tilt); // this actually seems to break everything when here.
588
+ ctx.arc(0, 0, radius, s.startAngle, s.startAngle + s.angle / 2, false);
589
+ ctx.arc(0, 0, radius, s.startAngle + s.angle / 2, s.startAngle + s.angle, false);
590
+ ctx.closePath();
591
+ x = mouseX - centerLeft;
592
+ y = mouseY - centerTop;
593
+
594
+ if (ctx.isPointInPath) {
595
+ if (ctx.isPointInPath(mouseX - centerLeft, mouseY - centerTop)) {
596
+ ctx.restore();
597
+ return {
598
+ datapoint: [s.percent, s.data],
599
+ dataIndex: 0,
600
+ series: s,
601
+ seriesIndex: i
602
+ };
603
+ }
604
+ } else {
605
+
606
+ // excanvas for IE doesn;t support isPointInPath, this is a workaround.
607
+
608
+ var p1X = radius * Math.cos(s.startAngle),
609
+ p1Y = radius * Math.sin(s.startAngle),
610
+ p2X = radius * Math.cos(s.startAngle + s.angle / 4),
611
+ p2Y = radius * Math.sin(s.startAngle + s.angle / 4),
612
+ p3X = radius * Math.cos(s.startAngle + s.angle / 2),
613
+ p3Y = radius * Math.sin(s.startAngle + s.angle / 2),
614
+ p4X = radius * Math.cos(s.startAngle + s.angle / 1.5),
615
+ p4Y = radius * Math.sin(s.startAngle + s.angle / 1.5),
616
+ p5X = radius * Math.cos(s.startAngle + s.angle),
617
+ p5Y = radius * Math.sin(s.startAngle + s.angle),
618
+ arrPoly = [[0, 0], [p1X, p1Y], [p2X, p2Y], [p3X, p3Y], [p4X, p4Y], [p5X, p5Y]],
619
+ arrPoint = [x, y];
620
+
621
+ // TODO: perhaps do some mathmatical trickery here with the Y-coordinate to compensate for pie tilt?
622
+
623
+ if (isPointInPoly(arrPoly, arrPoint)) {
624
+ ctx.restore();
625
+ return {
626
+ datapoint: [s.percent, s.data],
627
+ dataIndex: 0,
628
+ series: s,
629
+ seriesIndex: i
630
+ };
631
+ }
632
+ }
633
+
634
+ ctx.restore();
635
+ }
636
+ }
637
+
638
+ return null;
639
+ }
640
+
641
+ function onMouseMove(e) {
642
+ triggerClickHoverEvent("plothover", e);
643
+ }
644
+
645
+ function onClick(e) {
646
+ triggerClickHoverEvent("plotclick", e);
647
+ }
648
+
649
+ // trigger click or hover event (they send the same parameters so we share their code)
650
+
651
+ function triggerClickHoverEvent(eventname, e) {
652
+
653
+ var offset = plot.offset();
654
+ var canvasX = parseInt(e.pageX - offset.left);
655
+ var canvasY = parseInt(e.pageY - offset.top);
656
+ var item = findNearbySlice(canvasX, canvasY);
657
+
658
+ if (options.grid.autoHighlight) {
659
+
660
+ // clear auto-highlights
661
+
662
+ for (var i = 0; i < highlights.length; ++i) {
663
+ var h = highlights[i];
664
+ if (h.auto == eventname && !(item && h.series == item.series)) {
665
+ unhighlight(h.series);
666
+ }
667
+ }
668
+ }
669
+
670
+ // highlight the slice
671
+
672
+ if (item) {
673
+ highlight(item.series, eventname);
674
+ }
675
+
676
+ // trigger any hover bind events
677
+
678
+ var pos = { pageX: e.pageX, pageY: e.pageY };
679
+ target.trigger(eventname, [pos, item]);
680
+ }
681
+
682
+ function highlight(s, auto) {
683
+ //if (typeof s == "number") {
684
+ // s = series[s];
685
+ //}
686
+
687
+ var i = indexOfHighlight(s);
688
+
689
+ if (i == -1) {
690
+ highlights.push({ series: s, auto: auto });
691
+ plot.triggerRedrawOverlay();
692
+ } else if (!auto) {
693
+ highlights[i].auto = false;
694
+ }
695
+ }
696
+
697
+ function unhighlight(s) {
698
+ if (s == null) {
699
+ highlights = [];
700
+ plot.triggerRedrawOverlay();
701
+ }
702
+
703
+ //if (typeof s == "number") {
704
+ // s = series[s];
705
+ //}
706
+
707
+ var i = indexOfHighlight(s);
708
+
709
+ if (i != -1) {
710
+ highlights.splice(i, 1);
711
+ plot.triggerRedrawOverlay();
712
+ }
713
+ }
714
+
715
+ function indexOfHighlight(s) {
716
+ for (var i = 0; i < highlights.length; ++i) {
717
+ var h = highlights[i];
718
+ if (h.series == s)
719
+ return i;
720
+ }
721
+ return -1;
722
+ }
723
+
724
+ function drawOverlay(plot, octx) {
725
+
726
+ var options = plot.getOptions();
727
+
728
+ var radius = options.series.pie.radius > 1 ? options.series.pie.radius : maxRadius * options.series.pie.radius;
729
+
730
+ octx.save();
731
+ octx.translate(centerLeft, centerTop);
732
+ octx.scale(1, options.series.pie.tilt);
733
+
734
+ for (var i = 0; i < highlights.length; ++i) {
735
+ drawHighlight(highlights[i].series);
736
+ }
737
+
738
+ drawDonutHole(octx);
739
+
740
+ octx.restore();
741
+
742
+ function drawHighlight(series) {
743
+
744
+ if (series.angle <= 0 || isNaN(series.angle)) {
745
+ return;
746
+ }
747
+
748
+ //octx.fillStyle = parseColor(options.series.pie.highlight.color).scale(null, null, null, options.series.pie.highlight.opacity).toString();
749
+ octx.fillStyle = "rgba(255, 255, 255, " + options.series.pie.highlight.opacity + ")"; // this is temporary until we have access to parseColor
750
+ octx.beginPath();
751
+ if (Math.abs(series.angle - Math.PI * 2) > 0.000000001) {
752
+ octx.moveTo(0, 0); // Center of the pie
753
+ }
754
+ octx.arc(0, 0, radius, series.startAngle, series.startAngle + series.angle / 2, false);
755
+ octx.arc(0, 0, radius, series.startAngle + series.angle / 2, series.startAngle + series.angle, false);
756
+ octx.closePath();
757
+ octx.fill();
758
+ }
759
+ }
760
+ } // end init (plugin body)
761
+
762
+ // define pie specific options and their default values
763
+
764
+ var options = {
765
+ series: {
766
+ pie: {
767
+ show: false,
768
+ radius: "auto", // actual radius of the visible pie (based on full calculated radius if <=1, or hard pixel value)
769
+ innerRadius: 0, /* for donut */
770
+ startAngle: 3/2,
771
+ tilt: 1,
772
+ shadow: {
773
+ left: 5, // shadow left offset
774
+ top: 15, // shadow top offset
775
+ alpha: 0.02 // shadow alpha
776
+ },
777
+ offset: {
778
+ top: 0,
779
+ left: "auto"
780
+ },
781
+ stroke: {
782
+ color: "#fff",
783
+ width: 1
784
+ },
785
+ label: {
786
+ show: "auto",
787
+ formatter: function(label, slice) {
788
+ return "<div style='font-size:x-small;text-align:center;padding:2px;color:" + slice.color + ";'>" + label + "<br/>" + Math.round(slice.percent) + "%</div>";
789
+ }, // formatter function
790
+ radius: 1, // radius at which to place the labels (based on full calculated radius if <=1, or hard pixel value)
791
+ background: {
792
+ color: null,
793
+ opacity: 0
794
+ },
795
+ threshold: 0 // percentage at which to hide the label (i.e. the slice is too narrow)
796
+ },
797
+ combine: {
798
+ threshold: -1, // percentage at which to combine little slices into one larger slice
799
+ color: null, // color to give the new slice (auto-generated if null)
800
+ label: "Other" // label to give the new slice
801
+ },
802
+ highlight: {
803
+ //color: "#fff", // will add this functionality once parseColor is available
804
+ opacity: 0.5
805
+ }
806
+ }
807
+ }
808
+ };
809
+
810
+ $.plot.plugins.push({
811
+ init: init,
812
+ options: options,
813
+ name: "pie",
814
+ version: "1.1"
815
+ });
816
+
817
+ })(jQuery);