@perses-dev/timeseries-chart-plugin 0.10.0 → 0.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/__mf/js/TimeSeriesChart.2e93229a.js +5 -0
  2. package/__mf/js/async/109.f05e61af.js +73 -0
  3. package/__mf/js/async/{964.719c530c.js → 110.8b9c7f4b.js} +2 -2
  4. package/__mf/js/async/186.b17dcce5.js +1 -0
  5. package/__mf/js/async/{547.bb4f1e58.js → 547.a80ef962.js} +2 -2
  6. package/__mf/js/async/964.e89cbd3b.js +110 -0
  7. package/__mf/js/async/{580.5f4b0dbd.js → 971.6fcf317e.js} +3 -3
  8. package/__mf/js/async/__federation_expose_TimeSeriesChart.f017c9e5.js +3 -0
  9. package/__mf/js/main.25080a30.js +5 -0
  10. package/lib/GeneralSettingsEditor.d.ts +4 -0
  11. package/lib/GeneralSettingsEditor.d.ts.map +1 -0
  12. package/lib/{TimeSeriesChartOptionsEditorSettings.js → GeneralSettingsEditor.js} +3 -14
  13. package/lib/GeneralSettingsEditor.js.map +1 -0
  14. package/lib/QuerySettingsEditor.d.ts +3 -17
  15. package/lib/QuerySettingsEditor.d.ts.map +1 -1
  16. package/lib/QuerySettingsEditor.js +370 -88
  17. package/lib/QuerySettingsEditor.js.map +1 -1
  18. package/lib/TimeSeriesChart.d.ts.map +1 -1
  19. package/lib/TimeSeriesChart.js +8 -3
  20. package/lib/TimeSeriesChart.js.map +1 -1
  21. package/lib/TimeSeriesChartPanel.js +1 -1
  22. package/lib/TimeSeriesChartPanel.js.map +1 -1
  23. package/lib/VisualOptionsEditor.d.ts.map +1 -1
  24. package/lib/VisualOptionsEditor.js +84 -64
  25. package/lib/VisualOptionsEditor.js.map +1 -1
  26. package/lib/cjs/{TimeSeriesChartOptionsEditorSettings.js → GeneralSettingsEditor.js} +4 -15
  27. package/lib/cjs/QuerySettingsEditor.js +410 -95
  28. package/lib/cjs/TimeSeriesChart.js +8 -3
  29. package/lib/cjs/TimeSeriesChartPanel.js +1 -1
  30. package/lib/cjs/VisualOptionsEditor.js +82 -62
  31. package/lib/cjs/index.js +1 -1
  32. package/lib/cjs/time-series-chart-model.js +37 -0
  33. package/lib/cjs/utils/data-transform.js +7 -54
  34. package/lib/cjs/utils/palette-gen.js +2 -2
  35. package/lib/index.d.ts +1 -1
  36. package/lib/index.d.ts.map +1 -1
  37. package/lib/index.js +1 -1
  38. package/lib/index.js.map +1 -1
  39. package/lib/time-series-chart-model.d.ts +32 -2
  40. package/lib/time-series-chart-model.d.ts.map +1 -1
  41. package/lib/time-series-chart-model.js +25 -0
  42. package/lib/time-series-chart-model.js.map +1 -1
  43. package/lib/utils/data-transform.d.ts +6 -7
  44. package/lib/utils/data-transform.d.ts.map +1 -1
  45. package/lib/utils/data-transform.js +8 -54
  46. package/lib/utils/data-transform.js.map +1 -1
  47. package/lib/utils/palette-gen.js +2 -2
  48. package/lib/utils/palette-gen.js.map +1 -1
  49. package/mf-manifest.json +14 -14
  50. package/mf-stats.json +14 -14
  51. package/package.json +5 -5
  52. package/__mf/js/TimeSeriesChart.d3742b3b.js +0 -5
  53. package/__mf/js/async/109.bf4f02fe.js +0 -73
  54. package/__mf/js/async/133.c48c8cc8.js +0 -110
  55. package/__mf/js/async/686.0cd9a75c.js +0 -1
  56. package/__mf/js/async/__federation_expose_TimeSeriesChart.f20a0aca.js +0 -3
  57. package/__mf/js/main.2c598209.js +0 -5
  58. package/lib/TimeSeriesChartOptionsEditorSettings.d.ts +0 -4
  59. package/lib/TimeSeriesChartOptionsEditorSettings.d.ts.map +0 -1
  60. package/lib/TimeSeriesChartOptionsEditorSettings.js.map +0 -1
  61. /package/__mf/js/async/{109.bf4f02fe.js.LICENSE.txt → 109.f05e61af.js.LICENSE.txt} +0 -0
  62. /package/__mf/js/async/{964.719c530c.js.LICENSE.txt → 110.8b9c7f4b.js.LICENSE.txt} +0 -0
  63. /package/__mf/js/async/{547.bb4f1e58.js.LICENSE.txt → 547.a80ef962.js.LICENSE.txt} +0 -0
  64. /package/__mf/js/async/{133.c48c8cc8.js.LICENSE.txt → 964.e89cbd3b.js.LICENSE.txt} +0 -0
@@ -29,56 +29,8 @@ export const BLUR_FADEOUT_OPACITY = 0.5;
29
29
  return getCommonTimeScale(seriesData);
30
30
  }
