fix html encodings.

This commit is contained in:
DESKTOP-GENO133\IvanPlex 2024-02-03 20:36:32 -07:00
parent a8fad6f160
commit aba178a324
3 changed files with 12 additions and 12 deletions

View File

@ -16,14 +16,14 @@
new Chart($("#pie-chart"), { new Chart($("#pie-chart"), {
type: 'pie', type: 'pie',
data: { data: {
labels: ['@translator.Translate(userLanguage, "Service Records")', labels: [decodeHTMLEntities('@translator.Translate(userLanguage, "Service Records")'),
'@translator.Translate(userLanguage, "Repairs")', decodeHTMLEntities('@translator.Translate(userLanguage, "Repairs")'),
'@translator.Translate(userLanguage, "Upgrades")', decodeHTMLEntities('@translator.Translate(userLanguage, "Upgrades")'),
'@translator.Translate(userLanguage, "Tax")', decodeHTMLEntities('@translator.Translate(userLanguage, "Tax")'),
'@translator.Translate(userLanguage, "Fuel")'], decodeHTMLEntities('@translator.Translate(userLanguage, "Fuel")')],
datasets: [ datasets: [
{ {
label: '@translator.Translate(userLanguage,"Expenses by Type")', label: decodeHTMLEntities('@translator.Translate(userLanguage, "Expenses by Type")'),
backgroundColor: ["#003f5c", "#58508d", "#bc5090", "#ff6361", "#ffa600"], backgroundColor: ["#003f5c", "#58508d", "#bc5090", "#ff6361", "#ffa600"],
data: [ data: [
globalParseFloat('@Model.ServiceRecordSum'), globalParseFloat('@Model.ServiceRecordSum'),
@ -31,7 +31,7 @@
globalParseFloat('@Model.UpgradeRecordSum'), globalParseFloat('@Model.UpgradeRecordSum'),
globalParseFloat('@Model.TaxRecordSum'), globalParseFloat('@Model.TaxRecordSum'),
globalParseFloat('@Model.GasRecordSum') globalParseFloat('@Model.GasRecordSum')
] ]
} }
] ]
}, },
@ -45,7 +45,7 @@
}, },
title: { title: {
display: true, display: true,
text: '@translator.Translate(userLanguage, "Expenses by Type")', text: decodeHTMLEntities('@translator.Translate(userLanguage, "Expenses by Type")'),
color: useDarkMode ? "#fff" : "#000" color: useDarkMode ? "#fff" : "#000"
}, },
} }

View File

@ -32,7 +32,7 @@
labels: barGraphLabels, labels: barGraphLabels,
datasets: [ datasets: [
{ {
label: '@translator.Translate(userLanguage, "Expenses by Month")', label: decodeHTMLEntities('@translator.Translate(userLanguage, "Expenses by Month")'),
backgroundColor: barGraphColors, backgroundColor: barGraphColors,
data: barGraphData data: barGraphData
} }
@ -43,7 +43,7 @@
title: { title: {
display: true, display: true,
color: useDarkMode ? "#fff" : "#000", color: useDarkMode ? "#fff" : "#000",
text: '@translator.Translate(userLanguage,"Expenses by Month")' text: decodeHTMLEntities('@translator.Translate(userLanguage, "Expenses by Month")')
}, },
legend: { legend: {
display: false, display: false,

View File

@ -33,7 +33,7 @@
labels: barGraphLabels, labels: barGraphLabels,
datasets: [ datasets: [
{ {
label: '@translator.Translate(userLanguage,"Fuel Mileage by Month")', label: decodeHTMLEntities('@translator.Translate(userLanguage, "Fuel Mileage by Month")'),
backgroundColor: barGraphColors, backgroundColor: barGraphColors,
data: barGraphData data: barGraphData
} }
@ -44,7 +44,7 @@
title: { title: {
display: true, display: true,
color: useDarkMode ? "#fff" : "#000", color: useDarkMode ? "#fff" : "#000",
text: '@translator.Translate(userLanguage,"Fuel Mileage by Month")' text: decodeHTMLEntities('@translator.Translate(userLanguage, "Fuel Mileage by Month")')
}, },
legend: { legend: {
display: false, display: false,