mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-09 12:30:15 +02:00
[FIX] Make chart labels better readable for darker themes
This commit is contained in:
parent
4210b2eabc
commit
c0f0f8db73
@ -147,6 +147,8 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Initialize empty Pie chart
|
// Initialize empty Pie chart
|
||||||
|
const elementBody = document.querySelector('body');
|
||||||
|
const elementBodyCss = getComputedStyle(elementBody);
|
||||||
const ctx = document.getElementById('pieChart').getContext('2d');
|
const ctx = document.getElementById('pieChart').getContext('2d');
|
||||||
const pieChart = new Chart(ctx, {
|
const pieChart = new Chart(ctx, {
|
||||||
type: 'pie',
|
type: 'pie',
|
||||||
@ -180,6 +182,8 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Chart.defaults.color = elementBodyCss.color;
|
||||||
|
|
||||||
// AJAX call to dynamically update the chart
|
// AJAX call to dynamically update the chart
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '{% url "mumble:release_pie_chart_data" %}', // Your Django view URL that returns chart data
|
url: '{% url "mumble:release_pie_chart_data" %}', // Your Django view URL that returns chart data
|
||||||
|
Loading…
x
Reference in New Issue
Block a user