added admin interface

This commit is contained in:
kicap1992
2021-12-21 00:25:43 +08:00
parent 9adf18c7b9
commit a25104fadc
3496 changed files with 280326 additions and 7 deletions

View File

@ -0,0 +1,613 @@
$(function() {
"use strict";
$(document).ready(function(){
var chart = c3.generate({
bindto: '#chart-employment', // id of chart wrapper
data: {
columns: [
// each columns data
['data1', 2, 8, 6, 7, 14, 11],
['data2', 5, 15, 11, 15, 21, 25],
['data3', 17, 18, 21, 20, 30, 29]
],
type: 'line', // default type of chart
colors: {
'data1': hexabit.colors["orange"],
'data2': hexabit.colors["blue"],
'data3': hexabit.colors["green"]
},
names: {
// name of each serie
'data1': 'Development',
'data2': 'Marketing',
'data3': 'Sales'
}
},
axis: {
x: {
type: 'category',
// name of each category
categories: ['2013', '2014', '2015', '2016', '2017', '2018']
},
},
legend: {
show: true, //hide legend
},
padding: {
bottom: 0,
top: 0
},
});
});
$(document).ready(function(){
var chart = c3.generate({
bindto: '#chart-temperature', // id of chart wrapper
data: {
columns: [
// each columns data
['data1', 7.0, 6.9, 9.5, 14.5, 18.4, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6],
['data2', 3.9, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0, 16.6, 14.2, 10.3, 6.6, 4.8]
],
labels: true,
type: 'line', // default type of chart
colors: {
'data1': hexabit.colors["blue"],
'data2': hexabit.colors["green"]
},
names: {
// name of each serie
'data1': 'Tokyo',
'data2': 'London'
}
},
axis: {
x: {
type: 'category',
// name of each category
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun']
},
},
legend: {
show: true, //hide legend
},
padding: {
bottom: 0,
top: 0
},
});
});
$(document).ready(function(){
var chart = c3.generate({
bindto: '#chart-area', // id of chart wrapper
data: {
columns: [
// each columns data
['data1', 11, 8, 15, 18, 19, 17],
['data2', 7, 7, 5, 7, 9, 12]
],
type: 'area', // default type of chart
colors: {
'data1': hexabit.colors["blue"],
'data2': hexabit.colors["pink"]
},
names: {
// name of each serie
'data1': 'Maximum',
'data2': 'Minimum'
}
},
axis: {
x: {
type: 'category',
// name of each category
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun']
},
},
legend: {
show: true, //hide legend
},
padding: {
bottom: 0,
top: 0
},
});
});
$(document).ready(function(){
var chart = c3.generate({
bindto: '#chart-area-spline', // id of chart wrapper
data: {
columns: [
// each columns data
['data1', 11, 8, 15, 18, 19, 17],
['data2', 7, 7, 5, 7, 9, 12]
],
type: 'area-spline', // default type of chart
colors: {
'data1': hexabit.colors["blue"],
'data2': hexabit.colors["pink"]
},
names: {
// name of each serie
'data1': 'Maximum',
'data2': 'Minimum'
}
},
axis: {
x: {
type: 'category',
// name of each category
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun']
},
},
legend: {
show: true, //hide legend
},
padding: {
bottom: 0,
top: 0
},
});
});
$(document).ready(function(){
var chart = c3.generate({
bindto: '#chart-area-spline-sracked', // id of chart wrapper
data: {
columns: [
// each columns data
['data1', 11, 8, 15, 18, 19, 17],
['data2', 7, 7, 5, 7, 9, 12]
],
type: 'area-spline', // default type of chart
groups: [
[ 'data1', 'data2']
],
colors: {
'data1': hexabit.colors["blue"],
'data2': hexabit.colors["pink"]
},
names: {
// name of each serie
'data1': 'Maximum',
'data2': 'Minimum'
}
},
axis: {
x: {
type: 'category',
// name of each category
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun']
},
},
legend: {
show: true, //hide legend
},
padding: {
bottom: 0,
top: 0
},
});
});
$(document).ready(function(){
var chart = c3.generate({
bindto: '#chart-spline', // id of chart wrapper
data: {
columns: [
// each columns data
['data1', 0.2, 0.8, 0.8, 0.8, 1, 1.3, 1.5, 2.9, 1.9, 2.6, 1.6, 3, 4, 3.6, 4.5, 4.2, 4.5, 4.5, 4, 3.1, 2.7, 4, 2.7, 2.3, 2.3, 4.1, 7.7, 7.1, 5.6, 6.1, 5.8, 8.6, 7.2, 9, 10.9, 11.5, 11.6, 11.1, 12, 12.3, 10.7, 9.4, 9.8, 9.6, 9.8, 9.5, 8.5, 7.4, 7.6],
['data2', 0, 0, 0.6, 0.9, 0.8, 0.2, 0, 0, 0, 0.1, 0.6, 0.7, 0.8, 0.6, 0.2, 0, 0.1, 0.3, 0.3, 0, 0.1, 0, 0, 0, 0.2, 0.1, 0, 0.3, 0, 0.1, 0.2, 0.1, 0.3, 0.3, 0, 3.1, 3.1, 2.5, 1.5, 1.9, 2.1, 1, 2.3, 1.9, 1.2, 0.7, 1.3, 0.4, 0.3]
],
labels: true,
type: 'spline', // default type of chart
colors: {
'data1': hexabit.colors["blue"],
'data2': hexabit.colors["green"]
},
names: {
// name of each serie
'data1': 'Hestavollane',
'data2': 'Vik'
}
},
axis: {
x: {
type: 'category',
// name of each category
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun']
},
},
legend: {
show: true, //hide legend
},
padding: {
bottom: 0,
top: 0
},
});
});
$(document).ready(function(){
var chart = c3.generate({
bindto: '#chart-spline-rotated', // id of chart wrapper
data: {
columns: [
// each columns data
['data1', 11, 8, 15, 18, 19, 17],
['data2', 7, 7, 5, 7, 9, 12]
],
type: 'spline', // default type of chart
colors: {
'data1': hexabit.colors["blue"],
'data2': hexabit.colors["pink"]
},
names: {
// name of each serie
'data1': 'Maximum',
'data2': 'Minimum'
}
},
axis: {
x: {
type: 'category',
// name of each category
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun']
},
rotated: true,
},
legend: {
show: true, //hide legend
},
padding: {
bottom: 0,
top: 0
},
});
});
$(document).ready(function(){
var chart = c3.generate({
bindto: '#chart-step', // id of chart wrapper
data: {
columns: [
// each columns data
['data1', 11, 8, 15, 18, 19, 17],
['data2', 7, 7, 5, 7, 9, 12]
],
type: 'step', // default type of chart
colors: {
'data1': hexabit.colors["blue"],
'data2': hexabit.colors["pink"]
},
names: {
// name of each serie
'data1': 'Maximum',
'data2': 'Minimum'
}
},
axis: {
x: {
type: 'category',
// name of each category
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun']
},
},
legend: {
show: true, //hide legend
},
padding: {
bottom: 0,
top: 0
},
});
});
$(document).ready(function(){
var chart = c3.generate({
bindto: '#chart-area-step', // id of chart wrapper
data: {
columns: [
// each columns data
['data1', 11, 8, 15, 18, 19, 17],
['data2', 7, 7, 5, 7, 9, 12]
],
type: 'area-step', // default type of chart
colors: {
'data1': hexabit.colors["blue"],
'data2': hexabit.colors["pink"]
},
names: {
// name of each serie
'data1': 'Maximum',
'data2': 'Minimum'
}
},
axis: {
x: {
type: 'category',
// name of each category
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun']
},
},
legend: {
show: true, //hide legend
},
padding: {
bottom: 0,
top: 0
},
});
});
$(document).ready(function(){
var chart = c3.generate({
bindto: '#chart-bar', // id of chart wrapper
data: {
columns: [
// each columns data
['data1', 11, 8, 15, 18, 19, 17],
['data2', 7, 7, 5, 7, 9, 12]
],
type: 'bar', // default type of chart
colors: {
'data1': hexabit.colors["blue"],
'data2': hexabit.colors["pink"]
},
names: {
// name of each serie
'data1': 'Maximum',
'data2': 'Minimum'
}
},
axis: {
x: {
type: 'category',
// name of each category
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun']
},
},
bar: {
width: 16
},
legend: {
show: true, //hide legend
},
padding: {
bottom: 0,
top: 0
},
});
});
$(document).ready(function(){
var chart = c3.generate({
bindto: '#chart-bar-rotated', // id of chart wrapper
data: {
columns: [
// each columns data
['data1', 11, 8, 15, 18, 19, 17],
['data2', 7, 7, 5, 7, 9, 12]
],
type: 'bar', // default type of chart
colors: {
'data1': hexabit.colors["blue"],
'data2': hexabit.colors["pink"]
},
names: {
// name of each serie
'data1': 'Maximum',
'data2': 'Minimum'
}
},
axis: {
x: {
type: 'category',
// name of each category
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun']
},
rotated: true,
},
bar: {
width: 16
},
legend: {
show: true, //hide legend
},
padding: {
bottom: 0,
top: 0
},
});
});
$(document).ready(function(){
var chart = c3.generate({
bindto: '#chart-bar-stacked', // id of chart wrapper
data: {
columns: [
// each columns data
['data1', 11, 8, 15, 18, 19, 17],
['data2', 7, 7, 5, 7, 9, 12]
],
type: 'bar', // default type of chart
groups: [
[ 'data1', 'data2']
],
colors: {
'data1': hexabit.colors["blue"],
'data2': hexabit.colors["pink"]
},
names: {
// name of each serie
'data1': 'Maximum',
'data2': 'Minimum'
}
},
axis: {
x: {
type: 'category',
// name of each category
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun']
},
},
bar: {
width: 16
},
legend: {
show: true, //hide legend
},
padding: {
bottom: 0,
top: 0
},
});
});
$(document).ready(function(){
var chart = c3.generate({
bindto: '#chart-pie', // id of chart wrapper
data: {
columns: [
// each columns data
['data1', 63],
['data2', 44],
['data3', 12],
['data4', 14]
],
type: 'pie', // default type of chart
colors: {
'data1': hexabit.colors["blue-darker"],
'data2': hexabit.colors["blue"],
'data3': hexabit.colors["blue-light"],
'data4': hexabit.colors["blue-lighter"]
},
names: {
// name of each serie
'data1': 'A',
'data2': 'B',
'data3': 'C',
'data4': 'D'
}
},
axis: {
},
legend: {
show: true, //hide legend
},
padding: {
bottom: 0,
top: 0
},
});
});
$(document).ready(function(){
var chart = c3.generate({
bindto: '#chart-donut', // id of chart wrapper
data: {
columns: [
// each columns data
['data1', 63],
['data2', 37]
],
type: 'donut', // default type of chart
colors: {
'data1': hexabit.colors["green"],
'data2': hexabit.colors["green-light"]
},
names: {
// name of each serie
'data1': 'Maximum',
'data2': 'Minimum'
}
},
axis: {
},
legend: {
show: true, //hide legend
},
padding: {
bottom: 0,
top: 0
},
});
});
$(document).ready(function(){
var chart = c3.generate({
bindto: '#chart-scatter', // id of chart wrapper
data: {
columns: [
// each columns data
['data1', 11, 8, 15, 18, 19, 17],
['data2', 7, 7, 5, 7, 9, 12]
],
type: 'scatter', // default type of chart
colors: {
'data1': hexabit.colors["blue"],
'data2': hexabit.colors["pink"]
},
names: {
// name of each serie
'data1': 'Maximum',
'data2': 'Minimum'
}
},
axis: {
x: {
type: 'category',
// name of each category
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun']
},
},
legend: {
show: true, //hide legend
},
padding: {
bottom: 0,
top: 0
},
});
});
$(document).ready(function(){
var chart = c3.generate({
bindto: '#chart-combination', // id of chart wrapper
data: {
columns: [
// each columns data
['data1', 30, 20, 50, 40, 60, 50],
['data2', 200, 130, 90, 240, 130, 220],
['data3', 300, 200, 160, 400, 250, 250],
['data4', 200, 130, 90, 240, 130, 220]
],
type: 'bar', // default type of chart
types: {
'data2': "line",
'data3': "spline",
},
groups: [
[ 'data1', 'data4']
],
colors: {
'data1': hexabit.colors["green"],
'data2': hexabit.colors["pink"],
'data3': hexabit.colors["green"],
'data4': hexabit.colors["blue"]
},
names: {
// name of each serie
'data1': 'Development',
'data2': 'Marketing',
'data3': 'Sales',
'data4': 'Sales'
}
},
axis: {
x: {
type: 'category',
// name of each category
categories: ['2013', '2014', '2015', '2016', '2017', '2018']
},
},
bar: {
width: 16
},
legend: {
show: true, //hide legend
},
padding: {
bottom: 0,
top: 0
},
});
});
});

