From c82398a189180f26197b1fd2a7dae2643c3d2857 Mon Sep 17 00:00:00 2001 From: tiger2005 <41613797+tiger2005@users.noreply.github.com> Date: Thu, 2 Dec 2021 16:49:08 +0800 Subject: [PATCH] Adjust line color in "Profile" page --- js/profile.js | 5 ++++- js/settings.js | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/js/profile.js b/js/profile.js index 38d8847..84267cb 100644 --- a/js/profile.js +++ b/js/profile.js @@ -511,7 +511,7 @@ function profileDrawGraph(data){ var chart = { type: 'line', animation: Highcharts.svg, // don't animate in IE < IE 10. - zoomType: 'x' + zoomType: 'x', }; var title = { text: null @@ -602,6 +602,9 @@ function profileDrawGraph(data){ } var json = {}; json.chart = chart; + if(!DarkMode) + json.colors = ['#2b908f', '#90ee7e', '#f45b5b', '#7798BF', '#aaeeee', '#ff0066', + '#eeaaee', '#55BF3B', '#DF5353', '#7798BF', '#aaeeee'], json.title = title; json.tooltip = tooltip; json.xAxis = xAxis; diff --git a/js/settings.js b/js/settings.js index f5775b3..ee9093d 100644 --- a/js/settings.js +++ b/js/settings.js @@ -651,11 +651,11 @@ function initStyle(){ if(problemNewWinLoaded){ problemNewWinJQ.find(".ThemeTypeIf").attr("href", DarkMode ? "./css/problem/dark.css" : "./css/problem/default.css"); } + profileDrawGraph(profileInfoDatas[4]); if(contestRankInfo == undefined || contestRankInfo[contestRankChosen].length == 0) return; if(contestCalculatingRank[contestRankChosen]) $("#singleRankGraphContainer").html(`
${languageOption.tip.tipCalculatingRankGraph}
`); else generateRankGraph(contestRankInfo[contestRankChosen]); - profileDrawGraph(profileInfoDatas[4]); } function reloadSettings(){ settings = JSON.parse(localStorage.getItem("CCH_Settings"));