Skip to content

Commit

Permalink
fixed chart
Browse files Browse the repository at this point in the history
  • Loading branch information
SDClowen committed Aug 8, 2024
1 parent c96d18e commit ecfd8a4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/views/reports.php
Original file line number Diff line number Diff line change
Expand Up @@ -321,10 +321,13 @@
const ctx = document.getElementById($this.attr("id"));
const keys = Object.keys(data).map((v) => v.replace(/\\"/g, '"').replace(/<[^>]*>?/gm, ''))
console.log(keys)
var chart = new Chart(ctx, {
type: 'pie',
data: {
labels: Object.keys(data),
labels: keys,
datasets: [{
label: '',
data: Object.values(data),
Expand Down

0 comments on commit ecfd8a4

Please sign in to comment.