mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-09 12:30:15 +02:00
Merge branch 'fix-mumble-chart-font-color' into 'master'
[FIX] Make chart labels better readable for darker themes See merge request allianceauth/allianceauth!1659
This commit is contained in:
commit
fd66a7cb20
@ -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