initial commit

This commit is contained in:
greggy
2025-10-06 23:10:59 +02:00
commit ad46abd2ba
62 changed files with 4332 additions and 0 deletions

7
assets/js/bootstrap.bundle.min.js vendored Normal file

File diff suppressed because one or more lines are too long

7
assets/js/bootstrap.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,38 @@
window.raterJs({
element: document.querySelector("#basic"),
starSize: 32,
rateCallback:function rateCallback(rating, done) {
this.setRating(rating);
done();
}
});
window.raterJs({
element:document.querySelector("#step"),
rateCallback:function rateCallback(rating, done) {
this.setRating(rating);
done();
},
starSize:32,
step:0.5
})
window.raterJs({
element:document.querySelector("#unli1"),
rateCallback:function rateCallback(rating, done) {
this.setRating(rating);
done();
},
starSize:32,
max:10,
step:0.5
})
window.raterJs({
element:document.querySelector("#unli2"),
rateCallback:function rateCallback(rating, done) {
this.setRating(rating);
done();
},
starSize:32,
max:16,
step:0.5
})

View File

@@ -0,0 +1,154 @@
document.getElementById('basic').addEventListener('click', (e) => {
Swal.fire('Any fool can use a computer')
})
document.getElementById('footer').addEventListener('click', (e) => {
Swal.fire({
icon: 'error',
title: 'Oops...',
text: 'Something went wrong!',
footer: '<a href>Why do I have this issue?</a>'
})
})
document.getElementById('title').addEventListener('click', (e) => {
Swal.fire(
'The Internet?',
'That thing is still around?',
'question'
)
})
document.getElementById('success').addEventListener('click', (e) => {
Swal.fire({
icon: "success",
title: "Success"
})
})
document.getElementById('error').addEventListener('click', (e) => {
Swal.fire({
icon: "error",
title: "Error"
})
})
document.getElementById('warning').addEventListener('click', (e) => {
Swal.fire({
icon: "warning",
title: "Warning"
})
})
document.getElementById('info').addEventListener('click', (e) => {
Swal.fire({
icon: "info",
title: "Info"
})
})
document.getElementById('question').addEventListener('click', (e) => {
Swal.fire({
icon: "question",
title: "Question"
})
})
document.getElementById('text').addEventListener('click', (e) => {
Swal.fire({
title: 'Enter your IP address',
input: 'text',
inputLabel: 'Your IP address',
showCancelButton: true,
})
})
document.getElementById('email').addEventListener('click', async (e) => {
const { value: email } = await Swal.fire({
title: 'Input email address',
input: 'email',
inputLabel: 'Your email address',
inputPlaceholder: 'Enter your email address'
})
if (email) {
Swal.fire(`Entered email: ${email}`)
}
})
document.getElementById('url').addEventListener('click', async (e) => {
const { value: url } = await Swal.fire({
input: 'url',
inputLabel: 'URL address',
inputPlaceholder: 'Enter the URL'
})
if (url) {
Swal.fire(`Entered URL: ${url}`)
}
})
document.getElementById('password').addEventListener('click', async (e) => {
const { value: password } = await Swal.fire({
title: 'Enter your password',
input: 'password',
inputLabel: 'Password',
inputPlaceholder: 'Enter your password',
inputAttributes: {
maxlength: 10,
autocapitalize: 'off',
autocorrect: 'off'
}
})
if (password) {
Swal.fire(`Entered password: ${password}`)
}
})
document.getElementById('textarea').addEventListener('click', async (e) => {
const { value: text } = await Swal.fire({
input: 'textarea',
inputLabel: 'Message',
inputPlaceholder: 'Type your message here...',
inputAttributes: {
'aria-label': 'Type your message here'
},
showCancelButton: true
})
if (text) {
Swal.fire(text)
}
})
document.getElementById('select').addEventListener('click', async (e) => {
const { value: fruit } = await Swal.fire({
title: 'Select field validation',
input: 'select',
inputOptions: {
'Fruits': {
apples: 'Apples',
bananas: 'Bananas',
grapes: 'Grapes',
oranges: 'Oranges'
},
'Vegetables': {
potato: 'Potato',
broccoli: 'Broccoli',
carrot: 'Carrot'
},
'icecream': 'Ice cream'
},
inputPlaceholder: 'Select a fruit',
showCancelButton: true,
inputValidator: (value) => {
return new Promise((resolve) => {
if (value === 'oranges') {
resolve()
} else {
resolve('You need to select oranges :)')
}
})
}
})
if (fruit) {
Swal.fire(`You selected: ${fruit}`)
}
})

