v2.js 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. (function (global, factory) {
  2. if (typeof define === "function" && define.amd) {
  3. define("/dashboard/v2", ["jquery", "Site"], factory);
  4. } else if (typeof exports !== "undefined") {
  5. factory(require("jquery"), require("Site"));
  6. } else {
  7. var mod = {
  8. exports: {}
  9. };
  10. factory(global.jQuery, global.Site);
  11. global.dashboardV2 = mod.exports;
  12. }
  13. })(this, function (_jquery, _Site) {
  14. "use strict";
  15. _jquery = babelHelpers.interopRequireDefault(_jquery);
  16. (0, _jquery.default)(document).ready(function ($$$1) {
  17. (0, _Site.run)(); // Widget Linearea
  18. // ---------------
  19. (function () {
  20. var linearea = new Chartist.Line('#widgetLinearea .ct-chart', {
  21. labels: ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT'],
  22. series: [[0, 2.5, 2, 2.8, 2.6, 3.8, 0], [0, 1.4, 0.5, 2, 1.2, 0.9, 0]]
  23. }, {
  24. low: 0,
  25. showArea: true,
  26. showPoint: false,
  27. showLine: false,
  28. fullWidth: true,
  29. chartPadding: {
  30. top: 0,
  31. right: 10,
  32. bottom: 0,
  33. left: 0
  34. },
  35. axisX: {
  36. showGrid: false,
  37. labelOffset: {
  38. x: -14,
  39. y: 0
  40. }
  41. },
  42. axisY: {
  43. labelOffset: {
  44. x: -10,
  45. y: 0
  46. },
  47. labelInterpolationFnc: function labelInterpolationFnc(num) {
  48. return num % 1 === 0 ? num : false;
  49. }
  50. }
  51. });
  52. })(); // Widget Gmap
  53. // -----------
  54. (function () {
  55. var map = new GMaps({
  56. el: '#gmap',
  57. lat: -12.043333,
  58. lng: -77.028333,
  59. zoomControl: true,
  60. zoomControlOpt: {
  61. style: "SMALL",
  62. position: "TOP_LEFT"
  63. },
  64. panControl: true,
  65. streetViewControl: false,
  66. mapTypeControl: false,
  67. overviewMapControl: false
  68. });
  69. map.addStyle({
  70. styledMapName: "Styled Map",
  71. styles: Plugin.getDefaults('gmaps').styles,
  72. mapTypeId: "map_style"
  73. });
  74. map.setStyle("map_style");
  75. })();
  76. });
  77. });