mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-01 18:53:40 +00:00
fix: set chart label (#300)
This commit is contained in:
parent
077b68ebbd
commit
115deecff1
@ -113,7 +113,8 @@ export async function useExpressionsQueryProcessor(config: Indexable) {
|
||||
if (!obj.error) {
|
||||
if (type === ExpressionResultType.TIME_SERIES_VALUES) {
|
||||
if (results.length === 1) {
|
||||
source[c.label || name] = results[0].values.map((d: { value: unknown }) => d.value) || [];
|
||||
const label = results[0].metric && results[0].metric.labels[0] && results[0].metric.labels[0].value;
|
||||
source[c.label || label || name] = results[0].values.map((d: { value: unknown }) => d.value) || [];
|
||||
} else {
|
||||
const labels = (c.label || "").split(",").map((item: string) => item.replace(/^\s*|\s*$/g, ""));
|
||||
for (const item of results) {
|
||||
|
Loading…
Reference in New Issue
Block a user