View File

@@ -0,0 +1,81 @@
document.getElementById('basic').addEventListener('click', () => {
Toastify({
text: "This is a toast",
duration: 3000
}).showToast();
})
document.getElementById('background').addEventListener('click', () => {
Toastify({
text: "This is a toast",
duration: 3000,
backgroundColor: "linear-gradient(to right, #00b09b, #96c93d)",
}).showToast();
})
document.getElementById('close').addEventListener('click', () => {
Toastify({
text: "Click close button",
duration: 3000,
close:true,
backgroundColor: "#4fbe87",
}).showToast();
})
document.getElementById('top-left').addEventListener('click', () => {
Toastify({
text: "This is toast in top left",
duration: 3000,
close:true,
gravity:"top",
position: "left",
backgroundColor: "#4fbe87",
}).showToast();
})
document.getElementById('top-center').addEventListener('click', () => {
Toastify({
text: "This is toast in top center",
duration: 3000,
close:true,
gravity:"top",
position: "center",
backgroundColor: "#4fbe87",
}).showToast();
})
document.getElementById('top-right').addEventListener('click', () => {
Toastify({
text: "This is toast in top right",
duration: 3000,
close:true,
gravity:"top",
position: "right",
backgroundColor: "#4fbe87",
}).showToast();
})
document.getElementById('bottom-right').addEventListener('click', () => {
Toastify({
text: "This is toast in bottom right",
duration: 3000,
close:true,
gravity:"bottom",
position: "right",
backgroundColor: "#4fbe87",
}).showToast();
})
document.getElementById('bottom-center').addEventListener('click', () => {
Toastify({
text: "This is toast in bottom center",
duration: 3000,
close:true,
gravity:"bottom",
position: "center",
backgroundColor: "#4fbe87",
}).showToast();
})
document.getElementById('bottom-left').addEventListener('click', () => {
Toastify({
text: "This is toast in bottom left",
duration: 3000,
close:true,
gravity:"bottom",
position: "left",
backgroundColor: "#4fbe87",
}).showToast();
})

51
assets/js/main.js Normal file
View File

@@ -0,0 +1,51 @@
function slideToggle(t,e,o){0===t.clientHeight?j(t,e,o,!0):j(t,e,o)}function slideUp(t,e,o){j(t,e,o)}function slideDown(t,e,o){j(t,e,o,!0)}function j(t,e,o,i){void 0===e&&(e=400),void 0===i&&(i=!1),t.style.overflow="hidden",i&&(t.style.display="block");var p,l=window.getComputedStyle(t),n=parseFloat(l.getPropertyValue("height")),a=parseFloat(l.getPropertyValue("padding-top")),s=parseFloat(l.getPropertyValue("padding-bottom")),r=parseFloat(l.getPropertyValue("margin-top")),d=parseFloat(l.getPropertyValue("margin-bottom")),g=n/e,y=a/e,m=s/e,u=r/e,h=d/e;window.requestAnimationFrame(function l(x){void 0===p&&(p=x);var f=x-p;i?(t.style.height=g*f+"px",t.style.paddingTop=y*f+"px",t.style.paddingBottom=m*f+"px",t.style.marginTop=u*f+"px",t.style.marginBottom=h*f+"px"):(t.style.height=n-g*f+"px",t.style.paddingTop=a-y*f+"px",t.style.paddingBottom=s-m*f+"px",t.style.marginTop=r-u*f+"px",t.style.marginBottom=d-h*f+"px"),f>=e?(t.style.height="",t.style.paddingTop="",t.style.paddingBottom="",t.style.marginTop="",t.style.marginBottom="",t.style.overflow="",i||(t.style.display="none"),"function"==typeof o&&o()):window.requestAnimationFrame(l)})}
let sidebarItems = document.querySelectorAll('.sidebar-item.has-sub');
for(var i = 0; i < sidebarItems.length; i++) {
let sidebarItem = sidebarItems[i];
sidebarItems[i].querySelector('.sidebar-link').addEventListener('click', function(e) {
e.preventDefault();
let submenu = sidebarItem.querySelector('.submenu');
if( submenu.classList.contains('active') ) submenu.style.display = "block"
if( submenu.style.display == "none" ) submenu.classList.add('active')
else submenu.classList.remove('active')
slideToggle(submenu, 300)
})
}
window.addEventListener('DOMContentLoaded', (event) => {
var w = window.innerWidth;
if(w < 1200) {
document.getElementById('sidebar').classList.remove('active');
}
});
window.addEventListener('resize', (event) => {
var w = window.innerWidth;
if(w < 1200) {
document.getElementById('sidebar').classList.remove('active');
}else{
document.getElementById('sidebar').classList.add('active');
}
});
document.querySelector('.burger-btn').addEventListener('click', () => {
document.getElementById('sidebar').classList.toggle('active');
})
document.querySelector('.sidebar-hide').addEventListener('click', () => {
document.getElementById('sidebar').classList.toggle('active');
})
// Perfect Scrollbar Init
if(typeof PerfectScrollbar == 'function') {
const container = document.querySelector(".sidebar-wrapper");
const ps = new PerfectScrollbar(container, {
wheelPropagation: false
});
}
// Scroll into active sidebar
document.querySelector('.sidebar-item.active').scrollIntoView(false)

