mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-05 15:33:09 +02:00
fix(frontend): チャートのlegendがクリックに反応しない問題を修正
これにより発生 https://github.com/misskey-dev/misskey/pull/12926
This commit is contained in:
parent
430290c084
commit
6c67b2e40e
1 changed files with 2 additions and 2 deletions
|
@ -30,9 +30,9 @@ function onClick(item: LegendItem) {
|
|||
if (chart.value == null) return;
|
||||
if (type.value === 'pie' || type.value === 'doughnut') {
|
||||
// Pie and doughnut charts only have a single dataset and visibility is per item
|
||||
if (item.index) chart.value.toggleDataVisibility(item.index);
|
||||
if (item.index != null) chart.value.toggleDataVisibility(item.index);
|
||||
} else {
|
||||
if (item.datasetIndex) chart.value.setDatasetVisibility(item.datasetIndex, !chart.value.isDatasetVisible(item.datasetIndex));
|
||||
if (item.datasetIndex != null) chart.value.setDatasetVisibility(item.datasetIndex, !chart.value.isDatasetVisible(item.datasetIndex));
|
||||
}
|
||||
chart.value.update();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue