enhance(client): tweak chart
This commit is contained in:
parent
0afebcfd9e
commit
108ec412c3
@ -213,17 +213,17 @@ export default defineComponent({
|
|||||||
data: x.data.slice().reverse(),
|
data: x.data.slice().reverse(),
|
||||||
tension: 0.3,
|
tension: 0.3,
|
||||||
pointRadius: 0,
|
pointRadius: 0,
|
||||||
borderWidth: 2,
|
borderWidth: props.bar ? 0 : 2,
|
||||||
borderColor: x.color ? x.color : getColor(i),
|
borderColor: x.color ? x.color : getColor(i),
|
||||||
borderDash: x.borderDash || [],
|
borderDash: x.borderDash || [],
|
||||||
borderJoinStyle: 'round',
|
borderJoinStyle: 'round',
|
||||||
backgroundColor: alpha(x.color ? x.color : getColor(i), 0.1),
|
backgroundColor: props.bar ? (x.color ? x.color : getColor(i)) : alpha(x.color ? x.color : getColor(i), 0.1),
|
||||||
gradient: {
|
gradient: props.bar ? undefined : {
|
||||||
backgroundColor: {
|
backgroundColor: {
|
||||||
axis: 'y',
|
axis: 'y',
|
||||||
colors: {
|
colors: {
|
||||||
0: alpha(x.color ? x.color : getColor(i), 0),
|
0: alpha(x.color ? x.color : getColor(i), 0),
|
||||||
[maxes[i]]: alpha(x.color ? x.color : getColor(i), 0.1),
|
[maxes[i]]: alpha(x.color ? x.color : getColor(i), 0.15),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -752,18 +752,27 @@ export default defineComponent({
|
|||||||
type: 'line',
|
type: 'line',
|
||||||
borderDash: [5, 5],
|
borderDash: [5, 5],
|
||||||
data: format(sum(raw.inc, negate(raw.dec))),
|
data: format(sum(raw.inc, negate(raw.dec))),
|
||||||
|
color: '#888888',
|
||||||
}]), {
|
}]), {
|
||||||
|
name: 'With file',
|
||||||
|
type: 'area',
|
||||||
|
data: format(raw.diffs.withFile),
|
||||||
|
color: colors.purple,
|
||||||
|
}, {
|
||||||
name: 'Renotes',
|
name: 'Renotes',
|
||||||
type: 'area',
|
type: 'area',
|
||||||
data: format(raw.diffs.renote),
|
data: format(raw.diffs.renote),
|
||||||
|
color: colors.green,
|
||||||
}, {
|
}, {
|
||||||
name: 'Replies',
|
name: 'Replies',
|
||||||
type: 'area',
|
type: 'area',
|
||||||
data: format(raw.diffs.reply),
|
data: format(raw.diffs.reply),
|
||||||
|
color: colors.yellow,
|
||||||
}, {
|
}, {
|
||||||
name: 'Normal',
|
name: 'Normal',
|
||||||
type: 'area',
|
type: 'area',
|
||||||
data: format(raw.diffs.normal),
|
data: format(raw.diffs.normal),
|
||||||
|
color: colors.blue,
|
||||||
}],
|
}],
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -59,7 +59,7 @@ export default defineComponent({
|
|||||||
|
|
||||||
setup() {
|
setup() {
|
||||||
const chartSpan = ref<'hour' | 'day'>('hour');
|
const chartSpan = ref<'hour' | 'day'>('hour');
|
||||||
const chartSrc = ref('notes');
|
const chartSrc = ref('active-users');
|
||||||
|
|
||||||
return {
|
return {
|
||||||
chartSrc,
|
chartSrc,
|
||||||
|
Loading…
Reference in New Issue
Block a user