mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-24 15:43:18 +02:00
chore(client): tweak charts
This commit is contained in:
parent
3e7d8b5f17
commit
e36e5df635
7 changed files with 14 additions and 29 deletions
|
@ -16,7 +16,6 @@
|
|||
*/
|
||||
import { onMounted, ref, shallowRef, watch, PropType, onUnmounted } from 'vue';
|
||||
import { Chart } from 'chart.js';
|
||||
import { enUS } from 'date-fns/locale';
|
||||
import gradient from 'chartjs-plugin-gradient';
|
||||
import * as os from '@/os';
|
||||
import { defaultStore } from '@/store';
|
||||
|
@ -186,6 +185,10 @@ const render = () => {
|
|||
time: {
|
||||
stepSize: 1,
|
||||
unit: props.span === 'day' ? 'month' : 'day',
|
||||
displayFormats: {
|
||||
day: 'M/d',
|
||||
month: 'Y/M',
|
||||
},
|
||||
},
|
||||
grid: {
|
||||
},
|
||||
|
@ -194,11 +197,6 @@ const render = () => {
|
|||
maxRotation: 0,
|
||||
autoSkipPadding: 16,
|
||||
},
|
||||
adapters: {
|
||||
date: {
|
||||
locale: enUS,
|
||||
},
|
||||
},
|
||||
min: getDate(props.limit).getTime(),
|
||||
},
|
||||
y: {
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
<script lang="ts" setup>
|
||||
import { markRaw, version as vueVersion, onMounted, onBeforeUnmount, nextTick, watch } from 'vue';
|
||||
import { Chart } from 'chart.js';
|
||||
import { enUS } from 'date-fns/locale';
|
||||
import tinycolor from 'tinycolor2';
|
||||
import { MatrixController, MatrixElement } from 'chartjs-chart-matrix';
|
||||
import * as os from '@/os';
|
||||
|
@ -149,7 +148,9 @@ async function renderChart() {
|
|||
round: 'week',
|
||||
isoWeekday: 0,
|
||||
displayFormats: {
|
||||
week: 'MMM dd',
|
||||
day: 'M/d',
|
||||
month: 'Y/M',
|
||||
week: 'M/d',
|
||||
},
|
||||
},
|
||||
grid: {
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
<script lang="ts" setup>
|
||||
import { markRaw, version as vueVersion, onMounted, onBeforeUnmount, nextTick } from 'vue';
|
||||
import { Chart } from 'chart.js';
|
||||
import { enUS } from 'date-fns/locale';
|
||||
import tinycolor from 'tinycolor2';
|
||||
import { MatrixController, MatrixElement } from 'chartjs-chart-matrix';
|
||||
import * as os from '@/os';
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
<script lang="ts" setup>
|
||||
import { markRaw, version as vueVersion, onMounted, onBeforeUnmount, nextTick } from 'vue';
|
||||
import { Chart } from 'chart.js';
|
||||
import { enUS } from 'date-fns/locale';
|
||||
import tinycolor from 'tinycolor2';
|
||||
import gradient from 'chartjs-plugin-gradient';
|
||||
import * as os from '@/os';
|
||||
|
@ -114,11 +113,6 @@ async function renderChart() {
|
|||
maxRotation: 0,
|
||||
autoSkipPadding: 8,
|
||||
},
|
||||
adapters: {
|
||||
date: {
|
||||
locale: enUS,
|
||||
},
|
||||
},
|
||||
},
|
||||
y: {
|
||||
position: 'left',
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
import { onMounted, onUnmounted, ref } from 'vue';
|
||||
import { Chart } from 'chart.js';
|
||||
import gradient from 'chartjs-plugin-gradient';
|
||||
import { enUS } from 'date-fns/locale';
|
||||
import tinycolor from 'tinycolor2';
|
||||
import MkMiniChart from '@/components/MkMiniChart.vue';
|
||||
import * as os from '@/os';
|
||||
|
@ -135,11 +134,6 @@ onMounted(async () => {
|
|||
maxRotation: 0,
|
||||
autoSkipPadding: 16,
|
||||
},
|
||||
adapters: {
|
||||
date: {
|
||||
locale: enUS,
|
||||
},
|
||||
},
|
||||
min: getDate(chartLimit).getTime(),
|
||||
},
|
||||
y: {
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
<script lang="ts" setup>
|
||||
import { markRaw, version as vueVersion, onMounted, onBeforeUnmount, nextTick, watch } from 'vue';
|
||||
import { Chart } from 'chart.js';
|
||||
import { enUS } from 'date-fns/locale';
|
||||
import tinycolor from 'tinycolor2';
|
||||
import * as misskey from 'misskey-js';
|
||||
import * as os from '@/os';
|
||||
|
@ -138,7 +137,9 @@ async function renderChart() {
|
|||
round: 'week',
|
||||
isoWeekday: 0,
|
||||
displayFormats: {
|
||||
week: 'MMM dd',
|
||||
day: 'M/d',
|
||||
month: 'Y/M',
|
||||
week: 'M/d',
|
||||
},
|
||||
},
|
||||
grid: {
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
<script lang="ts" setup>
|
||||
import { markRaw, version as vueVersion, onMounted, onBeforeUnmount, nextTick } from 'vue';
|
||||
import { Chart } from 'chart.js';
|
||||
import { enUS } from 'date-fns/locale';
|
||||
import tinycolor from 'tinycolor2';
|
||||
import * as misskey from 'misskey-js';
|
||||
import gradient from 'chartjs-plugin-gradient';
|
||||
|
@ -113,6 +112,10 @@ async function renderChart() {
|
|||
time: {
|
||||
stepSize: 1,
|
||||
unit: 'day',
|
||||
displayFormats: {
|
||||
day: 'M/d',
|
||||
month: 'Y/M',
|
||||
},
|
||||
},
|
||||
grid: {
|
||||
display: false,
|
||||
|
@ -122,11 +125,6 @@ async function renderChart() {
|
|||
maxRotation: 0,
|
||||
autoSkipPadding: 8,
|
||||
},
|
||||
adapters: {
|
||||
date: {
|
||||
locale: enUS,
|
||||
},
|
||||
},
|
||||
},
|
||||
y: {
|
||||
position: 'left',
|
||||
|
|
Loading…
Reference in a new issue