-
Notifications
You must be signed in to change notification settings - Fork 481
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c8c0936
commit 47426f4
Showing
9 changed files
with
244 additions
and
210 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -174,17 +174,17 @@ <h4>Stars</h4> | |
<div class="row"> | ||
<div class="col-md-6"> | ||
<div class="tile"> | ||
<h3 class="tile-title">Monthly Sales</h3> | ||
<h3 class="tile-title">Weekly Sales - Last week</h3> | ||
<div class="ratio ratio-16x9"> | ||
<canvas id="salesChart"></canvas> | ||
<div id="salesChart"></div> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="col-md-6"> | ||
<div class="tile"> | ||
<h3 class="tile-title">Support Requests</h3> | ||
<div class="ratio ratio-16x9 d-flex justify-content-center"> | ||
<canvas id="supportRequestChart"></canvas> | ||
<div class="ratio ratio-16x9"> | ||
<div id="supportRequestChart"></div> | ||
</div> | ||
</div> | ||
</div> | ||
|
@@ -195,55 +195,70 @@ <h3 class="tile-title">Support Requests</h3> | |
<script src="js/bootstrap.min.js"></script> | ||
<script src="js/main.js"></script> | ||
<!-- Page specific javascripts--> | ||
<script type="text/javascript" src="js/plugins/chart.js"></script> | ||
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected]/dist/echarts.min.js"></script> | ||
<script type="text/javascript"> | ||
const salesData = { | ||
type: "line", | ||
data: { | ||
labels: [ | ||
"Jan", | ||
"Feb", | ||
"March", | ||
"April", | ||
"May", | ||
"June", | ||
], | ||
datasets: [{ | ||
label: 'Monthly Sales', | ||
data: [65, 59, 80, 81, 56, 55, 40], | ||
fill: false, | ||
borderColor: 'rgb(75, 192, 192)', | ||
tension: 0.1 | ||
}] | ||
xAxis: { | ||
type: 'category', | ||
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] | ||
}, | ||
yAxis: { | ||
type: 'value', | ||
axisLabel: { | ||
formatter: '${value}' | ||
} | ||
}, | ||
series: [ | ||
{ | ||
data: [150, 230, 224, 218, 135, 147, 260], | ||
type: 'line', | ||
smooth: true | ||
} | ||
], | ||
tooltip: { | ||
trigger: 'axis', | ||
formatter: "<b>{b0}:</b> ${c0}" | ||
} | ||
} | ||
|
||
const supportRequests = { | ||
type: "doughnut", | ||
data: { | ||
labels: [ | ||
'In-Progress', | ||
'Complete', | ||
'Delayed' | ||
], | ||
datasets: [{ | ||
label: 'Support Requests', | ||
data: [300, 50, 100], | ||
backgroundColor: [ | ||
'#EFCC00', | ||
'#5AD3D1', | ||
'#FF5A5E' | ||
tooltip: { | ||
trigger: 'item' | ||
}, | ||
legend: { | ||
orient: 'vertical', | ||
left: 'left' | ||
}, | ||
series: [ | ||
{ | ||
name: 'Support Requests', | ||
type: 'pie', | ||
radius: '50%', | ||
data: [ | ||
{ value: 300, name: 'In Progress' }, | ||
{ value: 50, name: 'Delayed' }, | ||
{ value: 100, name: 'Complete' } | ||
], | ||
hoverOffset: 4 | ||
}] | ||
} | ||
emphasis: { | ||
itemStyle: { | ||
shadowBlur: 10, | ||
shadowOffsetX: 0, | ||
shadowColor: 'rgba(0, 0, 0, 0.5)' | ||
} | ||
} | ||
} | ||
] | ||
}; | ||
|
||
const salesChartCtx = document.getElementById('salesChart'); | ||
new Chart(salesChartCtx, salesData); | ||
const salesChartElement = document.getElementById('salesChart'); | ||
const salesChart = echarts.init(salesChartElement, null, { renderer: 'svg' }); | ||
salesChart.setOption(salesData); | ||
new ResizeObserver(() => salesChart.resize()).observe(salesChartElement); | ||
|
||
const supportChartCtx = document.getElementById('supportRequestChart'); | ||
new Chart(supportChartCtx, supportRequests); | ||
const supportChartElement = document.getElementById("supportRequestChart") | ||
const supportChart = echarts.init(supportChartElement, null, { renderer: 'svg' }); | ||
supportChart.setOption(supportRequests); | ||
new ResizeObserver(() => supportChart.resize()).observe(supportChartElement); | ||
</script> | ||
<!-- Google analytics script--> | ||
<script type="text/javascript"> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.