You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1020 lines
26 KiB

3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. 'use strict';
  2. $(document).ready(function() {
  3. // pageview and prod sale end
  4. floatchart()
  5. $(window).on('resize', function() {
  6. floatchart();
  7. });
  8. $('#mobile-collapse').on('click', function() {
  9. setTimeout(function() {
  10. floatchart();
  11. }, 700);
  12. });
  13. // Round Chart statustc card start
  14. var chart = new Chartist.Pie('#status-round-1', {
  15. series: [5, 7]
  16. }, {
  17. donut: true,
  18. donutWidth: 5,
  19. showLabel: false
  20. });
  21. var chart = new Chartist.Pie('#status-round-2', {
  22. series: [7, 5]
  23. }, {
  24. donut: true,
  25. donutWidth: 5,
  26. showLabel: false
  27. });
  28. var chart = new Chartist.Pie('#status-round-3', {
  29. series: [11, 5]
  30. }, {
  31. donut: true,
  32. donutWidth: 5,
  33. showLabel: false
  34. });
  35. var chart = new Chartist.Pie('#status-round-4', {
  36. series: [11, 10]
  37. }, {
  38. donut: true,
  39. donutWidth: 5,
  40. showLabel: false
  41. });
  42. // Round Chart statustc card end
  43. // Total revenue start
  44. var chart = new Chartist.Pie('#tot-rev-chart', {
  45. series: [11, 10]
  46. }, {
  47. donut: true,
  48. donutWidth: 5,
  49. showLabel: false
  50. });
  51. // Total revenue end
  52. // seo ecommerce start
  53. $(function() {});
  54. // seo ecommerce end
  55. // sale-diff
  56. var chart = AmCharts.makeChart("sale-diff", {
  57. "type": "serial",
  58. "theme": "light",
  59. "dataDateFormat": "YYYY-MM-DD",
  60. "precision": 2,
  61. "valueAxes": [{
  62. "id": "v1",
  63. "fontSize": 0,
  64. "axisAlpha": 0,
  65. "lineAlpha": 0,
  66. "gridAlpha": 0,
  67. "position": "left",
  68. "autoGridCount": false,
  69. "labelFunction": function(value) {
  70. return "$" + Math.round(value) + "M";
  71. }
  72. }],
  73. "graphs": [{
  74. "id": "g3",
  75. "valueAxis": "v1",
  76. "lineColor": "#2ed8b6",
  77. "fillColors": "#2ed8b6",
  78. "fillAlphas": 0.3,
  79. "type": "column",
  80. "title": "Actual Sales",
  81. "valueField": "sales2",
  82. "columnWidth": 0.5,
  83. "legendValueText": "$[[value]]M",
  84. "balloonText": "[[title]]<br /><b style='font-size: 130%'>$[[value]]M</b>"
  85. }, {
  86. "id": "g4",
  87. "valueAxis": "v1",
  88. "lineColor": "#2ed8b6",
  89. "fillColors": "#2ed8b6",
  90. "fillAlphas": 1,
  91. "type": "column",
  92. "title": "Target Sales",
  93. "valueField": "sales1",
  94. "columnWidth": 0.5,
  95. "legendValueText": "$[[value]]M",
  96. "balloonText": "[[title]]<br /><b style='font-size: 130%'>$[[value]]M</b>"
  97. }],
  98. "chartCursor": {
  99. "pan": true,
  100. "valueLineEnabled": true,
  101. "valueLineBalloonEnabled": true,
  102. "cursorAlpha": 0,
  103. "valueLineAlpha": 0.2
  104. },
  105. "categoryField": "date",
  106. "categoryAxis": {
  107. "parseDates": true,
  108. "axisAlpha": 0,
  109. "lineAlpha": 0,
  110. "gridAlpha": 0,
  111. "minorGridEnabled": true,
  112. },
  113. "balloon": {
  114. "borderThickness": 1,
  115. "shadowAlpha": 0
  116. },
  117. "export": {
  118. "enabled": true
  119. },
  120. "dataProvider": [{
  121. "date": "2013-01-16",
  122. "sales1": 5,
  123. "sales2": 8
  124. }, {
  125. "date": "2013-01-17",
  126. "sales1": 4,
  127. "sales2": 6
  128. }, {
  129. "date": "2013-01-18",
  130. "sales1": 5,
  131. "sales2": 2
  132. }, {
  133. "date": "2013-01-19",
  134. "sales1": 8,
  135. "sales2": 9
  136. }, {
  137. "date": "2013-01-20",
  138. "sales1": 9,
  139. "sales2": 6
  140. }]
  141. });
  142. // deal-analytic-chart
  143. var chart = AmCharts.makeChart("deal-analytic-chart", {
  144. "type": "serial",
  145. "theme": "light",
  146. "dataDateFormat": "YYYY-MM-DD",
  147. "precision": 2,
  148. "valueAxes": [{
  149. "id": "v1",
  150. "position": "left",
  151. "autoGridCount": false,
  152. "labelFunction": function(value) {
  153. return "$" + Math.round(value) + "M";
  154. }
  155. }, {
  156. "id": "v2",
  157. "gridAlpha": 0,
  158. "autoGridCount": false
  159. }],
  160. "graphs": [{
  161. "id": "g1",
  162. "valueAxis": "v2",
  163. "bullet": "round",
  164. "bulletBorderAlpha": 1,
  165. "bulletColor": "#FFFFFF",
  166. "bulletSize": 8,
  167. "hideBulletsCount": 50,
  168. "lineThickness": 3,
  169. "lineColor": "#2ed8b6",
  170. "title": "Market Days",
  171. "useLineColorForBulletBorder": true,
  172. "valueField": "market1",
  173. "balloonText": "[[title]]<br /><b style='font-size: 130%'>[[value]]</b>"
  174. }, {
  175. "id": "g2",
  176. "valueAxis": "v2",
  177. "bullet": "round",
  178. "bulletBorderAlpha": 1,
  179. "bulletColor": "#FFFFFF",
  180. "bulletSize": 8,
  181. "hideBulletsCount": 50,
  182. "lineThickness": 3,
  183. "lineColor": "#e95753",
  184. "title": "Market Days ALL",
  185. "useLineColorForBulletBorder": true,
  186. "valueField": "market2",
  187. "balloonText": "[[title]]<br /><b style='font-size: 130%'>[[value]]</b>"
  188. }],
  189. "chartCursor": {
  190. "pan": true,
  191. "valueLineEnabled": true,
  192. "valueLineBalloonEnabled": true,
  193. "cursorAlpha": 0,
  194. "valueLineAlpha": 0.2
  195. },
  196. "categoryField": "date",
  197. "categoryAxis": {
  198. "parseDates": true,
  199. "dashLength": 1,
  200. "minorGridEnabled": true
  201. },
  202. "legend": {
  203. "useGraphSettings": true,
  204. "position": "top"
  205. },
  206. "balloon": {
  207. "borderThickness": 1,
  208. "shadowAlpha": 0
  209. },
  210. "dataProvider": [{
  211. "date": "2013-01-16",
  212. "market1": 71,
  213. "market2": 75
  214. }, {
  215. "date": "2013-01-17",
  216. "market1": 80,
  217. "market2": 84
  218. }, {
  219. "date": "2013-01-18",
  220. "market1": 78,
  221. "market2": 83
  222. }, {
  223. "date": "2013-01-19",
  224. "market1": 85,
  225. "market2": 88
  226. }, {
  227. "date": "2013-01-20",
  228. "market1": 87,
  229. "market2": 85
  230. }, {
  231. "date": "2013-01-21",
  232. "market1": 97,
  233. "market2": 88
  234. }, {
  235. "date": "2013-01-22",
  236. "market1": 93,
  237. "market2": 88
  238. }, {
  239. "date": "2013-01-23",
  240. "market1": 85,
  241. "market2": 80
  242. }, {
  243. "date": "2013-01-24",
  244. "market1": 90,
  245. "market2": 85
  246. }]
  247. });
  248. // allocation map start
  249. var map = AmCharts.makeChart("allocation-map", {
  250. "type": "map",
  251. "theme": "light",
  252. "colorSteps": 10,
  253. "dataProvider": {
  254. "map": "usaLow",
  255. "areas": [{
  256. "id": "US-AL",
  257. "value": 4447100
  258. }, {
  259. "id": "US-AK",
  260. "value": 626932
  261. }, {
  262. "id": "US-AZ",
  263. "value": 5130632
  264. }, {
  265. "id": "US-AR",
  266. "value": 2673400
  267. }, {
  268. "id": "US-CA",
  269. "value": 33871648
  270. }, {
  271. "id": "US-CO",
  272. "value": 4301261
  273. }, {
  274. "id": "US-CT",
  275. "value": 3405565
  276. }, {
  277. "id": "US-DE",
  278. "value": 783600
  279. }, {
  280. "id": "US-FL",
  281. "value": 15982378
  282. }, {
  283. "id": "US-GA",
  284. "value": 8186453
  285. }, {
  286. "id": "US-HI",
  287. "value": 1211537
  288. }, {
  289. "id": "US-ID",
  290. "value": 1293953
  291. }, {
  292. "id": "US-IL",
  293. "value": 12419293
  294. }, {
  295. "id": "US-IN",
  296. "value": 6080485
  297. }, {
  298. "id": "US-IA",
  299. "value": 2926324
  300. }, {
  301. "id": "US-KS",
  302. "value": 2688418
  303. }, {
  304. "id": "US-KY",
  305. "value": 4041769
  306. }, {
  307. "id": "US-LA",
  308. "value": 4468976
  309. }, {
  310. "id": "US-ME",
  311. "value": 1274923
  312. }, {
  313. "id": "US-MD",
  314. "value": 5296486
  315. }, {
  316. "id": "US-MA",
  317. "value": 6349097
  318. }, {
  319. "id": "US-MI",
  320. "value": 9938444
  321. }, {
  322. "id": "US-MN",
  323. "value": 4919479
  324. }, {
  325. "id": "US-MS",
  326. "value": 2844658
  327. }, {
  328. "id": "US-MO",
  329. "value": 5595211
  330. }, {
  331. "id": "US-MT",
  332. "value": 902195
  333. }, {
  334. "id": "US-NE",
  335. "value": 1711263
  336. }, {
  337. "id": "US-NV",
  338. "value": 1998257
  339. }, {
  340. "id": "US-NH",
  341. "value": 1235786
  342. }, {
  343. "id": "US-NJ",
  344. "value": 8414350
  345. }, {
  346. "id": "US-NM",
  347. "value": 1819046
  348. }, {
  349. "id": "US-NY",
  350. "value": 18976457
  351. }, {
  352. "id": "US-NC",
  353. "value": 8049313
  354. }, {
  355. "id": "US-ND",
  356. "value": 642200
  357. }, {
  358. "id": "US-OH",
  359. "value": 11353140
  360. }, {
  361. "id": "US-OK",
  362. "value": 3450654
  363. }, {
  364. "id": "US-OR",
  365. "value": 3421399
  366. }, {
  367. "id": "US-PA",
  368. "value": 12281054
  369. }, {
  370. "id": "US-RI",
  371. "value": 1048319
  372. }, {
  373. "id": "US-SC",
  374. "value": 4012012
  375. }, {
  376. "id": "US-SD",
  377. "value": 754844
  378. }, {
  379. "id": "US-TN",
  380. "value": 5689283
  381. }, {
  382. "id": "US-TX",
  383. "value": 20851820
  384. }, {
  385. "id": "US-UT",
  386. "value": 2233169
  387. }, {
  388. "id": "US-VT",
  389. "value": 608827
  390. }, {
  391. "id": "US-VA",
  392. "value": 7078515
  393. }, {
  394. "id": "US-WA",
  395. "value": 5894121
  396. }, {
  397. "id": "US-WV",
  398. "value": 1808344
  399. }, {
  400. "id": "US-WI",
  401. "value": 5363675
  402. }, {
  403. "id": "US-WY",
  404. "value": 493782
  405. }]
  406. },
  407. "areasSettings": {
  408. "autoZoom": true
  409. },
  410. "export": {
  411. "enabled": true
  412. }
  413. });
  414. var chart = AmCharts.makeChart("allocation-chart", {
  415. "type": "pie",
  416. "startDuration": 0,
  417. "theme": "light",
  418. "labelRadius": 0,
  419. "pullOutRadius": 0,
  420. "labelText": "",
  421. "colorField": "color",
  422. "legend": {
  423. // "enabled":false,
  424. },
  425. "innerRadius": "70%",
  426. "dataProvider": [{
  427. "country": "Lithuania",
  428. "litres": 501.9,
  429. "color": "#85C5E3"
  430. }, {
  431. "country": "Czech Republic",
  432. "litres": 301.9,
  433. "color": "#6AA3C4"
  434. }, {
  435. "country": "Ireland",
  436. "litres": 201.1,
  437. "color": "#6097B9"
  438. }, {
  439. "country": "india",
  440. "litres": 220.1,
  441. "color": "#4E81A4"
  442. }],
  443. "valueField": "litres",
  444. });
  445. // allocation map end
  446. });
  447. function floatchart() {
  448. //flot options
  449. var options = {
  450. legend: {
  451. show: false
  452. },
  453. series: {
  454. label: "",
  455. curvedLines: {
  456. active: true,
  457. nrSplinePoints: 20
  458. },
  459. },
  460. tooltip: {
  461. show: true,
  462. content: "x : %x | y : %y"
  463. },
  464. grid: {
  465. hoverable: true,
  466. borderWidth: 0,
  467. labelMargin: 0,
  468. axisMargin: 0,
  469. minBorderMargin: 0,
  470. },
  471. yaxis: {
  472. min: 0,
  473. max: 30,
  474. color: 'transparent',
  475. font: {
  476. size: 0,
  477. }
  478. },
  479. xaxis: {
  480. color: 'transparent',
  481. font: {
  482. size: 0,
  483. }
  484. }
  485. };
  486. $.plot($("#pbc-1"), [{
  487. data: [
  488. [0, 8],
  489. [1, 10],
  490. [2, 20],
  491. [3, 10],
  492. [4, 27],
  493. [5, 15],
  494. [6, 20],
  495. [7, 24],
  496. [8, 20]
  497. ],
  498. color: "#4099ff",
  499. bars: {
  500. show: true,
  501. lineWidth: 1,
  502. fill: true,
  503. fillColor: {
  504. colors: [{
  505. opacity: 0.7
  506. }, {
  507. opacity: 0.7
  508. }]
  509. },
  510. barWidth: 0.3,
  511. align: 'center',
  512. horizontal: false
  513. },
  514. points: {
  515. show: false
  516. },
  517. }], options);
  518. $.plot($("#pbc-2"), [{
  519. data: [
  520. [0, 20],
  521. [1, 24],
  522. [2, 20],
  523. [3, 15],
  524. [4, 27],
  525. [5, 10],
  526. [6, 18],
  527. [7, 22],
  528. [8, 15]
  529. ],
  530. color: "#FF5370",
  531. bars: {
  532. show: true,
  533. lineWidth: 1,
  534. fill: true,
  535. fillColor: {
  536. colors: [{
  537. opacity: 0.7
  538. }, {
  539. opacity: 0.7
  540. }]
  541. },
  542. barWidth: 0.3,
  543. align: 'center',
  544. horizontal: false
  545. },
  546. points: {
  547. show: false
  548. },
  549. }], options);
  550. $.plot($("#pbc-3"), [{
  551. data: [
  552. [0, 8],
  553. [1, 10],
  554. [2, 20],
  555. [3, 10],
  556. [4, 27],
  557. [5, 15],
  558. [6, 20],
  559. [7, 12],
  560. [8, 6]
  561. ],
  562. color: "#4099ff",
  563. bars: {
  564. show: true,
  565. lineWidth: 1,
  566. fill: true,
  567. fillColor: {
  568. colors: [{
  569. opacity: 0.7
  570. }, {
  571. opacity: 0.7
  572. }]
  573. },
  574. barWidth: 0.3,
  575. align: 'center',
  576. horizontal: false
  577. },
  578. points: {
  579. show: false
  580. },
  581. }], options);
  582. $.plot($("#pbc-4"), [{
  583. data: [
  584. [0, 20],
  585. [1, 24],
  586. [2, 20],
  587. [3, 15],
  588. [4, 27],
  589. [5, 10],
  590. [6, 18],
  591. [7, 22],
  592. [8, 15]
  593. ],
  594. color: "#2ed8b6",
  595. bars: {
  596. show: true,
  597. lineWidth: 1,
  598. fill: true,
  599. fillColor: {
  600. colors: [{
  601. opacity: 0.7
  602. }, {
  603. opacity: 0.7
  604. }]
  605. },
  606. barWidth: 0.3,
  607. align: 'center',
  608. horizontal: false
  609. },
  610. points: {
  611. show: false
  612. },
  613. }], options);
  614. $.plot($("#pbc-5"), [{
  615. data: [
  616. [0, 20],
  617. [1, 24],
  618. [2, 20],
  619. [3, 15],
  620. [4, 27],
  621. [5, 10],
  622. [6, 18],
  623. [7, 22],
  624. [8, 15]
  625. ],
  626. color: "#FF5370",
  627. bars: {
  628. show: true,
  629. lineWidth: 1,
  630. fill: true,
  631. fillColor: {
  632. colors: [{
  633. opacity: 0.7
  634. }, {
  635. opacity: 0.7
  636. }]
  637. },
  638. barWidth: 0.3,
  639. align: 'center',
  640. horizontal: false
  641. },
  642. points: {
  643. show: false
  644. },
  645. }], options);
  646. $.plot($("#pbc-6"), [{
  647. data: [
  648. [0, 20],
  649. [1, 24],
  650. [2, 20],
  651. [3, 15],
  652. [4, 27],
  653. [5, 10],
  654. [6, 18],
  655. [7, 22],
  656. [8, 15]
  657. ],
  658. color: "#FF5370",
  659. bars: {
  660. show: true,
  661. lineWidth: 1,
  662. fill: true,
  663. fillColor: {
  664. colors: [{
  665. opacity: 0.7
  666. }, {
  667. opacity: 0.7
  668. }]
  669. },
  670. barWidth: 0.3,
  671. align: 'center',
  672. horizontal: false
  673. },
  674. points: {
  675. show: false
  676. },
  677. }], options);
  678. //real-time update
  679. $(function() {
  680. // We use an inline data source in the example, usually data would
  681. // be fetched from a server
  682. var data = [],
  683. totalPoints = 300;
  684. function getRandomData() {
  685. if (data.length > 0)
  686. data = data.slice(1);
  687. // Do a random walk
  688. while (data.length < totalPoints) {
  689. var prev = data.length > 0 ? data[data.length - 1] : 50,
  690. y = prev + Math.random() * 10 - 5;
  691. if (y < 0) {
  692. y = 0;
  693. } else if (y > 100) {
  694. y = 100;
  695. }
  696. data.push(y);
  697. }
  698. // Zip the generated y values with the x values
  699. var res = [];
  700. for (var i = 0; i < data.length; ++i) {
  701. res.push([i, data[i]])
  702. }
  703. return res;
  704. }
  705. // Set up the control widget
  706. var updateInterval = 30;
  707. $("#updateInterval").val(updateInterval).change(function() {
  708. var v = $(this).val();
  709. if (v && !isNaN(+v)) {
  710. updateInterval = +v;
  711. if (updateInterval < 1) {
  712. updateInterval = 1;
  713. } else if (updateInterval > 2000) {
  714. updateInterval = 2000;
  715. }
  716. $(this).val("" + updateInterval);
  717. }
  718. });
  719. var plot = $.plot("#realtime-profit", [getRandomData()], {
  720. lines: {
  721. show: true,
  722. fill: true,
  723. lineWidth: 1,
  724. borderWidth: 0,
  725. },
  726. shadowSize: 5,
  727. highlightColor: "rgba(0,0,0,0.5)",
  728. points: {
  729. show: true,
  730. radius: 0,
  731. fill: true,
  732. fillColor: '#fff'
  733. },
  734. curvedLines: {
  735. apply: false,
  736. },
  737. legend: {
  738. show: false
  739. },
  740. series: {
  741. label: "",
  742. color: "#2ed8b6",
  743. curvedLines: {
  744. active: true,
  745. nrSplinePoints: 20
  746. },
  747. },
  748. tooltip: {
  749. show: true,
  750. content: "x : %x | y : %y"
  751. },
  752. grid: {
  753. hoverable: true,
  754. borderWidth: 0,
  755. minBorderMargin: 0,
  756. },
  757. yaxis: {
  758. min: 0,
  759. max: 100,
  760. },
  761. xaxis: {
  762. font: {
  763. size: 0,
  764. }
  765. }
  766. });
  767. function update() {
  768. plot.setData([getRandomData()]);
  769. // Since the axes don't change, we don't need to call plot.setupGrid()
  770. plot.draw();
  771. setTimeout(update, updateInterval);
  772. }
  773. update();
  774. });
  775. $(function() {
  776. // sale start
  777. $.plot($("#sec-ecommerce-chart-line"), [{
  778. data: [
  779. [0, 18],
  780. [1, 10],
  781. [2, 20],
  782. [3, 10],
  783. [4, 27],
  784. [5, 15],
  785. [6, 20],
  786. [7, 24],
  787. [8, 20],
  788. [9, 16],
  789. [10, 18],
  790. [11, 10],
  791. [12, 20],
  792. [13, 10],
  793. [14, 27],
  794. ],
  795. color: "#fff",
  796. lines: {
  797. show: true,
  798. fill: false,
  799. lineWidth: 2
  800. },
  801. points: {
  802. show: true,
  803. radius: 3,
  804. fill: true,
  805. fillColor: '#fff'
  806. },
  807. curvedLines: {
  808. apply: false,
  809. }
  810. }], options);
  811. $.plot($("#sec-ecommerce-chart-bar"), [{
  812. data: [
  813. [0, 18],
  814. [1, 10],
  815. [2, 20],
  816. [3, 10],
  817. [4, 27],
  818. [5, 15],
  819. [6, 20],
  820. [7, 24],
  821. [8, 20],
  822. [9, 16],
  823. [10, 18],
  824. [11, 10],
  825. [12, 20],
  826. [13, 10],
  827. [14, 27],
  828. ],
  829. color: "#5ffddd",
  830. bars: {
  831. show: true,
  832. lineWidth: 1,
  833. fill: true,
  834. fillColor: {
  835. colors: [{
  836. opacity: 1
  837. }, {
  838. opacity: 1
  839. }]
  840. },
  841. barWidth: 0.6,
  842. align: 'center',
  843. horizontal: false
  844. },
  845. points: {
  846. show: false
  847. },
  848. }], options);
  849. });
  850. // sale Income start
  851. $.plot($("#sal-income"), [{
  852. data: [
  853. [0, 25],
  854. [1, 15],
  855. [2, 20],
  856. [3, 27],
  857. [4, 10],
  858. [5, 20],
  859. [6, 10],
  860. [7, 26],
  861. [8, 20],
  862. [9, 10],
  863. [10, 25],
  864. [11, 27],
  865. [12, 12],
  866. [13, 26],
  867. ],
  868. color: "#4099ff",
  869. lines: {
  870. show: true,
  871. fill: true,
  872. lineWidth: 3
  873. },
  874. points: {
  875. show: false,
  876. },
  877. curvedLines: {
  878. apply: true,
  879. }
  880. }], options);
  881. $.plot($("#rent-income"), [{
  882. data: [
  883. [0, 25],
  884. [1, 15],
  885. [2, 25],
  886. [3, 27],
  887. [4, 10],
  888. [5, 20],
  889. [6, 15],
  890. [7, 26],
  891. [8, 20],
  892. [9, 13],
  893. [10, 25],
  894. [11, 27],
  895. [12, 12],
  896. [13, 1],
  897. ],
  898. color: "#2ed8b6",
  899. lines: {
  900. show: true,
  901. fill: true,
  902. lineWidth: 3
  903. },
  904. points: {
  905. show: false,
  906. },
  907. curvedLines: {
  908. apply: true,
  909. }
  910. }], options);
  911. $.plot($("#income-analysis"), [{
  912. data: [
  913. [0, 25],
  914. [1, 30],
  915. [2, 25],
  916. [3, 27],
  917. [4, 10],
  918. [5, 20],
  919. [6, 15],
  920. [7, 26],
  921. [8, 10],
  922. [9, 13],
  923. [10, 25],
  924. [11, 27],
  925. [12, 12],
  926. [13, 27],
  927. ],
  928. color: "#FF5370",
  929. lines: {
  930. show: true,
  931. fill: true,
  932. lineWidth: 3
  933. },
  934. points: {
  935. show: false,
  936. },
  937. curvedLines: {
  938. apply: true,
  939. }
  940. }], options);
  941. $(window).on('resize',function() {
  942. $(".dial").knob({
  943. draw: function() {
  944. // "tron" case
  945. if (this.$.data('skin') == 'tron') {
  946. this.cursorExt = 0.3;
  947. var a = this.arc(this.cv) // Arc
  948. ,
  949. pa // Previous arc
  950. , r = 1;
  951. this.g.lineWidth = this.lineWidth;
  952. if (this.o.displayPrevious) {
  953. pa = this.arc(this.v);
  954. this.g.beginPath();
  955. this.g.strokeStyle = this.pColor;
  956. this.g.arc(this.xy, this.xy, this.radius - this.lineWidth, pa.s, pa.e, pa.d);
  957. this.g.stroke();
  958. }
  959. this.g.beginPath();
  960. this.g.strokeStyle = r ? this.o.fgColor : this.fgColor;
  961. this.g.arc(this.xy, this.xy, this.radius - this.lineWidth, a.s, a.e, a.d);
  962. this.g.stroke();
  963. this.g.lineWidth = 2;
  964. this.g.beginPath();
  965. this.g.strokeStyle = this.o.fgColor;
  966. this.g.arc(this.xy, this.xy, this.radius - this.lineWidth + 1 + this.lineWidth * 2 / 3, 0, 2 * Math.PI, false);
  967. this.g.stroke();
  968. return false;
  969. }
  970. }
  971. });
  972. });
  973. $(document).ready(function() {
  974. /*× Overloaded 'draw' method*/
  975. $(".dial").knob({
  976. draw: function() {
  977. // "tron" case
  978. if (this.$.data('skin') == 'tron') {
  979. this.cursorExt = 0.3;
  980. var a = this.arc(this.cv) // Arc
  981. ,
  982. pa // Previous arc
  983. , r = 1;
  984. this.g.lineWidth = this.lineWidth;
  985. if (this.o.displayPrevious) {
  986. pa = this.arc(this.v);
  987. this.g.beginPath();
  988. this.g.strokeStyle = this.pColor;
  989. this.g.arc(this.xy, this.xy, this.radius - this.lineWidth, pa.s, pa.e, pa.d);
  990. this.g.stroke();
  991. }
  992. this.g.beginPath();
  993. this.g.strokeStyle = r ? this.o.fgColor : this.fgColor;
  994. this.g.arc(this.xy, this.xy, this.radius - this.lineWidth, a.s, a.e, a.d);
  995. this.g.stroke();
  996. this.g.lineWidth = 2;
  997. this.g.beginPath();
  998. this.g.strokeStyle = this.o.fgColor;
  999. this.g.arc(this.xy, this.xy, this.radius - this.lineWidth + 1 + this.lineWidth * 2 / 3, 0, 2 * Math.PI, false);
  1000. this.g.stroke();
  1001. return false;
  1002. }
  1003. }
  1004. });
  1005. });
  1006. }