198 lines
9.1 KiB
JavaScript
198 lines
9.1 KiB
JavaScript
!function (a) {
|
|
"use strict";
|
|
|
|
function e() {
|
|
this.$body = a("body"), this.charts = []
|
|
}
|
|
|
|
e.prototype.initCharts = function () {
|
|
window.Apex = {
|
|
chart: {parentHeightOffset: 0, toolbar: {show: !1}},
|
|
grid: {padding: {left: 0, right: 0}},
|
|
colors: ["#3e60d5", "#47ad77", "#fa5c7c", "#ffbc00"]
|
|
};
|
|
var e = ["#3e60d5"], t = a("#campaign-sent-chart").data("colors"), r = {
|
|
chart: {type: "bar", height: 60, sparkline: {enabled: !0}},
|
|
plotOptions: {bar: {columnWidth: "60%"}},
|
|
colors: e = t ? t.split(",") : e,
|
|
series: [{data: [25, 66, 41, 89, 63, 25, 44, 12, 36, 9, 54]}],
|
|
labels: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11],
|
|
xaxis: {crosshairs: {width: 1}},
|
|
tooltip: {
|
|
fixed: {enabled: !1}, x: {show: !1}, y: {
|
|
title: {
|
|
formatter: function (e) {
|
|
return ""
|
|
}
|
|
}
|
|
}, marker: {show: !1}
|
|
}
|
|
}, e = (new ApexCharts(document.querySelector("#campaign-sent-chart"), r).render(), ["#3e60d5"]), r = {
|
|
chart: {type: "line", height: 60, sparkline: {enabled: !0}},
|
|
series: [{data: [25, 66, 41, 89, 63, 25, 44, 12, 36, 9, 54]}],
|
|
stroke: {width: 2, curve: "smooth"},
|
|
markers: {size: 0},
|
|
colors: e = (t = a("#new-leads-chart").data("colors")) ? t.split(",") : e,
|
|
tooltip: {
|
|
fixed: {enabled: !1}, x: {show: !1}, y: {
|
|
title: {
|
|
formatter: function (e) {
|
|
return ""
|
|
}
|
|
}
|
|
}, marker: {show: !1}
|
|
}
|
|
}, e = (new ApexCharts(document.querySelector("#new-leads-chart"), r).render(), ["#3e60d5"]), r = {
|
|
chart: {type: "bar", height: 60, sparkline: {enabled: !0}},
|
|
plotOptions: {bar: {columnWidth: "60%"}},
|
|
colors: e = (t = a("#deals-chart").data("colors")) ? t.split(",") : e,
|
|
series: [{data: [12, 14, 2, 47, 42, 15, 47, 75, 65, 19, 14]}],
|
|
labels: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11],
|
|
xaxis: {crosshairs: {width: 1}},
|
|
tooltip: {
|
|
fixed: {enabled: !1}, x: {show: !1}, y: {
|
|
title: {
|
|
formatter: function (e) {
|
|
return ""
|
|
}
|
|
}
|
|
}, marker: {show: !1}
|
|
}
|
|
}, e = (new ApexCharts(document.querySelector("#deals-chart"), r).render(), ["#3e60d5"]), r = {
|
|
chart: {type: "line", height: 60, sparkline: {enabled: !0}},
|
|
plotOptions: {bar: {columnWidth: "60%"}},
|
|
colors: e = (t = a("#booked-revenue-chart").data("colors")) ? t.split(",") : e,
|
|
colors: e,
|
|
series: [{data: [47, 45, 74, 14, 56, 74, 14, 11, 7, 39, 82]}],
|
|
labels: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11],
|
|
stroke: {width: 2, curve: "smooth"},
|
|
markers: {size: 0},
|
|
tooltip: {
|
|
fixed: {enabled: !1}, x: {show: !1}, y: {
|
|
title: {
|
|
formatter: function (e) {
|
|
return ""
|
|
}
|
|
}
|
|
}, marker: {show: !1}
|
|
}
|
|
},
|
|
e = (new ApexCharts(document.querySelector("#booked-revenue-chart"), r).render(), ["#3e60d5", "#47ad77", "#fa5c7c", "#ffbc00"]),
|
|
r = {
|
|
series: [{name: "Revenue", type: "column", data: [440, 505, 414, 671, 227]}, {
|
|
name: "Sales",
|
|
type: "line",
|
|
data: [23, 42, 35, 27, 43]
|
|
}],
|
|
chart: {height: 374, type: "line", offsetY: 10},
|
|
stroke: {width: [2, 3]},
|
|
plotOptions: {bar: {columnWidth: "50%"}},
|
|
colors: e = (t = a("#revenue-chart").data("colors")) ? t.split(",") : e,
|
|
dataLabels: {enabled: !0, enabledOnSeries: [1]},
|
|
labels: ["1 Jan", "2 Jan", "3 Jan", "4 Jan", "5 Jan"],
|
|
xaxis: {type: "datetime"},
|
|
legend: {offsetY: 7},
|
|
grid: {padding: {bottom: 20}},
|
|
fill: {
|
|
type: "gradient",
|
|
gradient: {
|
|
shade: "light",
|
|
type: "horizontal",
|
|
shadeIntensity: .25,
|
|
gradientToColors: void 0,
|
|
inverseColors: !0,
|
|
opacityFrom: .75,
|
|
opacityTo: .75,
|
|
stops: [0, 0, 0]
|
|
}
|
|
},
|
|
yaxis: [{title: {text: "Net Revenue"}}, {opposite: !0, title: {text: "Number of Sales"}}]
|
|
},
|
|
e = (new ApexCharts(document.querySelector("#revenue-chart"), r).render(), ["#3e60d5", "#47ad77", "#fa5c7c", "#ffbc00"]),
|
|
r = {
|
|
chart: {height: 287, type: "radialBar"},
|
|
plotOptions: {
|
|
radialBar: {
|
|
startAngle: -135,
|
|
endAngle: 135,
|
|
dataLabels: {
|
|
name: {fontSize: "14px", color: void 0, offsetY: 100},
|
|
value: {
|
|
offsetY: 55, fontSize: "24px", color: void 0, formatter: function (e) {
|
|
return e + "%"
|
|
}
|
|
}
|
|
},
|
|
track: {background: "rgba(170,184,197, 0.2)", margin: 0}
|
|
}
|
|
},
|
|
fill: {
|
|
gradient: {
|
|
enabled: !0,
|
|
shade: "dark",
|
|
shadeIntensity: .2,
|
|
inverseColors: !1,
|
|
opacityFrom: 1,
|
|
opacityTo: 1,
|
|
stops: [0, 50, 65, 91]
|
|
}
|
|
},
|
|
stroke: {dashArray: 4},
|
|
colors: e = (t = a("#average-sales").data("colors")) ? t.split(",") : e,
|
|
series: [67],
|
|
labels: ["Returning Customer"],
|
|
responsive: [{breakpoint: 380, options: {chart: {height: 180}}}],
|
|
grid: {padding: {top: 0, right: 0, bottom: 0, left: 0}}
|
|
},
|
|
e = (new ApexCharts(document.querySelector("#average-sales"), r).render(), ["#3e60d5", "#47ad77", "#fa5c7c", "#ffbc00"]),
|
|
r = {
|
|
chart: {height: 362, type: "bar"},
|
|
plotOptions: {bar: {horizontal: !0}},
|
|
colors: e = (t = a("#country-chart").data("colors")) ? t.split(",") : e,
|
|
dataLabels: {enabled: !1},
|
|
series: [{name: "Orders", data: [90, 75, 60, 50, 45, 36, 28, 20, 15, 12]}],
|
|
xaxis: {
|
|
categories: ["India", "China", "United States", "Japan", "France", "Italy", "Netherlands", "United Kingdom", "Canada", "South Korea"],
|
|
axisBorder: {show: !1},
|
|
labels: {
|
|
formatter: function (e) {
|
|
return e + "%"
|
|
}
|
|
}
|
|
},
|
|
grid: {strokeDashArray: [5]}
|
|
};
|
|
new ApexCharts(document.querySelector("#country-chart"), r).render()
|
|
}, e.prototype.initMaps = function () {
|
|
0 < a("#world-map-markers").length && a("#world-map-markers").vectorMap({
|
|
map: "world_mill_en",
|
|
normalizeFunction: "polynomial",
|
|
hoverOpacity: .7,
|
|
hoverColor: !1,
|
|
regionStyle: {initial: {fill: "rgba(145,166,189,.25)"}},
|
|
markerStyle: {
|
|
initial: {
|
|
r: 9,
|
|
fill: "#3e60d5",
|
|
"fill-opacity": .9,
|
|
stroke: "#fff",
|
|
"stroke-width": 7,
|
|
"stroke-opacity": .4
|
|
}, hover: {stroke: "#fff", "fill-opacity": 1, "stroke-width": 1.5}
|
|
},
|
|
backgroundColor: "transparent",
|
|
markers: [{latLng: [40.71, -74], name: "New York"}, {
|
|
latLng: [37.77, -122.41],
|
|
name: "San Francisco"
|
|
}, {latLng: [-33.86, 151.2], name: "Sydney"}, {latLng: [1.3, 103.8], name: "Singapore"}],
|
|
zoomOnScroll: !1
|
|
})
|
|
}, e.prototype.init = function () {
|
|
a("#dash-daterange").daterangepicker({singleDatePicker: !0}), this.initCharts(), this.initMaps()
|
|
}, a.Dashboard = new e, a.Dashboard.Constructor = e
|
|
}(window.jQuery), function (t) {
|
|
"use strict";
|
|
t(document).ready(function (e) {
|
|
t.Dashboard.init()
|
|
})
|
|
}(window.jQuery); |