View File

@@ -0,0 +1,116 @@
var optionsProfileVisit = {
annotations: {
position: 'back'
},
dataLabels: {
enabled:false
},
chart: {
type: 'bar',
height: 300
},
fill: {
opacity:1
},
plotOptions: {
},
series: [{
name: 'sales',
data: [9,20,30,20,10,20,30,20,10,20,30,20]
}],
colors: '#435ebe',
xaxis: {
categories: ["Jan","Feb","Mar","Apr","May","Jun","Jul", "Aug","Sep","Oct","Nov","Dec"],
},
}
let optionsVisitorsProfile = {
series: [70, 30],
labels: ['Male', 'Female'],
colors: ['#435ebe','#55c6e8'],
chart: {
type: 'donut',
width: '100%',
height:'350px'
},
legend: {
position: 'bottom'
},
plotOptions: {
pie: {
donut: {
size: '30%'
}
}
}
}
var optionsEurope = {
series: [{
name: 'series1',
data: [310, 800, 600, 430, 540, 340, 605, 805,430, 540, 340, 605]
}],
chart: {
height: 80,
type: 'area',
toolbar: {
show:false,
},
},
colors: ['#5350e9'],
stroke: {
width: 2,
},
grid: {
show:false,
},
dataLabels: {
enabled: false
},
xaxis: {
type: 'datetime',
categories: ["2018-09-19T00:00:00.000Z", "2018-09-19T01:30:00.000Z", "2018-09-19T02:30:00.000Z", "2018-09-19T03:30:00.000Z", "2018-09-19T04:30:00.000Z", "2018-09-19T05:30:00.000Z", "2018-09-19T06:30:00.000Z","2018-09-19T07:30:00.000Z","2018-09-19T08:30:00.000Z","2018-09-19T09:30:00.000Z","2018-09-19T10:30:00.000Z","2018-09-19T11:30:00.000Z"],
axisBorder: {
show:false
},
axisTicks: {
show:false
},
labels: {
show:false,
}
},
show:false,
yaxis: {
labels: {
show:false,
},
},
tooltip: {
x: {
format: 'dd/MM/yy HH:mm'
},
},
};
let optionsAmerica = {
...optionsEurope,
colors: ['#008b75'],
}
let optionsIndonesia = {
...optionsEurope,
colors: ['#dc3545'],
}
var chartProfileVisit = new ApexCharts(document.querySelector("#chart-profile-visit"), optionsProfileVisit);
var chartVisitorsProfile = new ApexCharts(document.getElementById('chart-visitors-profile'), optionsVisitorsProfile)
var chartEurope = new ApexCharts(document.querySelector("#chart-europe"), optionsEurope);
var chartAmerica = new ApexCharts(document.querySelector("#chart-america"), optionsAmerica);
var chartIndonesia = new ApexCharts(document.querySelector("#chart-indonesia"), optionsIndonesia);
chartIndonesia.render();
chartAmerica.render();
chartEurope.render();
chartProfileVisit.render();
chartVisitorsProfile.render()