31
31
  /**
32
- * [DEPRECATED] Gets ECharts line series option properties for legacy LineChart
33
- */ export function getLineSeries(id, formattedName, data, visual, paletteColor) {
34
- const lineWidth = visual.lineWidth ?? DEFAULT_LINE_WIDTH;
35
- const pointRadius = visual.pointRadius ?? DEFAULT_POINT_RADIUS;
36
- // Shows datapoint symbols when selected time range is roughly 15 minutes or less
37
- let showPoints = data !== undefined && data.length <= HIDE_DATAPOINTS_LIMIT;
38
- // Allows overriding default behavior and opt-in to always show all symbols (can hurt performance)
39
- if (visual.showPoints === 'always') {
40
- showPoints = true;
41
- }
42
- return {
43
- type: 'line',
44
- id: id,
45
- name: formattedName,
46
- data: data,
47
- connectNulls: visual.connectNulls ?? DEFAULT_CONNECT_NULLS,
48
- color: paletteColor,
49
- stack: visual.stack === 'all' ? visual.stack : undefined,
50
- sampling: 'lttb',
51
- progressiveThreshold: OPTIMIZED_MODE_SERIES_LIMIT,
52
- showSymbol: showPoints,
53
- showAllSymbol: true,
54
- symbolSize: pointRadius,
55
- lineStyle: {
56
- width: lineWidth,
57
- opacity: 0.8
58
- },
59
- areaStyle: {
60
- opacity: visual.areaOpacity ?? DEFAULT_AREA_OPACITY
61
- },
62
- // https://echarts.apache.org/en/option.html#series-line.emphasis
63
- emphasis: {
64
- focus: 'series',
65
- disabled: visual.areaOpacity !== undefined && visual.areaOpacity > 0,
66
- lineStyle: {
67
- width: lineWidth + 1.5,
68
- opacity: 1
69
- }
70
- },
71
- blur: {
72
- lineStyle: {
73
- width: lineWidth,
74
- opacity: BLUR_FADEOUT_OPACITY
75
- }
76
- }
77
- };
78
- }
79
- /**
80
- * Gets ECharts line series option properties for recommended TimeChart
81
- */ export function getTimeSeries(id, datasetIndex, formattedName, visual, timeScale, paletteColor) {
32
+ * Gets ECharts line series option properties for regular trends
33
+ */ export function getTimeSeries(id, datasetIndex, formattedName, visual, timeScale, paletteColor, querySettings) {
82
34
  const lineWidth = visual.lineWidth ?? DEFAULT_LINE_WIDTH;
83
35
  const pointRadius = visual.pointRadius ?? DEFAULT_POINT_RADIUS;
84
36
  // Shows datapoint symbols when selected time range is roughly 15 minutes or less
@@ -117,10 +69,10 @@ export const BLUR_FADEOUT_OPACITY = 0.5;
117
69
  symbolSize: pointRadius,
118
70
  lineStyle: {
119
71
  width: lineWidth,
120
- opacity: 0.95
72
+ type: querySettings?.lineStyle ?? visual.lineStyle
121
73
  },
122
74
  areaStyle: {
123
- opacity: visual.areaOpacity ?? DEFAULT_AREA_OPACITY
75
+ opacity: querySettings?.areaOpacity ?? visual.areaOpacity ?? DEFAULT_AREA_OPACITY
124
76
  },
125
77
  // https://echarts.apache.org/en/option.html#series-line.emphasis
126
78
  emphasis: {
@@ -128,7 +80,8 @@ export const BLUR_FADEOUT_OPACITY = 0.5;
128
80
  disabled: visual.areaOpacity !== undefined && visual.areaOpacity > 0,
129
81
  lineStyle: {
130
82
  width: lineWidth + 1,
131
- opacity: 1
83
+ opacity: 1,
84
+ type: visual.lineStyle
132
85
  }
133
86
  },
134
87
  selectedMode: 'single',
@@ -141,7 +94,8 @@ export const BLUR_FADEOUT_OPACITY = 0.5;
141
94
  blur: {
142
95
  lineStyle: {
143
96
  width: lineWidth,
144
- opacity: BLUR_FADEOUT_OPACITY
97
+ opacity: BLUR_FADEOUT_OPACITY,
98
+ type: visual.lineStyle
145
99
  }
146
100
  }
147
101
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/utils/data-transform.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport type { YAXisComponentOption } from 'echarts';\nimport { LineSeriesOption, BarSeriesOption } from 'echarts/charts';\nimport {\n StepOptions,\n TimeScale,\n TimeSeries,\n TimeSeriesValueTuple,\n getCommonTimeScale,\n TimeSeriesData,\n} from '@perses-dev/core';\nimport {\n OPTIMIZED_MODE_SERIES_LIMIT,\n LegacyTimeSeries,\n EChartsDataFormat,\n EChartsValues,\n TimeSeriesOption,\n} from '@perses-dev/components';\nimport { useTimeSeriesQueries, PanelData } from '@perses-dev/plugin-system';\nimport {\n DEFAULT_AREA_OPACITY,\n DEFAULT_CONNECT_NULLS,\n DEFAULT_LINE_WIDTH,\n DEFAULT_POINT_RADIUS,\n DEFAULT_Y_AXIS,\n POSITIVE_MIN_VALUE_MULTIPLIER,\n NEGATIVE_MIN_VALUE_MULTIPLIER,\n TimeSeriesChartVisualOptions,\n TimeSeriesChartYAxisOptions,\n} from '../time-series-chart-model';\n\nexport type RunningQueriesState = ReturnType<typeof useTimeSeriesQueries>;\n\nexport const EMPTY_GRAPH_DATA: EChartsDataFormat = {\n timeSeries: [],\n xAxis: [],\n legendItems: [],\n};\n\nexport const HIDE_DATAPOINTS_LIMIT = 70;\n\nexport const BLUR_FADEOUT_OPACITY = 0.5;\n\n/**\n * Given a list of running queries, calculates a common time scale for use on\n * the x axis (i.e. start/end dates and a step that is divisible into all of\n * the queries' steps).\n */\nexport function getCommonTimeScaleForQueries(queries: Array<PanelData<TimeSeriesData>>): TimeScale | undefined {\n const seriesData = queries.map((query) => query.data);\n return getCommonTimeScale(seriesData);\n}\n\n/**\n * [DEPRECATED] Gets ECharts line series option properties for legacy LineChart\n */\nexport function getLineSeries(\n id: string,\n formattedName: string,\n data: LegacyTimeSeries['data'],\n visual: TimeSeriesChartVisualOptions,\n paletteColor?: string\n): LegacyTimeSeries {\n const lineWidth = visual.lineWidth ?? DEFAULT_LINE_WIDTH;\n const pointRadius = visual.pointRadius ?? DEFAULT_POINT_RADIUS;\n\n // Shows datapoint symbols when selected time range is roughly 15 minutes or less\n let showPoints = data !== undefined && data.length <= HIDE_DATAPOINTS_LIMIT;\n // Allows overriding default behavior and opt-in to always show all symbols (can hurt performance)\n if (visual.showPoints === 'always') {\n showPoints = true;\n }\n\n return {\n type: 'line',\n id: id,\n name: formattedName,\n data: data,\n connectNulls: visual.connectNulls ?? DEFAULT_CONNECT_NULLS,\n color: paletteColor,\n stack: visual.stack === 'all' ? visual.stack : undefined,\n sampling: 'lttb',\n progressiveThreshold: OPTIMIZED_MODE_SERIES_LIMIT, // https://echarts.apache.org/en/option.html#series-lines.progressiveThreshold\n showSymbol: showPoints,\n showAllSymbol: true,\n symbolSize: pointRadius,\n lineStyle: {\n width: lineWidth,\n opacity: 0.8,\n },\n areaStyle: {\n opacity: visual.areaOpacity ?? DEFAULT_AREA_OPACITY,\n },\n // https://echarts.apache.org/en/option.html#series-line.emphasis\n emphasis: {\n focus: 'series',\n disabled: visual.areaOpacity !== undefined && visual.areaOpacity > 0, // prevents flicker when moving cursor between shaded regions\n lineStyle: {\n width: lineWidth + 1.5,\n opacity: 1,\n },\n },\n blur: {\n lineStyle: {\n width: lineWidth,\n opacity: BLUR_FADEOUT_OPACITY,\n },\n },\n };\n}\n\n/**\n * Gets ECharts line series option properties for recommended TimeChart\n */\nexport function getTimeSeries(\n id: string,\n datasetIndex: number,\n formattedName: string,\n visual: TimeSeriesChartVisualOptions,\n timeScale: TimeScale,\n paletteColor: string\n): TimeSeriesOption {\n const lineWidth = visual.lineWidth ?? DEFAULT_LINE_WIDTH;\n const pointRadius = visual.pointRadius ?? DEFAULT_POINT_RADIUS;\n\n // Shows datapoint symbols when selected time range is roughly 15 minutes or less\n const minuteMs = 60000;\n let showPoints = timeScale.rangeMs <= minuteMs * 15;\n // Allows overriding default behavior and opt-in to always show all symbols (can hurt performance)\n if (visual.showPoints === 'always') {\n showPoints = true;\n }\n\n if (visual.display === 'bar') {\n const series: BarSeriesOption = {\n type: 'bar',\n id: id,\n datasetIndex,\n name: formattedName,\n color: paletteColor,\n stack: visual.stack === 'all' ? visual.stack : undefined,\n label: {\n show: false,\n },\n };\n return series;\n }\n\n const series: LineSeriesOption = {\n type: 'line',\n id: id,\n datasetIndex,\n name: formattedName,\n connectNulls: visual.connectNulls ?? DEFAULT_CONNECT_NULLS,\n color: paletteColor,\n stack: visual.stack === 'all' ? visual.stack : undefined,\n sampling: 'lttb',\n progressiveThreshold: OPTIMIZED_MODE_SERIES_LIMIT, // https://echarts.apache.org/en/option.html#series-lines.progressiveThreshold\n showSymbol: showPoints,\n showAllSymbol: true,\n symbolSize: pointRadius,\n lineStyle: {\n width: lineWidth,\n opacity: 0.95,\n },\n areaStyle: {\n opacity: visual.areaOpacity ?? DEFAULT_AREA_OPACITY,\n },\n // https://echarts.apache.org/en/option.html#series-line.emphasis\n emphasis: {\n focus: 'series',\n disabled: visual.areaOpacity !== undefined && visual.areaOpacity > 0, // prevents flicker when moving cursor between shaded regions\n lineStyle: {\n width: lineWidth + 1,\n opacity: 1,\n },\n },\n selectedMode: 'single',\n select: {\n itemStyle: {\n borderColor: paletteColor,\n borderWidth: pointRadius + 0.5,\n },\n },\n blur: {\n lineStyle: {\n width: lineWidth,\n opacity: BLUR_FADEOUT_OPACITY,\n },\n },\n };\n return series;\n}\n\n/**\n * Gets threshold-specific line series styles\n * markLine cannot be used since it does not update yAxis max / min\n * and threshold data needs to show in the tooltip\n */\nexport function getThresholdSeries(name: string, threshold: StepOptions, seriesIndex: number): LineSeriesOption {\n return {\n type: 'line',\n name: name,\n id: name,\n datasetId: name,\n datasetIndex: seriesIndex,\n color: threshold.color,\n label: {\n show: false,\n },\n lineStyle: {\n type: 'dashed',\n width: 2,\n },\n emphasis: {\n focus: 'series',\n lineStyle: {\n width: 2.5,\n },\n },\n blur: {\n lineStyle: {\n opacity: BLUR_FADEOUT_OPACITY,\n },\n },\n };\n}\n\n/**\n * Converts percent threshold into absolute step value\n * If max is undefined, use the max value from time series data as default\n */\nexport function convertPercentThreshold(\n percent: number,\n data: LegacyTimeSeries[] | TimeSeries[],\n max?: number,\n min?: number\n): number {\n const percentDecimal = percent / 100;\n const adjustedMax = max ?? findMax(data);\n const adjustedMin = min ?? 0;\n const total = adjustedMax - adjustedMin;\n return percentDecimal * total + adjustedMin;\n}\n\nfunction findMax(data: LegacyTimeSeries[] | TimeSeries[]): number {\n let max = 0;\n if (data.length && data[0] !== undefined && (data as TimeSeries[])[0]?.values) {\n (data as TimeSeries[]).forEach((series) => {\n series.values.forEach((valueTuple: TimeSeriesValueTuple) => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const [_, value] = valueTuple;\n if (typeof value === 'number' && value > max) {\n max = value;\n }\n });\n });\n } else {\n (data as LegacyTimeSeries[]).forEach((series) => {\n if (series.data !== undefined) {\n series.data.forEach((value: EChartsValues) => {\n if (typeof value === 'number' && value > max) {\n max = value;\n }\n });\n }\n });\n }\n return max;\n}\n\n/**\n * Converts Perses panel yAxis from dashboard spec to ECharts supported yAxis options\n */\nexport function convertPanelYAxis(inputAxis: TimeSeriesChartYAxisOptions = {}): YAXisComponentOption {\n const yAxis: YAXisComponentOption = {\n show: true,\n axisLabel: {\n show: inputAxis?.show ?? DEFAULT_Y_AXIS.show,\n },\n min: inputAxis?.min,\n max: inputAxis?.max,\n };\n\n // Set the y-axis minimum relative to the data\n if (inputAxis?.min === undefined) {\n // https://echarts.apache.org/en/option.html#yAxis.min\n yAxis.min = (value): number => {\n if (value.min >= 0 && value.min <= 1) {\n // Helps with PercentDecimal units, or datasets that return 0 or 1 booleans\n return 0;\n }\n\n // Note: We can tweak the MULTIPLIER constants if we want\n // TODO: Experiment with using a padding that is based on the difference between max value and min value\n if (value.min > 0) {\n return roundDown(value.min * POSITIVE_MIN_VALUE_MULTIPLIER);\n } else {\n return roundDown(value.min * NEGATIVE_MIN_VALUE_MULTIPLIER);\n }\n };\n }\n\n return yAxis;\n}\n\n/**\n * Rounds down to nearest number with one significant digit.\n *\n * Examples:\n * 1. 675 --> 600\n * 2. 0.567 --> 0.5\n * 3. -12 --> -20\n */\nexport function roundDown(num: number): number {\n const magnitude = Math.floor(Math.log10(Math.abs(num)));\n const firstDigit = Math.floor(num / Math.pow(10, magnitude));\n return firstDigit * Math.pow(10, magnitude);\n}\n"],"names":["getCommonTimeScale","OPTIMIZED_MODE_SERIES_LIMIT","DEFAULT_AREA_OPACITY","DEFAULT_CONNECT_NULLS","DEFAULT_LINE_WIDTH","DEFAULT_POINT_RADIUS","DEFAULT_Y_AXIS","POSITIVE_MIN_VALUE_MULTIPLIER","NEGATIVE_MIN_VALUE_MULTIPLIER","EMPTY_GRAPH_DATA","timeSeries","xAxis","legendItems","HIDE_DATAPOINTS_LIMIT","BLUR_FADEOUT_OPACITY","getCommonTimeScaleForQueries","queries","seriesData","map","query","data","getLineSeries","id","formattedName","visual","paletteColor","lineWidth","pointRadius","showPoints","undefined","length","type","name","connectNulls","color","stack","sampling","progressiveThreshold","showSymbol","showAllSymbol","symbolSize","lineStyle","width","opacity","areaStyle","areaOpacity","emphasis","focus","disabled","blur","getTimeSeries","datasetIndex","timeScale","minuteMs","rangeMs","display","series","label","show","selectedMode","select","itemStyle","borderColor","borderWidth","getThresholdSeries","threshold","seriesIndex","datasetId","convertPercentThreshold","percent","max","min","percentDecimal","adjustedMax","findMax","adjustedMin","total","values","forEach","valueTuple","_","value","convertPanelYAxis","inputAxis","yAxis","axisLabel","roundDown","num","magnitude","Math","floor","log10","abs","firstDigit","pow"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAIjC,SAKEA,kBAAkB,QAEb,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YACF;QACF;IACF,OAAO;QACJ7D,KAA4B0D,OAAO,CAAC,CAACtB;YACpC,IAAIA,OAAOpC,IAAI,KAAKS,WAAW;gBAC7B2B,OAAOpC,IAAI,CAAC0D,OAAO,CAAC,CAACG;oBACnB,IAAI,OAAOA,UAAU,YAAYA,QAAQX,KAAK;wBAC5CA,MAAMW;oBACR;gBACF;YACF;QACF;IACF;IACA,OAAOX;AACT;AAEA;;CAEC,GACD,OAAO,SAASY,kBAAkBC,YAAyC,CAAC,CAAC;IAC3E,MAAMC,QAA8B;QAClC1B,MAAM;QACN2B,WAAW;YACT3B,MAAMyB,WAAWzB,QAAQpD,eAAeoD,IAAI;QAC9C;QACAa,KAAKY,WAAWZ;QAChBD,KAAKa,WAAWb;IAClB;IAEA,8CAA8C;IAC9C,IAAIa,WAAWZ,QAAQ1C,WAAW;QAChC,sDAAsD;QACtDuD,MAAMb,GAAG,GAAG,CAACU;YACX,IAAIA,MAAMV,GAAG,IAAI,KAAKU,MAAMV,GAAG,IAAI,GAAG;gBACpC,2EAA2E;gBAC3E,OAAO;YACT;YAEA,yDAAyD;YACzD,wGAAwG;YACxG,IAAIU,MAAMV,GAAG,GAAG,GAAG;gBACjB,OAAOe,UAAUL,MAAMV,GAAG,GAAGhE;YAC/B,OAAO;gBACL,OAAO+E,UAAUL,MAAMV,GAAG,GAAG/D;YAC/B;QACF;IACF;IAEA,OAAO4E;AACT;AAEA;;;;;;;CAOC,GACD,OAAO,SAASE,UAAUC,GAAW;IACnC,MAAMC,YAAYC,KAAKC,KAAK,CAACD,KAAKE,KAAK,CAACF,KAAKG,GAAG,CAACL;IACjD,MAAMM,aAAaJ,KAAKC,KAAK,CAACH,MAAME,KAAKK,GAAG,CAAC,IAAIN;IACjD,OAAOK,aAAaJ,KAAKK,GAAG,CAAC,IAAIN;AACnC"}
1
+ {"version":3,"sources":["../../../src/utils/data-transform.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport type { YAXisComponentOption } from 'echarts';\nimport { LineSeriesOption, BarSeriesOption } from 'echarts/charts';\nimport {\n StepOptions,\n TimeScale,\n TimeSeries,\n TimeSeriesValueTuple,\n getCommonTimeScale,\n TimeSeriesData,\n} from '@perses-dev/core';\nimport {\n OPTIMIZED_MODE_SERIES_LIMIT,\n LegacyTimeSeries,\n EChartsDataFormat,\n EChartsValues,\n TimeSeriesOption,\n} from '@perses-dev/components';\nimport { useTimeSeriesQueries, PanelData } from '@perses-dev/plugin-system';\nimport {\n DEFAULT_AREA_OPACITY,\n DEFAULT_CONNECT_NULLS,\n DEFAULT_LINE_WIDTH,\n DEFAULT_POINT_RADIUS,\n DEFAULT_Y_AXIS,\n POSITIVE_MIN_VALUE_MULTIPLIER,\n NEGATIVE_MIN_VALUE_MULTIPLIER,\n TimeSeriesChartVisualOptions,\n TimeSeriesChartYAxisOptions,\n LineStyleType,\n} from '../time-series-chart-model';\n\nexport type RunningQueriesState = ReturnType<typeof useTimeSeriesQueries>;\n\nexport const EMPTY_GRAPH_DATA: EChartsDataFormat = {\n timeSeries: [],\n xAxis: [],\n legendItems: [],\n};\n\nexport const HIDE_DATAPOINTS_LIMIT = 70;\n\nexport const BLUR_FADEOUT_OPACITY = 0.5;\n\n/**\n * Given a list of running queries, calculates a common time scale for use on\n * the x axis (i.e. start/end dates and a step that is divisible into all of\n * the queries' steps).\n */\nexport function getCommonTimeScaleForQueries(queries: Array<PanelData<TimeSeriesData>>): TimeScale | undefined {\n const seriesData = queries.map((query) => query.data);\n return getCommonTimeScale(seriesData);\n}\n\n/**\n * Gets ECharts line series option properties for regular trends\n */\nexport function getTimeSeries(\n id: string,\n datasetIndex: number,\n formattedName: string,\n visual: TimeSeriesChartVisualOptions,\n timeScale: TimeScale,\n paletteColor: string,\n querySettings?: { lineStyle?: LineStyleType; areaOpacity?: number }\n): TimeSeriesOption {\n const lineWidth = visual.lineWidth ?? DEFAULT_LINE_WIDTH;\n const pointRadius = visual.pointRadius ?? DEFAULT_POINT_RADIUS;\n\n // Shows datapoint symbols when selected time range is roughly 15 minutes or less\n const minuteMs = 60000;\n let showPoints = timeScale.rangeMs <= minuteMs * 15;\n // Allows overriding default behavior and opt-in to always show all symbols (can hurt performance)\n if (visual.showPoints === 'always') {\n showPoints = true;\n }\n\n if (visual.display === 'bar') {\n const series: BarSeriesOption = {\n type: 'bar',\n id: id,\n datasetIndex,\n name: formattedName,\n color: paletteColor,\n stack: visual.stack === 'all' ? visual.stack : undefined,\n label: {\n show: false,\n },\n };\n return series;\n }\n\n const series: LineSeriesOption = {\n type: 'line',\n id: id,\n datasetIndex,\n name: formattedName,\n connectNulls: visual.connectNulls ?? DEFAULT_CONNECT_NULLS,\n color: paletteColor,\n stack: visual.stack === 'all' ? visual.stack : undefined,\n sampling: 'lttb',\n progressiveThreshold: OPTIMIZED_MODE_SERIES_LIMIT, // https://echarts.apache.org/en/option.html#series-lines.progressiveThreshold\n showSymbol: showPoints,\n showAllSymbol: true,\n symbolSize: pointRadius,\n lineStyle: {\n width: lineWidth,\n type: (querySettings?.lineStyle ?? visual.lineStyle) as LineStyleType,\n },\n areaStyle: {\n opacity: querySettings?.areaOpacity ?? visual.areaOpacity ?? DEFAULT_AREA_OPACITY,\n },\n // https://echarts.apache.org/en/option.html#series-line.emphasis\n emphasis: {\n focus: 'series',\n disabled: visual.areaOpacity !== undefined && visual.areaOpacity > 0, // prevents flicker when moving cursor between shaded regions\n lineStyle: {\n width: lineWidth + 1,\n opacity: 1,\n type: visual.lineStyle,\n },\n },\n selectedMode: 'single',\n select: {\n itemStyle: {\n borderColor: paletteColor,\n borderWidth: pointRadius + 0.5,\n },\n },\n blur: {\n lineStyle: {\n width: lineWidth,\n opacity: BLUR_FADEOUT_OPACITY,\n type: visual.lineStyle,\n },\n },\n };\n return series;\n}\n\n/**\n * Gets threshold-specific line series styles\n * markLine cannot be used since it does not update yAxis max / min\n * and threshold data needs to show in the tooltip\n */\nexport function getThresholdSeries(name: string, threshold: StepOptions, seriesIndex: number): LineSeriesOption {\n return {\n type: 'line',\n name: name,\n id: name,\n datasetId: name,\n datasetIndex: seriesIndex,\n color: threshold.color,\n label: {\n show: false,\n },\n lineStyle: {\n type: 'dashed',\n width: 2,\n },\n emphasis: {\n focus: 'series',\n lineStyle: {\n width: 2.5,\n },\n },\n blur: {\n lineStyle: {\n opacity: BLUR_FADEOUT_OPACITY,\n },\n },\n };\n}\n\n/**\n * Converts percent threshold into absolute step value\n * If max is undefined, use the max value from time series data as default\n */\nexport function convertPercentThreshold(\n percent: number,\n data: LegacyTimeSeries[] | TimeSeries[],\n max?: number,\n min?: number\n): number {\n const percentDecimal = percent / 100;\n const adjustedMax = max ?? findMax(data);\n const adjustedMin = min ?? 0;\n const total = adjustedMax - adjustedMin;\n return percentDecimal * total + adjustedMin;\n}\n\nfunction findMax(data: LegacyTimeSeries[] | TimeSeries[]): number {\n let max = 0;\n if (data.length && data[0] !== undefined && (data as TimeSeries[])[0]?.values) {\n (data as TimeSeries[]).forEach((series) => {\n series.values.forEach((valueTuple: TimeSeriesValueTuple) => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const [_, value] = valueTuple;\n if (typeof value === 'number' && value > max) {\n max = value;\n }\n });\n });\n } else {\n (data as LegacyTimeSeries[]).forEach((series) => {\n if (series.data !== undefined) {\n series.data.forEach((value: EChartsValues) => {\n if (typeof value === 'number' && value > max) {\n max = value;\n }\n });\n }\n });\n }\n return max;\n}\n\n/**\n * Converts Perses panel yAxis from dashboard spec to ECharts supported yAxis options\n */\nexport function convertPanelYAxis(inputAxis: TimeSeriesChartYAxisOptions = {}): YAXisComponentOption {\n const yAxis: YAXisComponentOption = {\n show: true,\n axisLabel: {\n show: inputAxis?.show ?? DEFAULT_Y_AXIS.show,\n },\n min: inputAxis?.min,\n max: inputAxis?.max,\n };\n\n // Set the y-axis minimum relative to the data\n if (inputAxis?.min === undefined) {\n // https://echarts.apache.org/en/option.html#yAxis.min\n yAxis.min = (value): number => {\n if (value.min >= 0 && value.min <= 1) {\n // Helps with PercentDecimal units, or datasets that return 0 or 1 booleans\n return 0;\n }\n\n // Note: We can tweak the MULTIPLIER constants if we want\n // TODO: Experiment with using a padding that is based on the difference between max value and min value\n if (value.min > 0) {\n return roundDown(value.min * POSITIVE_MIN_VALUE_MULTIPLIER);\n } else {\n return roundDown(value.min * NEGATIVE_MIN_VALUE_MULTIPLIER);\n }\n };\n }\n\n return yAxis;\n}\n\n/**\n * Rounds down to nearest number with one significant digit.\n *\n * Examples:\n * 1. 675 --> 600\n * 2. 0.567 --> 0.5\n * 3. -12 --> -20\n */\nexport function roundDown(num: number): number {\n const magnitude = Math.floor(Math.log10(Math.abs(num)));\n const firstDigit = Math.floor(num / Math.pow(10, magnitude));\n return firstDigit * Math.pow(10, magnitude);\n}\n"],"names":["getCommonTimeScale","OPTIMIZED_MODE_SERIES_LIMIT","DEFAULT_AREA_OPACITY","DEFAULT_CONNECT_NULLS","DEFAULT_LINE_WIDTH","DEFAULT_POINT_RADIUS","DEFAULT_Y_AXIS","POSITIVE_MIN_VALUE_MULTIPLIER","NEGATIVE_MIN_VALUE_MULTIPLIER","EMPTY_GRAPH_DATA","timeSeries","xAxis","legendItems","HIDE_DATAPOINTS_LIMIT","BLUR_FADEOUT_OPACITY","getCommonTimeScaleForQueries","queries","seriesData","map","query","data","getTimeSeries","id","datasetIndex","formattedName","visual","timeScale","paletteColor","querySettings","lineWidth","pointRadius","minuteMs","showPoints","rangeMs","display","series","type","name","color","stack","undefined","label","show","connectNulls","sampling","progressiveThreshold","showSymbol","showAllSymbol","symbolSize","lineStyle","width","areaStyle","opacity","areaOpacity","emphasis","focus","disabled","selectedMode","select","itemStyle","borderColor","borderWidth","blur","getThresholdSeries","threshold","seriesIndex","datasetId","convertPercentThreshold","percent","max","min","percentDecimal","adjustedMax","findMax","adjustedMin","total","length","values","forEach","valueTuple","_","value","convertPanelYAxis","inputAxis","yAxis","axisLabel","roundDown","num","magnitude","Math","floor","log10","abs","firstDigit","pow"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAIjC,SAKEA,kBAAkB,QAEb,mBAAmB;AAC1B,SACEC,2BAA2B,QAKtB,yBAAyB;AAEhC,SACEC,oBAAoB,EACpBC,qBAAqB,EACrBC,kBAAkB,EAClBC,oBAAoB,EACpBC,cAAc,EACdC,6BAA6B,EAC7BC,6BAA6B,QAIxB,6BAA6B;AAIpC,OAAO,MAAMC,mBAAsC;IACjDC,YAAY,EAAE;IACdC,OAAO,EAAE;IACTC,aAAa,EAAE;AACjB,EAAE;AAEF,OAAO,MAAMC,wBAAwB,GAAG;AAExC,OAAO,MAAMC,uBAAuB,IAAI;AAExC;;;;CAIC,GACD,OAAO,SAASC,6BAA6BC,OAAyC;IACpF,MAAMC,aAAaD,QAAQE,GAAG,CAAC,CAACC,QAAUA,MAAMC,IAAI;IACpD,OAAOpB,mBAAmBiB;AAC5B;AAEA;;CAEC,GACD,OAAO,SAASI,cACdC,EAAU,EACVC,YAAoB,EACpBC,aAAqB,EACrBC,MAAoC,EACpCC,SAAoB,EACpBC,YAAoB,EACpBC,aAAmE;IAEnE,MAAMC,YAAYJ,OAAOI,SAAS,IAAIzB;IACtC,MAAM0B,cAAcL,OAAOK,WAAW,IAAIzB;IAE1C,iFAAiF;IACjF,MAAM0B,WAAW;IACjB,IAAIC,aAAaN,UAAUO,OAAO,IAAIF,WAAW;IACjD,kGAAkG;IAClG,I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3C,MAAMyC,WAAWzC,QAAQpC,eAAeoC,IAAI;QAC9C;QACA4B,KAAKa,WAAWb;QAChBD,KAAKc,WAAWd;IAClB;IAEA,8CAA8C;IAC9C,IAAIc,WAAWb,QAAQ9B,WAAW;QAChC,sDAAsD;QACtD4C,MAAMd,GAAG,GAAG,CAACW;YACX,IAAIA,MAAMX,GAAG,IAAI,KAAKW,MAAMX,GAAG,IAAI,GAAG;gBACpC,2EAA2E;gBAC3E,OAAO;YACT;YAEA,yDAAyD;YACzD,wGAAwG;YACxG,IAAIW,MAAMX,GAAG,GAAG,GAAG;gBACjB,OAAOgB,UAAUL,MAAMX,GAAG,GAAG/D;YAC/B,OAAO;gBACL,OAAO+E,UAAUL,MAAMX,GAAG,GAAG9D;YAC/B;QACF;IACF;IAEA,OAAO4E;AACT;AAEA;;;;;;;CAOC,GACD,OAAO,SAASE,UAAUC,GAAW;IACnC,MAAMC,YAAYC,KAAKC,KAAK,CAACD,KAAKE,KAAK,CAACF,KAAKG,GAAG,CAACL;IACjD,MAAMM,aAAaJ,KAAKC,KAAK,CAACH,MAAME,KAAKK,GAAG,CAAC,IAAIN;IACjD,OAAOK,aAAaJ,KAAKK,GAAG,CAAC,IAAIN;AACnC"}
@@ -17,9 +17,9 @@ import { getConsistentColor } from './palette';
17
17
  const { categoricalPalette, visual, muiPrimaryColor, seriesName, seriesIndex, querySettings, queryHasMultipleResults } = props;
18
18
  // Use color overrides defined in query settings in priority, if applicable
19
19
  if (querySettings) {
20
- if (querySettings.colorMode === 'fixed') {
20
+ if (querySettings.colorMode === 'fixed' && querySettings.colorValue) {
21
21
  return querySettings.colorValue;
22
- } else if (querySettings.colorMode === 'fixed-single' && !queryHasMultipleResults) {
22
+ } else if (querySettings.colorMode === 'fixed-single' && !queryHasMultipleResults && querySettings.colorValue) {
23
23
  return querySettings.colorValue;
24
24
  }
25
25
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/utils/palette-gen.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { QuerySettingsOptions, TimeSeriesChartVisualOptions } from '../time-series-chart-model';\nimport { getConsistentColor } from './palette';\n\nexport interface SeriesColorProps {\n categoricalPalette: string[];\n visual: TimeSeriesChartVisualOptions;\n muiPrimaryColor: string;\n seriesName: string;\n seriesIndex: number;\n querySettings?: QuerySettingsOptions;\n queryHasMultipleResults?: boolean;\n}\n\n/**\n * Get line color as well as color for tooltip and legend, account for whether palette is 'categorical' or 'auto' aka generative\n */\nexport function getSeriesColor(props: SeriesColorProps): string {\n const {\n categoricalPalette,\n visual,\n muiPrimaryColor,\n seriesName,\n seriesIndex,\n querySettings,\n queryHasMultipleResults,\n } = props;\n\n // Use color overrides defined in query settings in priority, if applicable\n if (querySettings) {\n if (querySettings.colorMode === 'fixed') {\n return querySettings.colorValue;\n } else if (querySettings.colorMode === 'fixed-single' && !queryHasMultipleResults) {\n return querySettings.colorValue;\n }\n }\n\n // Fallback is unlikely to set unless echarts theme palette in charts theme provider is undefined.\n const fallbackColor =\n Array.isArray(categoricalPalette) && categoricalPalette[0]\n ? (categoricalPalette[0] as string) // Needed since echarts color property isn't always an array.\n : muiPrimaryColor;\n\n // Explicit way to always cycle through classical palette instead of changing when based on number of series.\n if (visual.palette?.mode === 'categorical') {\n return getCategoricalPaletteColor(categoricalPalette, seriesIndex, fallbackColor);\n }\n\n return getAutoPaletteColor(seriesName, fallbackColor);\n}\n\n/**\n * Get color from generative color palette, this approaches uses series name as the seed and\n * allows for consistent colors across panels (when all panels use this approach).\n */\nexport function getAutoPaletteColor(name: string, fallbackColor: string): string {\n // corresponds to 'Auto' in palette.kind for generative color palette\n const generatedColor = getConsistentSeriesNameColor(name);\n return generatedColor ?? fallbackColor;\n}\n\n/**\n * Default classical qualitative palette that cycles through the colors array by index.\n */\nexport function getCategoricalPaletteColor(palette: string[], seriesIndex: number, fallbackColor: string): string {\n if (palette === undefined) {\n return fallbackColor;\n }\n // Loop through predefined static color palette\n const paletteTotalColors = palette.length ?? 1;\n const paletteIndex = seriesIndex % paletteTotalColors;\n // fallback color comes from echarts theme\n const seriesColor = palette[paletteIndex] ?? fallbackColor;\n return seriesColor;\n}\n\n/*\n * Generate a consistent series name color (if series name includes 'error', it will have a red hue).\n */\nexport function getConsistentSeriesNameColor(inputString: string): string {\n return getConsistentColor(inputString, inputString.toLowerCase().includes('error'));\n}\n"],"names":["getConsistentColor","getSeriesColor","props","categoricalPalette","visual","muiPrimaryColor","seriesName","seriesIndex","querySettings","queryHasMultipleResults","colorMode","colorValue","fallbackColor","Array","isArray","palette","mode","getCategoricalPaletteColor","getAutoPaletteColor","name","generatedColor","getConsistentSeriesNameColor","undefined","paletteTotalColors","length","paletteIndex","seriesColor","inputString","toLowerCase","includes"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAGjC,SAASA,kBAAkB,QAAQ,YAAY;AAY/C;;CAEC,GACD,OAAO,SAASC,eAAeC,KAAuB;IACpD,MAAM,EACJC,kBAAkB,EAClBC,MAAM,EACNC,eAAe,EACfC,UAAU,EACVC,WAAW,EACXC,aAAa,EACbC,uBAAuB,EACxB,GAAGP;IAEJ,2EAA2E;IAC3E,IAAIM,eAAe;QACjB,IAAIA,cAAcE,SAAS,KAAK,SAAS;YACvC,OAAOF,cAAcG,UAAU;QACjC,OAAO,IAAIH,cAAcE,SAAS,KAAK,kBAAkB,CAACD,yBAAyB;YACjF,OAAOD,cAAcG,UAAU;QACjC;IACF;IAEA,kGAAkG;IAClG,MAAMC,gBACJC,MAAMC,OAAO,CAACX,uBAAuBA,kBAAkB,CAAC,EAAE,GACrDA,kBAAkB,CAAC,EAAE,CAAY,6DAA6D;OAC/FE;IAEN,6GAA6G;IAC7G,IAAID,OAAOW,OAAO,EAAEC,SAAS,eAAe;QAC1C,OAAOC,2BAA2Bd,oBAAoBI,aAAaK;IACrE;IAEA,OAAOM,oBAAoBZ,YAAYM;AACzC;AAEA;;;CAGC,GACD,OAAO,SAASM,oBAAoBC,IAAY,EAAEP,aAAqB;IACrE,qEAAqE;IACrE,MAAMQ,iBAAiBC,6BAA6BF;IACpD,OAAOC,kBAAkBR;AAC3B;AAEA;;CAEC,GACD,OAAO,SAASK,2BAA2BF,OAAiB,EAAER,WAAmB,EAAEK,aAAqB;IACtG,IAAIG,YAAYO,WAAW;QACzB,OAAOV;IACT;IACA,+CAA+C;IAC/C,MAAMW,qBAAqBR,QAAQS,MAAM,IAAI;IAC7C,MAAMC,eAAelB,cAAcgB;IACnC,0CAA0C;IAC1C,MAAMG,cAAcX,OAAO,CAACU,aAAa,IAAIb;IAC7C,OAAOc;AACT;AAEA;;CAEC,GACD,OAAO,SAASL,6BAA6BM,WAAmB;IAC9D,OAAO3B,mBAAmB2B,aAAaA,YAAYC,WAAW,GAAGC,QAAQ,CAAC;AAC5E"}
1
+ {"version":3,"sources":["../../../src/utils/palette-gen.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { QuerySettingsOptions, TimeSeriesChartVisualOptions } from '../time-series-chart-model';\nimport { getConsistentColor } from './palette';\n\nexport interface SeriesColorProps {\n categoricalPalette: string[];\n visual: TimeSeriesChartVisualOptions;\n muiPrimaryColor: string;\n seriesName: string;\n seriesIndex: number;\n querySettings?: QuerySettingsOptions;\n queryHasMultipleResults?: boolean;\n}\n\n/**\n * Get line color as well as color for tooltip and legend, account for whether palette is 'categorical' or 'auto' aka generative\n */\nexport function getSeriesColor(props: SeriesColorProps): string {\n const {\n categoricalPalette,\n visual,\n muiPrimaryColor,\n seriesName,\n seriesIndex,\n querySettings,\n queryHasMultipleResults,\n } = props;\n\n // Use color overrides defined in query settings in priority, if applicable\n if (querySettings) {\n if (querySettings.colorMode === 'fixed' && querySettings.colorValue) {\n return querySettings.colorValue;\n } else if (querySettings.colorMode === 'fixed-single' && !queryHasMultipleResults && querySettings.colorValue) {\n return querySettings.colorValue;\n }\n }\n\n // Fallback is unlikely to set unless echarts theme palette in charts theme provider is undefined.\n const fallbackColor =\n Array.isArray(categoricalPalette) && categoricalPalette[0]\n ? (categoricalPalette[0] as string) // Needed since echarts color property isn't always an array.\n : muiPrimaryColor;\n\n // Explicit way to always cycle through classical palette instead of changing when based on number of series.\n if (visual.palette?.mode === 'categorical') {\n return getCategoricalPaletteColor(categoricalPalette, seriesIndex, fallbackColor);\n }\n\n return getAutoPaletteColor(seriesName, fallbackColor);\n}\n\n/**\n * Get color from generative color palette, this approaches uses series name as the seed and\n * allows for consistent colors across panels (when all panels use this approach).\n */\nexport function getAutoPaletteColor(name: string, fallbackColor: string): string {\n // corresponds to 'Auto' in palette.kind for generative color palette\n const generatedColor = getConsistentSeriesNameColor(name);\n return generatedColor ?? fallbackColor;\n}\n\n/**\n * Default classical qualitative palette that cycles through the colors array by index.\n */\nexport function getCategoricalPaletteColor(palette: string[], seriesIndex: number, fallbackColor: string): string {\n if (palette === undefined) {\n return fallbackColor;\n }\n // Loop through predefined static color palette\n const paletteTotalColors = palette.length ?? 1;\n const paletteIndex = seriesIndex % paletteTotalColors;\n // fallback color comes from echarts theme\n const seriesColor = palette[paletteIndex] ?? fallbackColor;\n return seriesColor;\n}\n\n/*\n * Generate a consistent series name color (if series name includes 'error', it will have a red hue).\n */\nexport function getConsistentSeriesNameColor(inputString: string): string {\n return getConsistentColor(inputString, inputString.toLowerCase().includes('error'));\n}\n"],"names":["getConsistentColor","getSeriesColor","props","categoricalPalette","visual","muiPrimaryColor","seriesName","seriesIndex","querySettings","queryHasMultipleResults","colorMode","colorValue","fallbackColor","Array","isArray","palette","mode","getCategoricalPaletteColor","getAutoPaletteColor","name","generatedColor","getConsistentSeriesNameColor","undefined","paletteTotalColors","length","paletteIndex","seriesColor","inputString","toLowerCase","includes"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAGjC,SAASA,kBAAkB,QAAQ,YAAY;AAY/C;;CAEC,GACD,OAAO,SAASC,eAAeC,KAAuB;IACpD,MAAM,EACJC,kBAAkB,EAClBC,MAAM,EACNC,eAAe,EACfC,UAAU,EACVC,WAAW,EACXC,aAAa,EACbC,uBAAuB,EACxB,GAAGP;IAEJ,2EAA2E;IAC3E,IAAIM,eAAe;QACjB,IAAIA,cAAcE,SAAS,KAAK,WAAWF,cAAcG,UAAU,EAAE;YACnE,OAAOH,cAAcG,UAAU;QACjC,OAAO,IAAIH,cAAcE,SAAS,KAAK,kBAAkB,CAACD,2BAA2BD,cAAcG,UAAU,EAAE;YAC7G,OAAOH,cAAcG,UAAU;QACjC;IACF;IAEA,kGAAkG;IAClG,MAAMC,gBACJC,MAAMC,OAAO,CAACX,uBAAuBA,kBAAkB,CAAC,EAAE,GACrDA,kBAAkB,CAAC,EAAE,CAAY,6DAA6D;OAC/FE;IAEN,6GAA6G;IAC7G,IAAID,OAAOW,OAAO,EAAEC,SAAS,eAAe;QAC1C,OAAOC,2BAA2Bd,oBAAoBI,aAAaK;IACrE;IAEA,OAAOM,oBAAoBZ,YAAYM;AACzC;AAEA;;;CAGC,GACD,OAAO,SAASM,oBAAoBC,IAAY,EAAEP,aAAqB;IACrE,qEAAqE;IACrE,MAAMQ,iBAAiBC,6BAA6BF;IACpD,OAAOC,kBAAkBR;AAC3B;AAEA;;CAEC,GACD,OAAO,SAASK,2BAA2BF,OAAiB,EAAER,WAAmB,EAAEK,aAAqB;IACtG,IAAIG,YAAYO,WAAW;QACzB,OAAOV;IACT;IACA,+CAA+C;IAC/C,MAAMW,qBAAqBR,QAAQS,MAAM,IAAI;IAC7C,MAAMC,eAAelB,cAAcgB;IACnC,0CAA0C;IAC1C,MAAMG,cAAcX,OAAO,CAACU,aAAa,IAAIb;IAC7C,OAAOc;AACT;AAEA;;CAEC,GACD,OAAO,SAASL,6BAA6BM,WAAmB;IAC9D,OAAO3B,mBAAmB2B,aAAaA,YAAYC,WAAW,GAAGC,QAAQ,CAAC;AAC5E"}
package/mf-manifest.json CHANGED
@@ -5,11 +5,11 @@
5
5
  "name": "TimeSeriesChart",
6
6
  "type": "app",
7
7
  "buildInfo": {
8
- "buildVersion": "0.10.0",
8
+ "buildVersion": "0.10.2",
9
9
  "buildName": "@perses-dev/timeseries-chart-plugin"
10
10
  },
11
11
  "remoteEntry": {
12
- "name": "__mf/js/TimeSeriesChart.d3742b3b.js",
12
+ "name": "__mf/js/TimeSeriesChart.2e93229a.js",
13
13
  "path": "",
14
14
  "type": "global"
15
15
  },
@@ -20,7 +20,7 @@
20
20
  "api": ""
21
21
  },
22
22
  "globalName": "TimeSeriesChart",
23
- "pluginVersion": "0.18.1",
23
+ "pluginVersion": "0.19.1",
24
24
  "prefetchInterface": false,
25
25
  "publicPath": "/plugins/TimeSeriesChart/"
26
26
  },
@@ -87,14 +87,14 @@
87
87
  {
88
88
  "id": "TimeSeriesChart:@perses-dev/components",
89
89
  "name": "@perses-dev/components",
90
- "version": "0.52.0-beta.5",
90
+ "version": "0.52.0",
91
91
  "singleton": true,
92
- "requiredVersion": "^0.52.0-beta.5",
92
+ "requiredVersion": "^0.52.0",
93
93
  "assets": {
94
94
  "js": {
95
95
  "async": [],
96
96
  "sync": [
97
- "__mf/js/async/547.bb4f1e58.js"
97
+ "__mf/js/async/547.a80ef962.js"
98
98
  ]
99
99
  },
100
100
  "css": {
@@ -106,14 +106,14 @@
106
106
  {
107
107
  "id": "TimeSeriesChart:@perses-dev/plugin-system",
108
108
  "name": "@perses-dev/plugin-system",
109
- "version": "0.52.0-beta.5",
109
+ "version": "0.52.0",
110
110
  "singleton": true,
111
- "requiredVersion": "^0.52.0-beta.5",
111
+ "requiredVersion": "^0.52.0",
112
112
  "assets": {
113
113
  "js": {
114
114
  "async": [],
115
115
  "sync": [
116
- "__mf/js/async/109.bf4f02fe.js"
116
+ "__mf/js/async/109.f05e61af.js"
117
117
  ]
118
118
  },
119
119
  "css": {
@@ -208,7 +208,7 @@
208
208
  "js": {
209
209
  "async": [],
210
210
  "sync": [
211
- "__mf/js/async/964.719c530c.js"
211
+ "__mf/js/async/110.8b9c7f4b.js"
212
212
  ]
213
213
  },
214
214
  "css": {
@@ -246,18 +246,18 @@
246
246
  "js": {
247
247
  "sync": [
248
248
  "__mf/js/async/797.72ff552e.js",
249
- "__mf/js/async/133.c48c8cc8.js",
250
- "__mf/js/async/686.0cd9a75c.js",
249
+ "__mf/js/async/964.e89cbd3b.js",
250
+ "__mf/js/async/186.b17dcce5.js",
251
251
  "__mf/js/async/53.8edfe937.js",
252
252
  "__mf/js/async/613.20f15bb7.js",
253
- "__mf/js/async/__federation_expose_TimeSeriesChart.f20a0aca.js"
253
+ "__mf/js/async/__federation_expose_TimeSeriesChart.f017c9e5.js"
254
254
  ],
255
255
  "async": [
256
256
  "__mf/js/async/224.2d3ce51f.js",
257
257
  "__mf/js/async/238.767e5398.js",
258
258
  "__mf/js/async/292.9efc6a73.js",
259
259
  "__mf/js/async/476.23a59a72.js",
260
- "__mf/js/async/580.5f4b0dbd.js",
260
+ "__mf/js/async/971.6fcf317e.js",
261
261
  "__mf/js/async/lib-router.25a1f509.js",
262
262
  "__mf/js/async/488.031fc875.js"
263
263
  ]
package/mf-stats.json CHANGED
@@ -5,11 +5,11 @@
5
5
  "name": "TimeSeriesChart",
6
6
  "type": "app",
7
7
  "buildInfo": {
8
- "buildVersion": "0.10.0",
8
+ "buildVersion": "0.10.2",
9
9
  "buildName": "@perses-dev/timeseries-chart-plugin"
10
10
  },
11
11
  "remoteEntry": {
12
- "name": "__mf/js/TimeSeriesChart.d3742b3b.js",
12
+ "name": "__mf/js/TimeSeriesChart.2e93229a.js",
13
13
  "path": "",
14
14
  "type": "global"
15
15
  },
@@ -20,7 +20,7 @@
20
20
  "api": ""
21
21
  },
22
22
  "globalName": "TimeSeriesChart",
23
- "pluginVersion": "0.18.1",
23
+ "pluginVersion": "0.19.1",
24
24
  "prefetchInterface": false,
25
25
  "publicPath": "/plugins/TimeSeriesChart/"
26
26
  },
@@ -95,17 +95,17 @@
95
95
  },
96
96
  {
97
97
  "singleton": true,
98
- "requiredVersion": "^0.52.0-beta.5",
98
+ "requiredVersion": "^0.52.0",
99
99
  "shareScope": "default",
100
100
  "name": "@perses-dev/components",
101
- "version": "0.52.0-beta.5",
101
+ "version": "0.52.0",
102
102
  "eager": false,
103
103
  "id": "TimeSeriesChart:@perses-dev/components",
104
104
  "assets": {
105
105
  "js": {
106
106
  "async": [],
107
107
  "sync": [
108
- "__mf/js/async/547.bb4f1e58.js"
108
+ "__mf/js/async/547.a80ef962.js"
109
109
  ]
110
110
  },
111
111
  "css": {
@@ -119,17 +119,17 @@
119
119
  },
120
120
  {
121
121
  "singleton": true,
122
- "requiredVersion": "^0.52.0-beta.5",
122
+ "requiredVersion": "^0.52.0",
123
123
  "shareScope": "default",
124
124
  "name": "@perses-dev/plugin-system",
125
- "version": "0.52.0-beta.5",
125
+ "version": "0.52.0",
126
126
  "eager": false,
127
127
  "id": "TimeSeriesChart:@perses-dev/plugin-system",
128
128
  "assets": {
129
129
  "js": {
130
130
  "async": [],
131
131
  "sync": [
132
- "__mf/js/async/109.bf4f02fe.js"
132
+ "__mf/js/async/109.f05e61af.js"
133
133
  ]
134
134
  },
135
135
  "css": {
@@ -241,7 +241,7 @@
241
241
  "js": {
242
242
  "async": [],
243
243
  "sync": [
244
- "__mf/js/async/964.719c530c.js"
244
+ "__mf/js/async/110.8b9c7f4b.js"
245
245
  ]
246
246
  },
247
247
  "css": {
@@ -295,18 +295,18 @@
295
295
  "js": {
296
296
  "sync": [
297
297
  "__mf/js/async/797.72ff552e.js",
298
- "__mf/js/async/133.c48c8cc8.js",
299
- "__mf/js/async/686.0cd9a75c.js",
298
+ "__mf/js/async/964.e89cbd3b.js",
299
+ "__mf/js/async/186.b17dcce5.js",
300
300
  "__mf/js/async/53.8edfe937.js",
301
301
  "__mf/js/async/613.20f15bb7.js",
302
- "__mf/js/async/__federation_expose_TimeSeriesChart.f20a0aca.js"
302
+ "__mf/js/async/__federation_expose_TimeSeriesChart.f017c9e5.js"
303
303
  ],
304
304
  "async": [
305
305
  "__mf/js/async/224.2d3ce51f.js",
306
306
  "__mf/js/async/238.767e5398.js",
307
307
  "__mf/js/async/292.9efc6a73.js",
308
308
  "__mf/js/async/476.23a59a72.js",
309
- "__mf/js/async/580.5f4b0dbd.js",
309
+ "__mf/js/async/971.6fcf317e.js",
310
310
  "__mf/js/async/lib-router.25a1f509.js",
311
311
  "__mf/js/async/488.031fc875.js"
312
312
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@perses-dev/timeseries-chart-plugin",
3
- "version": "0.10.0",
3
+ "version": "0.10.2",
4
4
  "homepage": "https://github.com/perses/plugins/blob/main/README.md",
5
5
  "repository": {
6
6
  "type": "git",
@@ -30,9 +30,9 @@
30
30
  "@emotion/react": "^11.7.1",
31
31
  "@emotion/styled": "^11.6.0",
32
32
  "@hookform/resolvers": "^3.2.0",
33
- "@perses-dev/components": "^0.52.0-beta.5",
34
- "@perses-dev/core": "^0.52.0-beta.5",
35
- "@perses-dev/plugin-system": "^0.52.0-beta.5",
33
+ "@perses-dev/components": "^0.52.0",
34
+ "@perses-dev/core": "^0.52.0",
35
+ "@perses-dev/plugin-system": "^0.52.0",
36
36
  "date-fns": "^4.1.0",
37
37
  "date-fns-tz": "^3.2.0",
38
38
  "echarts": "5.5.0",
@@ -61,4 +61,4 @@
61
61
  }
62
62
  ]
63
63
  }
64
- }
64
+ }