M3 Integration fixes
This commit is contained in:
Regular → Executable
Regular → Executable
Regular → Executable
+3
-2
@@ -27,10 +27,11 @@ const proxyChecked = computed({
|
||||
|
||||
|
||||
<template>
|
||||
<input
|
||||
<label for="sonar-input-26eb253f2c" class="visually-hidden">sonar input 26eb253f2c</label>
|
||||
<input
|
||||
v-model="proxyChecked"
|
||||
type="checkbox"
|
||||
:value="value"
|
||||
class="rounded dark:bg-gray-900 border-gray-300 dark:border-gray-700 text-indigo-600 shadow-sm focus:ring-indigo-500 dark:focus:ring-indigo-600 dark:focus:ring-offset-gray-800"
|
||||
>
|
||||
id="sonar-input-26eb253f2c">
|
||||
</template>
|
||||
|
||||
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
+1
-1
@@ -77,7 +77,7 @@ function renderWmsCharts() {
|
||||
},
|
||||
];
|
||||
|
||||
new Chart(canvas, {
|
||||
canvas.wmsChart = new Chart(canvas, {
|
||||
type,
|
||||
data: {
|
||||
labels,
|
||||
|
||||
Regular → Executable
+11
-11
@@ -2,7 +2,7 @@
|
||||
'use strict';
|
||||
|
||||
function cssVar(name, fallback) {
|
||||
var value = getComputedStyle(document.documentElement).getPropertyValue(name);
|
||||
let value = getComputedStyle(document.documentElement).getPropertyValue(name);
|
||||
return value && value.trim() !== '' ? value.trim() : fallback;
|
||||
}
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
}
|
||||
|
||||
function enrichDataset(dataset, index, type) {
|
||||
var colours = palette();
|
||||
var colour = colours[index % colours.length];
|
||||
let colours = palette();
|
||||
let colour = colours[index % colours.length];
|
||||
|
||||
if (type === 'doughnut' || type === 'pie') {
|
||||
dataset.backgroundColor = colours;
|
||||
@@ -39,10 +39,10 @@
|
||||
}
|
||||
|
||||
function optionsFor(type) {
|
||||
var textColour = cssVar('--wms-chart-text', '#334155');
|
||||
var gridColour = cssVar('--wms-chart-grid', 'rgba(148, 163, 184, 0.25)');
|
||||
let textColour = cssVar('--wms-chart-text', '#334155');
|
||||
let gridColour = cssVar('--wms-chart-grid', 'rgba(148, 163, 184, 0.25)');
|
||||
|
||||
var options = {
|
||||
let options = {
|
||||
responsive: true,
|
||||
maintainAspectRatio: false,
|
||||
interaction: {
|
||||
@@ -100,7 +100,7 @@
|
||||
}
|
||||
|
||||
function normaliseConfig(rawConfig, type) {
|
||||
var config = rawConfig || {};
|
||||
let config = rawConfig || {};
|
||||
config.labels = config.labels || [];
|
||||
config.datasets = (config.datasets || []).map(function (dataset, index) {
|
||||
return enrichDataset(dataset, index, type);
|
||||
@@ -115,9 +115,9 @@
|
||||
}
|
||||
|
||||
document.querySelectorAll('[data-wms-chart]').forEach(function (canvas) {
|
||||
var type = canvas.getAttribute('data-chart-type') || 'line';
|
||||
var raw = canvas.getAttribute('data-chart-config') || '{}';
|
||||
var config = {};
|
||||
let type = canvas.getAttribute('data-chart-type') || 'line';
|
||||
let raw = canvas.getAttribute('data-chart-config') || '{}';
|
||||
let config = {};
|
||||
|
||||
try {
|
||||
config = JSON.parse(raw);
|
||||
@@ -125,7 +125,7 @@
|
||||
config = { labels: [], datasets: [] };
|
||||
}
|
||||
|
||||
new Chart(canvas, {
|
||||
canvas.wmsChart = new Chart(canvas, {
|
||||
type: type,
|
||||
data: normaliseConfig(config, type),
|
||||
options: optionsFor(type)
|
||||
|
||||
Regular → Executable
Reference in New Issue
Block a user