View File

@@ -0,0 +1,32 @@
var snow = new Quill('#snow', {
theme: 'snow'
});
var bubble = new Quill('#bubble', {
theme: 'bubble'
});
new Quill("#full", {
bounds: "#full-container .editor",
modules: {
toolbar: [
[{ font: [] }, { size: [] }],
["bold", "italic", "underline", "strike"],
[
{ color: [] },
{ background: [] }
],
[
{ script: "super" },
{ script: "sub" }
],
[
{ list: "ordered" },
{ list: "bullet" },
{ indent: "-1" },
{ indent: "+1" }
],
["direction", { align: [] }],
["link", "image", "video"],
["clean"]]
},
theme: "snow"
})

View File

@@ -0,0 +1,519 @@
var lineOptions = {
chart: {
type: "line",
},
series: [
{
name: "sales",
data: [30, 40, 35, 50, 49, 60, 70, 91, 125],
},
],
xaxis: {
categories: [1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999],
},
};
var candleOptions = {
series: [
{
name: "candle",
data: [
{
x: new Date(1538778600000),
y: [6629.81, 6650.5, 6623.04, 6633.33],
},
{
x: new Date(1538780400000),
y: [6632.01, 6643.59, 6620, 6630.11],
},
{
x: new Date(1538782200000),
y: [6630.71, 6648.95, 6623.34, 6635.65],
},
{
x: new Date(1538784000000),
y: [6635.65, 6651, 6629.67, 6638.24],
},
{
x: new Date(1538785800000),
y: [6638.24, 6640, 6620, 6624.47],
},
{
x: new Date(1538787600000),
y: [6624.53, 6636.03, 6621.68, 6624.31],
},
{
x: new Date(1538789400000),
y: [6624.61, 6632.2, 6617, 6626.02],
},
{
x: new Date(1538791200000),
y: [6627, 6627.62, 6584.22, 6603.02],
},
{
x: new Date(1538793000000),
y: [6605, 6608.03, 6598.95, 6604.01],
},
{
x: new Date(1538794800000),
y: [6604.5, 6614.4, 6602.26, 6608.02],
},
{
x: new Date(1538796600000),
y: [6608.02, 6610.68, 6601.99, 6608.91],
},
{
x: new Date(1538798400000),
y: [6608.91, 6618.99, 6608.01, 6612],
},
{
x: new Date(1538800200000),
y: [6612, 6615.13, 6605.09, 6612],
},
{
x: new Date(1538802000000),
y: [6612, 6624.12, 6608.43, 6622.95],
},
{
x: new Date(1538803800000),
y: [6623.91, 6623.91, 6615, 6615.67],
},
{
x: new Date(1538805600000),
y: [6618.69, 6618.74, 6610, 6610.4],
},
{
x: new Date(1538807400000),
y: [6611, 6622.78, 6610.4, 6614.9],
},
{
x: new Date(1538809200000),
y: [6614.9, 6626.2, 6613.33, 6623.45],
},
{
x: new Date(1538811000000),
y: [6623.48, 6627, 6618.38, 6620.35],
},
{
x: new Date(1538812800000),
y: [6619.43, 6620.35, 6610.05, 6615.53],
},
{
x: new Date(1538814600000),
y: [6615.53, 6617.93, 6610, 6615.19],
},
{
x: new Date(1538816400000),
y: [6615.19, 6621.6, 6608.2, 6620],
},
{
x: new Date(1538818200000),
y: [6619.54, 6625.17, 6614.15, 6620],
},
{
x: new Date(1538820000000),
y: [6620.33, 6634.15, 6617.24, 6624.61],
},
{
x: new Date(1538821800000),
y: [6625.95, 6626, 6611.66, 6617.58],
},
{
x: new Date(1538823600000),
y: [6619, 6625.97, 6595.27, 6598.86],
},
{
x: new Date(1538825400000),
y: [6598.86, 6598.88, 6570, 6587.16],
},
{
x: new Date(1538827200000),
y: [6588.86, 6600, 6580, 6593.4],
},
{
x: new Date(1538829000000),
y: [6593.99, 6598.89, 6585, 6587.81],
},
{
x: new Date(1538830800000),
y: [6587.81, 6592.73, 6567.14, 6578],
},
{
x: new Date(1538832600000),
y: [6578.35, 6581.72, 6567.39, 6579],
},
{
x: new Date(1538834400000),
y: [6579.38, 6580.92, 6566.77, 6575.96],
},
{
x: new Date(1538836200000),
y: [6575.96, 6589, 6571.77, 6588.92],
},
{
x: new Date(1538838000000),
y: [6588.92, 6594, 6577.55, 6589.22],
},
{
x: new Date(1538839800000),
y: [6589.3, 6598.89, 6589.1, 6596.08],
},
{
x: new Date(1538841600000),
y: [6597.5, 6600, 6588.39, 6596.25],
},
{
x: new Date(1538843400000),
y: [6598.03, 6600, 6588.73, 6595.97],
},
{
x: new Date(1538845200000),
y: [6595.97, 6602.01, 6588.17, 6602],
},
{
x: new Date(1538847000000),
y: [6602, 6607, 6596.51, 6599.95],
},
{
x: new Date(1538848800000),
y: [6600.63, 6601.21, 6590.39, 6591.02],
},
{
x: new Date(1538850600000),
y: [6591.02, 6603.08, 6591, 6591],
},
{
x: new Date(1538852400000),
y: [6591, 6601.32, 6585, 6592],
},
{
x: new Date(1538854200000),
y: [6593.13, 6596.01, 6590, 6593.34],
},
{
x: new Date(1538856000000),
y: [6593.34, 6604.76, 6582.63, 6593.86],
},
{
x: new Date(1538857800000),
y: [6593.86, 6604.28, 6586.57, 6600.01],
},
{
x: new Date(1538859600000),
y: [6601.81, 6603.21, 6592.78, 6596.25],
},
{
x: new Date(1538861400000),
y: [6596.25, 6604.2, 6590, 6602.99],
},
{
x: new Date(1538863200000),
y: [6602.99, 6606, 6584.99, 6587.81],
},
{
x: new Date(1538865000000),
y: [6587.81, 6595, 6583.27, 6591.96],
},
{
x: new Date(1538866800000),
y: [6591.97, 6596.07, 6585, 6588.39],
},
{
x: new Date(1538868600000),
y: [6587.6, 6598.21, 6587.6, 6594.27],
},
{
x: new Date(1538870400000),
y: [6596.44, 6601, 6590, 6596.55],
},
{
x: new Date(1538872200000),
y: [6598.91, 6605, 6596.61, 6600.02],
},
{
x: new Date(1538874000000),
y: [6600.55, 6605, 6589.14, 6593.01],
},
{
x: new Date(1538875800000),
y: [6593.15, 6605, 6592, 6603.06],
},
{
x: new Date(1538877600000),
y: [6603.07, 6604.5, 6599.09, 6603.89],
},
{
x: new Date(1538879400000),
y: [6604.44, 6604.44, 6600, 6603.5],
},
{
x: new Date(1538881200000),
y: [6603.5, 6603.99, 6597.5, 6603.86],
},
{
x: new Date(1538883000000),
y: [6603.85, 6605, 6600, 6604.07],
},
{
x: new Date(1538884800000),
y: [6604.98, 6606, 6604.07, 6606],
},
],
},
],
chart: {
height: 350,
type: "candlestick",
},
title: {
text: "CandleStick Chart - Category X-axis",
align: "left",
},
annotations: {
xaxis: [
{
x: "Oct 06 14:00",
borderColor: "#00E396",
label: {
borderColor: "#00E396",
style: {
fontSize: "12px",
color: "#fff",
background: "#00E396",
},
orientation: "horizontal",
offsetY: 7,
text: "Annotation Test",
},
},
],
},
tooltip: {
enabled: true,
},
xaxis: {
type: "category",
labels: {
formatter: function(val) {
return dayjs(val).format("MMM DD HH:mm");
},
},
},
yaxis: {
tooltip: {
enabled: true,
},
},
};
var barOptions = {
series: [
{
name: "Net Profit",
data: [44, 55, 57, 56, 61, 58, 63, 60, 66],
},
{
name: "Revenue",
data: [76, 85, 101, 98, 87, 105, 91, 114, 94],
},
{
name: "Free Cash Flow",
data: [35, 41, 36, 26, 45, 48, 52, 53, 41],
},
],
chart: {
type: "bar",
height: 350,
},
plotOptions: {
bar: {
horizontal: false,
columnWidth: "55%",
endingShape: "rounded",
},
},
dataLabels: {
enabled: false,
},
stroke: {
show: true,
width: 2,
colors: ["transparent"],
},
xaxis: {
categories: ["Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct"],
},
yaxis: {
title: {
text: "$ (thousands)",
},
},
fill: {
opacity: 1,
},
tooltip: {
y: {
formatter: function(val) {
return "$ " + val + " thousands";
},
},
},
};
var radialGradientOptions = {
series: [75],
chart: {
height: 350,
type: "radialBar",
toolbar: {
show: true,
},
},
plotOptions: {
radialBar: {
startAngle: -135,
endAngle: 225,
hollow: {
margin: 0,
size: "70%",
background: "#fff",
image: undefined,
imageOffsetX: 0,
imageOffsetY: 0,
position: "front",
dropShadow: {
enabled: true,
top: 3,
left: 0,
blur: 4,
opacity: 0.24,
},
},
track: {
background: "#fff",
strokeWidth: "67%",
margin: 0, // margin is in pixels
dropShadow: {
enabled: true,
top: -3,
left: 0,
blur: 4,
opacity: 0.35,
},
},
dataLabels: {
show: true,
name: {
offsetY: -10,
show: true,
color: "#888",
fontSize: "17px",
},
value: {
formatter: function(val) {
return parseInt(val);
},
color: "#111",
fontSize: "36px",
show: true,
},
},
},
},
fill: {
type: "gradient",
gradient: {
shade: "dark",
type: "horizontal",
shadeIntensity: 0.5,
gradientToColors: ["#ABE5A1"],
inverseColors: true,
opacityFrom: 1,
opacityTo: 1,
stops: [0, 100],
},
},
stroke: {
lineCap: "round",
},
labels: ["Percent"],
};
var areaOptions = {
series: [
{
name: "series1",
data: [31, 40, 28, 51, 42, 109, 100],
},
{
name: "series2",
data: [11, 32, 45, 32, 34, 52, 41],
},
],
chart: {
height: 350,
type: "area",
},
dataLabels: {
enabled: false,
},
stroke: {
curve: "smooth",
},
xaxis: {
type: "datetime",
categories: [
"2018-09-19T00:00:00.000Z",
"2018-09-19T01:30:00.000Z",
"2018-09-19T02:30:00.000Z",
"2018-09-19T03:30:00.000Z",
"2018-09-19T04:30:00.000Z",
"2018-09-19T05:30:00.000Z",
"2018-09-19T06:30:00.000Z",
],
},
tooltip: {
x: {
format: "dd/MM/yy HH:mm",
},
},
};
var radialBarOptions = {
series: [44, 55, 67, 83],
chart: {
height: 350,
type: "radialBar",
},
plotOptions: {
radialBar: {
dataLabels: {
name: {
fontSize: "22px",
},
value: {
fontSize: "16px",
},
total: {
show: true,
label: "Total",
formatter: function(w) {
// By default this function returns the average of all series. The below is just an example to show the use of custom formatter function
return 249;
},
},
},
},
},
labels: ["Apples", "Oranges", "Bananas", "Berries"],
};
var bar = new ApexCharts(document.querySelector("#bar"), barOptions);
var line = new ApexCharts(document.querySelector("#line"), lineOptions);
var candle = new ApexCharts(document.querySelector("#candle"), candleOptions);
var radialGradient = new ApexCharts(document.querySelector("#radialGradient"), radialGradientOptions);
var area = new ApexCharts(document.querySelector("#area"), areaOptions);
area.render();
radialGradient.render();
candle.render();
bar.render();
line.render();

