flot.setup.js 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457
  1. // CHART SPLINE
  2. // -----------------------------------
  3. export const ChartSpline = {
  4. data: [{
  5. "label": "Uniques",
  6. "color": "#768294",
  7. "data": [
  8. ["Mar", 70],
  9. ["Apr", 85],
  10. ["May", 59],
  11. ["Jun", 93],
  12. ["Jul", 66],
  13. ["Aug", 86],
  14. ["Sep", 60]
  15. ]
  16. }, {
  17. "label": "Recurrent",
  18. "color": "#1f92fe",
  19. "data": [
  20. ["Mar", 21],
  21. ["Apr", 12],
  22. ["May", 27],
  23. ["Jun", 24],
  24. ["Jul", 16],
  25. ["Aug", 39],
  26. ["Sep", 15]
  27. ]
  28. }],
  29. options: {
  30. series: {
  31. lines: {
  32. show: false
  33. },
  34. points: {
  35. show: true,
  36. radius: 4
  37. },
  38. splines: {
  39. show: true,
  40. tension: 0.4,
  41. lineWidth: 1,
  42. fill: 0.5
  43. }
  44. },
  45. grid: {
  46. borderColor: '#eee',
  47. borderWidth: 1,
  48. hoverable: true,
  49. backgroundColor: '#fcfcfc'
  50. },
  51. tooltip: true,
  52. tooltipOpts: {
  53. content: (label, x, y) => x + ' : ' + y
  54. },
  55. xaxis: {
  56. tickColor: '#fcfcfc',
  57. mode: 'categories'
  58. },
  59. yaxis: {
  60. min: 0,
  61. max: 150, // optional: use it for a clear represetation
  62. tickColor: '#eee',
  63. //position: 'right' or 'left',
  64. tickFormatter: v => v /* + ' visitors'*/
  65. },
  66. shadowSize: 0
  67. }
  68. }
  69. // CHART AREA
  70. // -----------------------------------
  71. export const ChartArea = {
  72. data: [{
  73. "label": "Uniques",
  74. "color": "#aad874",
  75. "data": [
  76. ["Mar", 50],
  77. ["Apr", 84],
  78. ["May", 52],
  79. ["Jun", 88],
  80. ["Jul", 69],
  81. ["Aug", 92],
  82. ["Sep", 58]
  83. ]
  84. }, {
  85. "label": "Recurrent",
  86. "color": "#7dc7df",
  87. "data": [
  88. ["Mar", 13],
  89. ["Apr", 44],
  90. ["May", 44],
  91. ["Jun", 27],
  92. ["Jul", 38],
  93. ["Aug", 11],
  94. ["Sep", 39]
  95. ]
  96. }],
  97. options: {
  98. series: {
  99. lines: {
  100. show: true,
  101. fill: 0.8
  102. },
  103. points: {
  104. show: true,
  105. radius: 4
  106. }
  107. },
  108. grid: {
  109. borderColor: '#eee',
  110. borderWidth: 1,
  111. hoverable: true,
  112. backgroundColor: '#fcfcfc'
  113. },
  114. tooltip: true,
  115. tooltipOpts: {
  116. content: (label, x, y) => x + ' : ' + y
  117. },
  118. xaxis: {
  119. tickColor: '#fcfcfc',
  120. mode: 'categories'
  121. },
  122. yaxis: {
  123. min: 0,
  124. tickColor: '#eee',
  125. // position: 'right' or 'left'
  126. tickFormatter: v => v + ' visitors'
  127. },
  128. shadowSize: 0
  129. }
  130. }
  131. // CHART BAR
  132. // -----------------------------------
  133. export const ChartBar = {
  134. data: [{
  135. // "label": "sales",
  136. "color": "#287DAD",
  137. "data": [
  138. ["Jan", 27],
  139. ["Feb", 82],
  140. ["Mar", 56],
  141. ["Apr", 14],
  142. ["May", 28],
  143. ["Jun", 77],
  144. ["Jul", 23],
  145. ["Aug", 49],
  146. ["Sep", 81],
  147. ["Oct", 20],
  148. ["Nov", 50],
  149. ["Des", 14]
  150. ]
  151. }],
  152. // data: [{
  153. // "label": "Complete",
  154. // "color": "#5ab1ef",
  155. // "data": [
  156. // ["Ditindaklanjuti LLDIKTI", 74]
  157. // ]
  158. // }, {
  159. // "label": "In Progress",
  160. // "color": "#f5994e",
  161. // "data": [
  162. // ["Ditindaklanjuti DIKTI", 59]
  163. // ]
  164. // }, {
  165. // "label": "Cancelled",
  166. // "color": "#d87a80",
  167. // "data": [
  168. // ["Ditutup", 111]
  169. // ]
  170. // }],
  171. options: {
  172. series: {
  173. bars: {
  174. align: 'center',
  175. lineWidth: 0,
  176. show: true,
  177. barWidth: 0.2,
  178. fill: 0.9
  179. }
  180. },
  181. grid: {
  182. borderColor: '#eee',
  183. borderWidth: 1,
  184. hoverable: true,
  185. backgroundColor: '#fcfcfc'
  186. },
  187. tooltip: true,
  188. tooltipOpts: {
  189. content: (label, x, y) => x + ' : ' + y
  190. },
  191. xaxis: {
  192. tickColor: '#fcfcfc',
  193. mode: 'categories'
  194. },
  195. yaxis: {
  196. // position: 'right' or 'left'
  197. tickColor: '#eee'
  198. },
  199. shadowSize: 0
  200. }
  201. }
  202. // CHART BAR STACKED
  203. // -----------------------------------
  204. export const ChartBarStacked = {
  205. data: [{
  206. "label": "Tweets",
  207. "color": "#51bff2",
  208. "data": [
  209. ["Jan", 56],
  210. ["Feb", 81],
  211. ["Mar", 97],
  212. ["Apr", 44],
  213. ["May", 24],
  214. ["Jun", 85],
  215. ["Jul", 94],
  216. ["Aug", 78],
  217. ["Sep", 52],
  218. ["Oct", 17],
  219. ["Nov", 90],
  220. ["Dec", 62]
  221. ]
  222. }, {
  223. "label": "Likes",
  224. "color": "#4a8ef1",
  225. "data": [
  226. ["Jan", 69],
  227. ["Feb", 135],
  228. ["Mar", 14],
  229. ["Apr", 100],
  230. ["May", 100],
  231. ["Jun", 62],
  232. ["Jul", 115],
  233. ["Aug", 22],
  234. ["Sep", 104],
  235. ["Oct", 132],
  236. ["Nov", 72],
  237. ["Dec", 61]
  238. ]
  239. }, {
  240. "label": "+1",
  241. "color": "#f0693a",
  242. "data": [
  243. ["Jan", 29],
  244. ["Feb", 36],
  245. ["Mar", 47],
  246. ["Apr", 21],
  247. ["May", 5],
  248. ["Jun", 49],
  249. ["Jul", 37],
  250. ["Aug", 44],
  251. ["Sep", 28],
  252. ["Oct", 9],
  253. ["Nov", 12],
  254. ["Dec", 35]
  255. ]
  256. }],
  257. options: {
  258. series: {
  259. stack: true,
  260. bars: {
  261. align: 'center',
  262. lineWidth: 0,
  263. show: true,
  264. barWidth: 0.6,
  265. fill: 0.9
  266. }
  267. },
  268. grid: {
  269. borderColor: '#eee',
  270. borderWidth: 1,
  271. hoverable: true,
  272. backgroundColor: '#fcfcfc'
  273. },
  274. tooltip: true,
  275. tooltipOpts: {
  276. content: (label, x, y) => x + ' : ' + y
  277. },
  278. xaxis: {
  279. tickColor: '#fcfcfc',
  280. mode: 'categories'
  281. },
  282. yaxis: {
  283. // position: 'right' or 'left'
  284. tickColor: '#eee'
  285. },
  286. shadowSize: 0
  287. }
  288. }
  289. // CHART DONUT
  290. // -----------------------------------
  291. export const ChartDonut = {
  292. data: [{
  293. "color": "#39C558",
  294. "data": 60,
  295. "label": "Coffee"
  296. }, {
  297. "color": "#00b4ff",
  298. "data": 90,
  299. "label": "CSS"
  300. }, {
  301. "color": "#FFBE41",
  302. "data": 50,
  303. "label": "LESS"
  304. }, {
  305. "color": "#ff3e43",
  306. "data": 80,
  307. "label": "Jade"
  308. }, {
  309. "color": "#937fc7",
  310. "data": 116,
  311. "label": "AngularJS"
  312. }],
  313. options: {
  314. series: {
  315. pie: {
  316. show: true,
  317. innerRadius: 0.5 // This makes the donut shape
  318. }
  319. }
  320. }
  321. }
  322. // CHART LINE
  323. // -----------------------------------
  324. export const ChartLine = {
  325. data: [{
  326. "label": "Complete",
  327. "color": "#5ab1ef",
  328. "data": [
  329. ["Jan", 188],
  330. ["Feb", 183],
  331. ["Mar", 185],
  332. ["Apr", 199],
  333. ["May", 190],
  334. ["Jun", 194],
  335. ["Jul", 194],
  336. ["Aug", 184],
  337. ["Sep", 74]
  338. ]
  339. }, {
  340. "label": "In Progress",
  341. "color": "#f5994e",
  342. "data": [
  343. ["Jan", 153],
  344. ["Feb", 116],
  345. ["Mar", 136],
  346. ["Apr", 119],
  347. ["May", 148],
  348. ["Jun", 133],
  349. ["Jul", 118],
  350. ["Aug", 161],
  351. ["Sep", 59]
  352. ]
  353. }, {
  354. "label": "Cancelled",
  355. "color": "#d87a80",
  356. "data": [
  357. ["Jan", 111],
  358. ["Feb", 97],
  359. ["Mar", 93],
  360. ["Apr", 110],
  361. ["May", 102],
  362. ["Jun", 93],
  363. ["Jul", 92],
  364. ["Aug", 92],
  365. ["Sep", 44]
  366. ]
  367. }],
  368. options: {
  369. series: {
  370. lines: {
  371. show: true,
  372. fill: 0.01
  373. },
  374. points: {
  375. show: true,
  376. radius: 4
  377. }
  378. },
  379. grid: {
  380. borderColor: '#eee',
  381. borderWidth: 1,
  382. hoverable: true,
  383. backgroundColor: '#fcfcfc'
  384. },
  385. tooltip: true,
  386. tooltipOpts: {
  387. content: (label, x, y) => x + ' : ' + y
  388. },
  389. xaxis: {
  390. tickColor: '#eee',
  391. mode: 'categories'
  392. },
  393. yaxis: {
  394. // position: 'right' or 'left'
  395. tickColor: '#eee'
  396. },
  397. shadowSize: 0
  398. }
  399. }
  400. // CHART PIE
  401. // -----------------------------------
  402. export const ChartPie = {
  403. data: [{
  404. "label": "Pelaporan masuk",
  405. "color": "#287DAD",
  406. "data": 70
  407. }, {
  408. "label": "Pelaporan selesai",
  409. "color": "#52D489",
  410. "data": 40
  411. }],
  412. options: {
  413. series: {
  414. pie: {
  415. show: true,
  416. innerRadius: 0,
  417. label: {
  418. show: true,
  419. radius: 0.8,
  420. formatter: function (label, series) {
  421. return '<div class="flot-pie-label">' +
  422. //label + ' : ' +
  423. Math.round(series.percent) +
  424. '%</div>';
  425. },
  426. background: {
  427. opacity: 0.8,
  428. color: '#222'
  429. }
  430. }
  431. }
  432. }
  433. }
  434. }