mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-05 05:26:03 +02:00
refactor
This commit is contained in:
@@ -81,11 +81,6 @@ async function renderChart() {
|
||||
|
||||
await nextTick();
|
||||
|
||||
const gridColor = defaultStore.state.darkMode ? 'rgba(255, 255, 255, 0.1)' : 'rgba(0, 0, 0, 0.1)';
|
||||
|
||||
// フォントカラー
|
||||
Chart.defaults.color = getComputedStyle(document.documentElement).getPropertyValue('--fg');
|
||||
|
||||
const color = defaultStore.state.darkMode ? '#b4e900' : '#86b300';
|
||||
|
||||
// 視覚上の分かりやすさのため上から最も大きい3つの値の平均を最大値とする
|
||||
@@ -149,8 +144,6 @@ async function renderChart() {
|
||||
},
|
||||
grid: {
|
||||
display: false,
|
||||
color: gridColor,
|
||||
borderColor: 'rgb(0, 0, 0, 0)',
|
||||
},
|
||||
ticks: {
|
||||
display: true,
|
||||
@@ -164,8 +157,6 @@ async function renderChart() {
|
||||
position: 'right',
|
||||
grid: {
|
||||
display: false,
|
||||
color: gridColor,
|
||||
borderColor: 'rgb(0, 0, 0, 0)',
|
||||
},
|
||||
ticks: {
|
||||
maxRotation: 0,
|
||||
@@ -178,7 +169,6 @@ async function renderChart() {
|
||||
},
|
||||
},
|
||||
},
|
||||
animation: false,
|
||||
plugins: {
|
||||
legend: {
|
||||
display: false,
|
||||
|
||||
@@ -58,12 +58,8 @@ async function renderChart() {
|
||||
|
||||
const raw = await os.api('charts/user/pv', { userId: props.user.id, limit: chartLimit, span: 'day' });
|
||||
|
||||
const gridColor = defaultStore.state.darkMode ? 'rgba(255, 255, 255, 0.1)' : 'rgba(0, 0, 0, 0.1)';
|
||||
const vLineColor = defaultStore.state.darkMode ? 'rgba(255, 255, 255, 0.2)' : 'rgba(0, 0, 0, 0.2)';
|
||||
|
||||
// フォントカラー
|
||||
Chart.defaults.color = getComputedStyle(document.documentElement).getPropertyValue('--fg');
|
||||
|
||||
const colorUser = '#3498db';
|
||||
const colorVisitor = '#2ecc71';
|
||||
|
||||
@@ -117,8 +113,6 @@ async function renderChart() {
|
||||
},
|
||||
grid: {
|
||||
display: false,
|
||||
color: gridColor,
|
||||
borderColor: 'rgb(0, 0, 0, 0)',
|
||||
},
|
||||
ticks: {
|
||||
display: true,
|
||||
@@ -137,8 +131,6 @@ async function renderChart() {
|
||||
suggestedMax: 10,
|
||||
grid: {
|
||||
display: true,
|
||||
color: gridColor,
|
||||
borderColor: 'rgb(0, 0, 0, 0)',
|
||||
},
|
||||
ticks: {
|
||||
display: true,
|
||||
@@ -150,7 +142,6 @@ async function renderChart() {
|
||||
intersect: false,
|
||||
mode: 'index',
|
||||
},
|
||||
animation: false,
|
||||
plugins: {
|
||||
title: {
|
||||
display: true,
|
||||
|
||||
Reference in New Issue
Block a user