123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443 |
- (function (global, factory) {
- if (typeof define === "function" && define.amd) {
- define("/dashboard/v1", ["jquery", "Site"], factory);
- } else if (typeof exports !== "undefined") {
- factory(require("jquery"), require("Site"));
- } else {
- var mod = {
- exports: {}
- };
- factory(global.jQuery, global.Site);
- global.dashboardV1 = mod.exports;
- }
- })(this, function (_jquery, _Site) {
- "use strict";
- _jquery = babelHelpers.interopRequireDefault(_jquery);
- (0, _jquery.default)(document).ready(function ($$$1) {
- (0, _Site.run)(); // Widget Linearea Color
- // ---------------------
- (function () {
- var timeline_labels = [];
- var timeline_data1 = [];
- var timeline_data2 = [];
- var timeline_data3 = [];
- var totalPoints = 20;
- var updateInterval = 2000;
- var now = new Date().getTime();
- function GetData() {
- timeline_labels.shift();
- timeline_data1.shift();
- timeline_data2.shift();
- timeline_data3.shift();
- while (timeline_data1.length < totalPoints) {
- var x = Math.random() * 100 + 800;
- var y = Math.random() * 100 + 400;
- var z = Math.random() * 100 + 200;
- timeline_labels.push(now += updateInterval);
- timeline_data1.push(x);
- timeline_data2.push(y);
- timeline_data3.push(z);
- }
- }
- var timlelineData = {
- labels: timeline_labels,
- series: [timeline_data1, timeline_data2, timeline_data3]
- };
- var timlelineData = {
- labels: timeline_labels,
- series: [timeline_data1, timeline_data2, timeline_data3]
- };
- var timelineOptions = {
- low: 0,
- showArea: true,
- showPoint: false,
- showLine: false,
- fullWidth: true,
- chartPadding: {
- top: 0,
- right: 0,
- bottom: 0,
- left: 0
- },
- axisX: {
- showLabel: false,
- showGrid: false,
- offset: 0
- },
- axisY: {
- showLabel: false,
- showGrid: false,
- offset: 0
- },
- plugins: [Chartist.plugins.tooltip()]
- };
- new Chartist.Line("#widgetLineareaColor .ct-chart", timlelineData, timelineOptions);
- function update() {
- GetData();
- new Chartist.Line("#widgetLineareaColor .ct-chart", timlelineData, timelineOptions);
- setTimeout(update, updateInterval);
- }
- update();
- })(); // Widget Stacked Bar
- // ------------------
- (function () {
- var timeline_labels = [];
- var timeline_data1 = [];
- var timeline_data2 = [];
- var totalPoints = 30;
- var updateInterval = 2500;
- var now = new Date().getTime();
- function GetData() {
- timeline_labels.shift();
- timeline_data1.shift();
- timeline_data2.shift();
- while (timeline_data1.length < totalPoints) {
- var x = Math.floor(Math.random() * 100) + 800;
- var y = Math.floor(Math.random() * 100) + 600;
- timeline_labels.push(now += updateInterval);
- timeline_data1.push(x);
- timeline_data2.push(y);
- }
- }
- var timlelineData = {
- labels: timeline_labels,
- series: [timeline_data1, timeline_data2]
- };
- var timlelineData = {
- labels: timeline_labels,
- series: [timeline_data1, timeline_data2]
- };
- var timelineOptions = {
- stackBars: true,
- fullWidth: true,
- seriesBarDistance: 0,
- chartPadding: {
- top: 0,
- right: 30,
- bottom: 30,
- left: 20
- },
- axisX: {
- showLabel: false,
- showGrid: false,
- offset: 0
- },
- axisY: {
- showLabel: false,
- showGrid: false,
- offset: 0
- },
- plugins: [Chartist.plugins.tooltip()]
- };
- new Chartist.Bar("#widgetStackedBar .ct-chart", timlelineData, timelineOptions);
- function update() {
- GetData();
- new Chartist.Bar("#widgetStackedBar .ct-chart", timlelineData, timelineOptions);
- setTimeout(update, updateInterval);
- }
- update();
- })(); // Widget Statistic
- // ----------------
- (function () {
- (function () {
- var defaults = Plugin.getDefaults('vectorMap');
- var options = $$$1.extend({}, defaults, {
- map: "au_mill",
- markers: [{
- latLng: [-33.55, 150.53],
- name: '1,512 Visits'
- }, {
- latLng: [-37.5, 144.58],
- name: '940 Visits'
- }, {
- latLng: [-31.58, 115.49],
- name: '340 Visits'
- }],
- markerStyle: {
- initial: {
- r: 6,
- fill: Config.colors("blue-grey", 600),
- stroke: Config.colors("blue-grey", 600),
- "stroke-width": 6,
- "stroke-opacity": 0.6
- },
- hover: {
- r: 10,
- fill: Config.colors("blue-grey", 500),
- "stroke-width": 0
- }
- }
- }, true);
- $$$1('#widgetJvmap').vectorMap(options);
- })();
- })(); // Widget Linepoint
- // ----------------
- (function () {
- new Chartist.Line("#widgetLinepoint .ct-chart", {
- labels: ['1', '2', '3', '4', '5', '6', '7', '8'],
- series: [[1, 1.5, 0.5, 2, 1, 2.5, 1.5, 2]]
- }, {
- low: 0,
- showArea: false,
- showPoint: true,
- showLine: true,
- fullWidth: true,
- lineSmooth: false,
- chartPadding: {
- top: 10,
- right: -4,
- bottom: 10,
- left: -4
- },
- axisX: {
- showLabel: false,
- showGrid: false,
- offset: 0
- },
- axisY: {
- showLabel: false,
- showGrid: false,
- offset: 0
- },
- plugins: [Chartist.plugins.tooltip()]
- });
- })(); // Widget Sale Bar
- // ---------------
- (function () {
- new Chartist.Bar("#widgetSaleBar .ct-chart", {
- labels: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'K', 'L', 'M', 'N', 'O', 'P', 'Q'],
- series: [[50, 90, 100, 90, 110, 100, 120, 130, 115, 95, 80, 85, 100, 140, 130, 120]]
- }, {
- low: 0,
- fullWidth: true,
- chartPadding: {
- top: 0,
- right: 20,
- bottom: 30,
- left: 20
- },
- axisX: {
- showLabel: false,
- showGrid: false,
- offset: 0
- },
- axisY: {
- showLabel: false,
- showGrid: false,
- offset: 0
- },
- plugins: [Chartist.plugins.tooltip()]
- });
- })(); // Widget Overall Views
- // --------------------
- (function () {
- new Chartist.Bar("#widgetOverallViews .small-bar-one", {
- labels: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H'],
- series: [[120, 60, 100, 50, 40, 120, 80, 130]]
- }, {
- low: 0,
- fullWidth: true,
- chartPadding: {
- top: -10,
- right: 0,
- bottom: 0,
- left: 0
- },
- axisX: {
- showLabel: false,
- showGrid: false,
- offset: 0
- },
- axisY: {
- showLabel: false,
- showGrid: false,
- offset: 0
- },
- plugins: [Chartist.plugins.tooltip()]
- });
- new Chartist.Bar("#widgetOverallViews .small-bar-two", {
- labels: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H'],
- series: [[50, 90, 30, 90, 130, 40, 120, 90]]
- }, {
- low: 0,
- fullWidth: true,
- chartPadding: {
- top: -10,
- right: 0,
- bottom: 0,
- left: 0
- },
- axisX: {
- showLabel: false,
- showGrid: false,
- offset: 0
- },
- axisY: {
- showLabel: false,
- showGrid: false,
- offset: 0
- },
- plugins: [Chartist.plugins.tooltip()]
- });
- new Chartist.Line("#widgetOverallViews .line-chart", {
- labels: ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT'],
- series: [[20, 50, 70, 110, 100, 200, 230], [50, 80, 140, 130, 150, 110, 160]]
- }, {
- low: 0,
- showArea: false,
- showPoint: false,
- showLine: true,
- lineSmooth: false,
- fullWidth: true,
- chartPadding: {
- top: 0,
- right: 10,
- bottom: 0,
- left: 10
- },
- axisX: {
- showLabel: true,
- showGrid: false,
- offset: 30
- },
- axisY: {
- showLabel: true,
- showGrid: true,
- offset: 30
- },
- plugins: [Chartist.plugins.tooltip()]
- });
- })(); // Widget Timeline
- // ---------------
- (function () {
- var timeline_labels = [];
- var timeline_data1 = [];
- var timeline_data2 = [];
- var totalPoints = 20;
- var updateInterval = 1000;
- var now = new Date().getTime();
- function GetData() {
- timeline_labels.shift();
- timeline_data1.shift();
- timeline_data2.shift();
- while (timeline_data1.length < totalPoints) {
- var x = Math.random() * 100 + 800;
- var y = Math.random() * 100 + 400;
- timeline_labels.push(now += updateInterval);
- timeline_data1.push(x);
- timeline_data2.push(y);
- }
- }
- var timlelineData = {
- labels: timeline_labels,
- series: [timeline_data1, timeline_data2]
- };
- var timelineOptions = {
- low: 0,
- showArea: true,
- showPoint: false,
- showLine: false,
- fullWidth: true,
- chartPadding: {
- top: 0,
- right: 0,
- bottom: 0,
- left: 0
- },
- axisX: {
- showLabel: false,
- showGrid: false,
- offset: 0
- },
- axisY: {
- showLabel: false,
- showGrid: false,
- offset: 0
- },
- plugins: [Chartist.plugins.tooltip()]
- };
- new Chartist.Line("#widgetTimeline .ct-chart", timlelineData, timelineOptions);
- function update() {
- GetData();
- new Chartist.Line("#widgetTimeline .ct-chart", timlelineData, timelineOptions);
- setTimeout(update, updateInterval);
- }
- update();
- })();
- (function () {
- var snow = new Skycons({
- "color": Config.colors("blue-grey", 500)
- });
- snow.set(document.getElementById("widgetSnow"), "snow");
- snow.play();
- var sunny = new Skycons({
- "color": Config.colors("blue-grey", 700)
- });
- sunny.set(document.getElementById("widgetSunny"), "clear-day");
- sunny.play();
- })(); // Widget Linepoint
- // ----------------
- (function () {
- new Chartist.Line("#widgetLinepointDate .ct-chart", {
- labels: ['1', '2', '3', '4', '5', '6', '7', '8'],
- series: [[36, 45, 28, 19, 39, 46, 35, 13]]
- }, {
- low: 0,
- showArea: false,
- showPoint: true,
- showLine: true,
- fullWidth: true,
- lineSmooth: false,
- chartPadding: {
- top: 5,
- right: -4,
- bottom: 10,
- left: -4
- },
- axisX: {
- showLabel: false,
- showGrid: false,
- offset: 0
- },
- axisY: {
- showLabel: false,
- showGrid: false,
- offset: 0
- },
- plugins: [Chartist.plugins.tooltip()]
- });
- })();
- });
- });
|