View File

@ -0,0 +1,96 @@
// Guage Default
defaultGauge = new Gauge(document.getElementById("gauge-default"));
defaultGauge.setTextField(document.getElementById("default-textfield"));
defaultGauge.maxValue = 3000;
defaultGauge.set(1222);
// Gauge Donut
donutGauge = new Donut(document.getElementById("gauge-donut"));
donutGauge.setTextField(document.getElementById("donut-textfield"));
donutGauge.maxValue = 3000;
donutGauge.set(1333);
// Zones
zoneGauge = new Gauge(document.getElementById("gauge-zone"));
var opts = {
angle: -0.25,
lineWidth: 0.2,
radiusScale:0.9,
pointer: {
length: 0.6,
strokeWidth: 0.03,
color: '#000000'
},
staticLabels: {
font: "10px sans-serif",
labels: [200, 500, 2100, 2800],
fractionDigits: 0
},
staticZones: [
{strokeStyle: "#F03E3E", min: 0, max: 200},
{strokeStyle: "#FFDD00", min: 200, max: 500},
{strokeStyle: "#30B32D", min: 500, max: 2100},
{strokeStyle: "#FFDD00", min: 2100, max: 2800},
{strokeStyle: "#F03E3E", min: 2800, max: 3000}
],
limitMax: false,
limitMin: false,
highDpiSupport: true
}
zoneGauge.setOptions(opts);
zoneGauge.setTextField(document.getElementById("zone-textfield"));
zoneGauge.minValue = 0;
zoneGauge.maxValue = 3000;
zoneGauge.set(1444);
//
stepGauge = new Gauge(document.getElementById("gauge-step"));
var bigFont = "14px sans-serif";
var opts = {
angle: 0.1,
radiusScale:0.8,
lineWidth: 0.2,
pointer: {
length: 0.6,
strokeWidth: 0.03,
color: '#000000'
},
staticLabels: {
font: "10px sans-serif",
labels: [{label:200, font: bigFont},
{label:750},
{label:1500},
{label:2250},
{label:3000},
{label:3500, font: bigFont}],
fractionDigits: 0
},
staticZones: [
{strokeStyle: "rgb(255,0,0)", min: 0, max: 500, height: 1.2},
{strokeStyle: "rgb(200,100,0)", min: 500, max: 1000, height: 1.1},
{strokeStyle: "rgb(150,150,0)", min: 1000, max: 1500, height: 1},
{strokeStyle: "rgb(100,200,0)", min: 1500, max: 2000, height: 0.9},
{strokeStyle: "rgb(0,255,0)", min: 2000, max: 3100, height: 0.8},
{strokeStyle: "rgb(80,255,80)", min: 3100, max: 3500, height: 0.7},
{strokeStyle: "rgb(130,130,130)", min: 2470, max: 2530, height: 1}
],
limitMax: false,
limitMin: false,
highDpiSupport: true,
renderTicks: {
divisions: 5,
divWidth: 1.1,
divLength: 0.7,
divColor: '#333333',
subDivisions: 3,
subLength: 0.5,
subWidth: 0.6,
subColor: '#666666'
}
};
stepGauge.setOptions(opts);
//document.getElementById("preview-textfield").className = "preview-textfield";
stepGauge.setTextField(document.getElementById("step-textfield"));
stepGauge.minValue = 0;
stepGauge.maxValue = 3500;
stepGauge.set(2222);