diff --git a/src/hooks/useLegendProcessor.ts b/src/hooks/useLegendProcessor.ts index d184ffa7..177b7e66 100644 --- a/src/hooks/useLegendProcessor.ts +++ b/src/hooks/useLegendProcessor.ts @@ -47,7 +47,7 @@ export default function useLegendProcess(legend?: LegendOptions) { for (const [key, value] of keys.entries()) { const item: { [key: string]: unknown } = { name: value, - linear: data[value], + topN: data[value], }; if (legend) { if (legend.min) { diff --git a/src/views/dashboard/graphs/components/Legend.vue b/src/views/dashboard/graphs/components/Legend.vue index 819614c2..be9ba89c 100644 --- a/src/views/dashboard/graphs/components/Legend.vue +++ b/src/views/dashboard/graphs/components/Legend.vue @@ -29,10 +29,24 @@ limitations under the License. --> -
- - {{ item.name }} -
+ + +
+
+ {{ index }} + {{ value }} +
+
+
{{ item[h.value] }}
@@ -95,6 +109,10 @@ table { text-overflow: ellipsis; vertical-align: middle; width: 100px; + + &.header-cell { + width: 150px; + } } } @@ -106,9 +124,21 @@ table { word-break: break-all; line-height: 23px; padding: 0 5px; + + i { + font-style: normal; + } } -.header-cell { - width: 150px; +.value { + span { + display: inline-block; + padding: 5px; + width: 50px; + } +} + +.name { + cursor: pointer; }