mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 17:14:46 +00:00
dashboard: allow themes to set chart.js default colors
This commit is contained in:
parent
8a5789840c
commit
e4635872fc
@ -42,6 +42,14 @@
|
||||
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
let chartBackgroundColor = getComputedStyle(document.body).getPropertyValue('--chart-js-background-color').trim();
|
||||
let chartBorderColor = getComputedStyle(document.body).getPropertyValue('--chart-js-border-color').trim();
|
||||
let chartFontColor = getComputedStyle(document.body).getPropertyValue('--chart-js-font-color').trim();
|
||||
|
||||
if (chartBackgroundColor) Chart.defaults.backgroundColor = chartBackgroundColor;
|
||||
if (chartBorderColor) Chart.defaults.borderColor = chartBorderColor;
|
||||
if (chartFontColor) Chart.defaults.color = chartFontColor;
|
||||
|
||||
let widgetManager = new WidgetManager({
|
||||
float: false,
|
||||
columnOpts: {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user