View File

@@ -0,0 +1,427 @@
var chartColors = {
red: 'rgb(255, 99, 132)',
orange: 'rgb(255, 159, 64)',
yellow: 'rgb(255, 205, 86)',
green: 'rgb(75, 192, 192)',
info: '#41B1F9',
blue: '#3245D1',
purple: 'rgb(153, 102, 255)',
grey: '#EBEFF6'
};
var config1 = {
type: "line",
data: {
labels: ["January", "February", "March", "April", "May", "June", "July"],
datasets: [
{
label: "Balance",
backgroundColor: "#fff",
borderColor: "#fff",
data: [20, 40, 20, 70, 10, 50, 20],
fill: false,
pointBorderWidth: 100,
pointBorderColor: "transparent",
pointRadius: 3,
pointBackgroundColor: "transparent",
pointHoverBackgroundColor: "rgba(63,82,227,1)",
},
],
},
options: {
responsive: true,
maintainAspectRatio: false,
layout: {
padding: {
left: -10,
top: 10,
},
},
legend: {
display: false,
},
title: {
display: false,
},
tooltips: {
mode: "index",
intersect: false,
},
hover: {
mode: "nearest",
intersect: true,
},
scales: {
xAxes: [
{
gridLines: {
drawBorder: false,
display: false,
},
ticks: {
display: false,
},
},
],
yAxes: [
{
gridLines: {
display: false,
drawBorder: false,
},
ticks: {
display: false,
},
},
],
},
},
};
var config2 = {
type: "line",
data: {
labels: ["January", "February", "March", "April", "May", "June", "July"],
datasets: [
{
label: "Revenue",
backgroundColor: "#fff",
borderColor: "#fff",
data: [20, 800, 300, 400, 10, 50, 20],
fill: false,
pointBorderWidth: 100,
pointBorderColor: "transparent",
pointRadius: 3,
pointBackgroundColor: "transparent",
pointHoverBackgroundColor: "rgba(63,82,227,1)",
},
],
},
options: {
responsive: true,
maintainAspectRatio: false,
layout: {
padding: {
left: -10,
top: 10,
},
},
legend: {
display: false,
},
title: {
display: false,
},
tooltips: {
mode: "index",
intersect: false,
},
hover: {
mode: "nearest",
intersect: true,
},
scales: {
xAxes: [
{
gridLines: {
drawBorder: false,
display: false,
},
ticks: {
display: false,
},
},
],
yAxes: [
{
gridLines: {
display: false,
drawBorder: false,
},
ticks: {
display: false,
},
},
],
},
},
};
var config3 = {
type: "line",
data: {
labels: ["January", "February", "March", "April", "May", "June", "July"],
datasets: [
{
label: "Orders",
backgroundColor: "#fff",
borderColor: "#fff",
data: [20, 40, 20, 200, 10, 540, 723],
fill: false,
pointBorderWidth: 100,
pointBorderColor: "transparent",
pointRadius: 3,
pointBackgroundColor: "transparent",
pointHoverBackgroundColor: "rgba(63,82,227,1)",
},
],
},
options: {
responsive: true,
maintainAspectRatio: false,
layout: {
padding: {
left: -10,
top: 10,
},
},
legend: {
display: false,
},
title: {
display: false,
text: "Chart.js Line Chart",
},
tooltips: {
mode: "index",
intersect: false,
},
hover: {
mode: "nearest",
intersect: true,
},
scales: {
xAxes: [
{
gridLines: {
drawBorder: false,
display: false,
},
ticks: {
display: false,
},
},
],
yAxes: [
{
gridLines: {
display: false,
drawBorder: false,
},
ticks: {
display: false,
},
},
],
},
},
};
var config4 = {
type: "line",
data: {
labels: ["January", "February", "March", "April", "May", "June", "July"],
datasets: [
{
label: "My First dataset",
backgroundColor: "#fff",
borderColor: "#fff",
data: [20, 40, 20, 70, 10, 5, 23],
fill: false,
pointBorderWidth: 100,
pointBorderColor: "transparent",
pointRadius: 3,
pointBackgroundColor: "transparent",
pointHoverBackgroundColor: "rgba(63,82,227,1)",
},
],
},
options: {
responsive: true,
maintainAspectRatio: false,
layout: {
padding: {
left: -10,
top: 10,
},
},
legend: {
display: false,
},
title: {
display: false,
text: "Chart.js Line Chart",
},
tooltips: {
mode: "index",
intersect: false,
},
hover: {
mode: "nearest",
intersect: true,
},
scales: {
xAxes: [
{
gridLines: {
drawBorder: false,
display: false,
},
ticks: {
display: false,
},
},
],
yAxes: [
{
gridLines: {
display: false,
drawBorder: false,
},
ticks: {
display: false,
},
},
],
},
},
};
var ctxBar = document.getElementById("bar").getContext("2d");
var myBar = new Chart(ctxBar, {
type: 'bar',
data: {
labels: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul"],
datasets: [{
label: 'Students',
backgroundColor: [chartColors.grey, chartColors.grey, chartColors.grey, chartColors.grey, chartColors.info, chartColors.blue, chartColors.grey],
data: [
5,
10,
30,
40,
35,
55,
15,
]
}]
},
options: {
responsive: true,
barRoundness: 1,
title: {
display: true,
text: "Students in 2020"
},
legend: {
display: false
},
scales: {
yAxes: [{
ticks: {
beginAtZero: true,
suggestedMax: 40 + 20,
padding: 10,
},
gridLines: {
drawBorder: false,
}
}],
xAxes: [{
gridLines: {
display: false,
drawBorder: false
}
}]
}
}
});
var line = document.getElementById("line").getContext("2d");
var gradient = line.createLinearGradient(0, 0, 0, 400);
gradient.addColorStop(0, 'rgba(50, 69, 209,1)');
gradient.addColorStop(1, 'rgba(265, 177, 249,0)');
var gradient2 = line.createLinearGradient(0, 0, 0, 400);
gradient2.addColorStop(0, 'rgba(255, 91, 92,1)');
gradient2.addColorStop(1, 'rgba(265, 177, 249,0)');
var myline = new Chart(line, {
type: 'line',
data: {
labels: ['16-07-2018', '17-07-2018', '18-07-2018', '19-07-2018', '20-07-2018', '21-07-2018', '22-07-2018', '23-07-2018', '24-07-2018', '25-07-2018'],
datasets: [{
label: 'Balance',
data: [50, 25, 61, 50, 72, 52, 60, 41, 30, 45],
backgroundColor: "rgba(50, 69, 209,.6)",
borderWidth: 3,
borderColor: 'rgba(63,82,227,1)',
pointBorderWidth: 0,
pointBorderColor: 'transparent',
pointRadius: 3,
pointBackgroundColor: 'transparent',
pointHoverBackgroundColor: 'rgba(63,82,227,1)',
}, {
label: 'Balance',
data: [20, 35, 45, 75, 37, 86, 45, 65, 25, 53],
backgroundColor: "rgba(253, 183, 90,.6)",
borderWidth: 3,
borderColor: 'rgba(253, 183, 90,.6)',
pointBorderWidth: 0,
pointBorderColor: 'transparent',
pointRadius: 3,
pointBackgroundColor: 'transparent',
pointHoverBackgroundColor: 'rgba(63,82,227,1)',
}]
},
options: {
responsive: true,
layout: {
padding: {
top: 10,
},
},
tooltips: {
intersect: false,
titleFontFamily: 'Helvetica',
titleMarginBottom: 10,
xPadding: 10,
yPadding: 10,
cornerRadius: 3,
},
legend: {
display: true,
},
scales: {
yAxes: [
{
gridLines: {
display: true,
drawBorder: true,
},
ticks: {
display: true,
},
},
],
xAxes: [
{
gridLines: {
drawBorder: false,
display: false,
},
ticks: {
display: false,
},
},
],
},
}
});
// let ctx1 = document.getElementById("canvas1").getContext("2d");
// let ctx2 = document.getElementById("canvas2").getContext("2d");
// let ctx3 = document.getElementById("canvas3").getContext("2d");
// let ctx4 = document.getElementById("canvas4").getContext("2d");
// var lineChart1 = new Chart(ctx1, config1);
// var lineChart2 = new Chart(ctx2, config2);
// var lineChart3 = new Chart(ctx3, config3);
// var lineChart4 = new Chart(ctx4, config4);

0
assets/js/vendors.js Normal file
View File