make chart text white
This commit is contained in:
parent
1becf92a26
commit
b2fe5751f1
@ -1,21 +1,21 @@
|
||||
<script>
|
||||
import Chart from 'chart.js/auto'
|
||||
import Chart from 'chart.js/auto';
|
||||
import 'chartjs-adapter-luxon';
|
||||
import { DateTime } from 'luxon';
|
||||
import {getContext, onMount} from 'svelte'
|
||||
import createPlayerService from '../../../services/scoresaber/player'
|
||||
import createScoresService from '../../../services/scoresaber/scores'
|
||||
import createBeatSaviorService from '../../../services/beatsavior'
|
||||
import {formatNumber} from '../../../utils/format'
|
||||
import { getContext, onMount } from 'svelte';
|
||||
import createBeatSaviorService from '../../../services/beatsavior';
|
||||
import createPlayerService from '../../../services/scoresaber/player';
|
||||
import createScoresService from '../../../services/scoresaber/scores';
|
||||
import eventBus from '../../../utils/broadcast-channel-pubsub';
|
||||
import {
|
||||
dateFromString,
|
||||
formatDate,
|
||||
formatDateWithOptions,
|
||||
toSsMidnight,
|
||||
} from '../../../utils/date'
|
||||
import eventBus from '../../../utils/broadcast-channel-pubsub'
|
||||
import {debounce} from '../../../utils/debounce'
|
||||
import {onLegendClick} from './utils/legend-click-handler'
|
||||
} from '../../../utils/date';
|
||||
import { debounce } from '../../../utils/debounce';
|
||||
import { formatNumber } from '../../../utils/format';
|
||||
import { onLegendClick } from './utils/legend-click-handler';
|
||||
|
||||
export let playerId = null;
|
||||
export let rankHistory = null;
|
||||
@ -123,6 +123,7 @@
|
||||
}
|
||||
|
||||
async function setupChart(hash, canvas) {
|
||||
Chart.defaults.color = '#fff'; // Jank workaround to make the text white
|
||||
if (!hash || !canvas || !rankHistory || !Object.keys(rankHistory).length || chartHash === lastHistoryHash) return;
|
||||
|
||||
lastHistoryHash = chartHash;
|
||||
@ -134,7 +135,7 @@
|
||||
const ppColor = "#007100";
|
||||
const rankedPlayCountColor = "#3e3e3e";
|
||||
const totalPlayCountColor = "#666";
|
||||
const activityColor = "#333"
|
||||
const activityColor = "#555"
|
||||
|
||||
const dtAccSaberToday = DateTime.fromJSDate(toSsMidnight(new Date()));
|
||||
const dayTimestamps = Array(CHART_DAYS).fill(0).map((_, idx) => toSsMidnight(dtAccSaberToday.minus({days: CHART_DAYS - 1 - idx}).toJSDate()).getTime());
|
||||
|
Reference in New Issue
Block a user