@perses-dev/timeseries-chart-plugin 0.13.0-beta.0 → 0.13.0-beta.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.
- package/__mf/js/TimeSeriesChart.e9912623.js +7 -0
- package/__mf/js/async/291.5ce0f3cb.js +39 -0
- package/__mf/js/async/{721.88bf4be4.js.LICENSE.txt → 291.5ce0f3cb.js.LICENSE.txt} +11 -23
- package/__mf/js/async/568.cdcaf97d.js +1 -0
- package/__mf/js/async/681.8d61b348.js +110 -0
- package/__mf/js/async/681.8d61b348.js.LICENSE.txt +27 -0
- package/__mf/js/async/724.3439df06.js +1 -0
- package/__mf/js/async/821.aa2ab3e8.js +7 -0
- package/__mf/js/async/90.16425d5a.js +24 -0
- package/__mf/js/async/__federation_expose_TimeSeriesChart.58a7f341.js +1 -0
- package/__mf/js/async/lib-router.7a3f7bb4.js +2 -0
- package/__mf/js/async/{lib-router.1934857d.js.LICENSE.txt → lib-router.7a3f7bb4.js.LICENSE.txt} +3 -3
- package/__mf/js/main.de1f5d2f.js +7 -0
- package/lib/QuerySettingsEditor.d.ts.map +1 -1
- package/lib/QuerySettingsEditor.js.map +1 -1
- package/lib/TimeSeriesChartBase.d.ts +2 -2
- package/lib/TimeSeriesChartBase.d.ts.map +1 -1
- package/lib/TimeSeriesChartBase.js +1 -2
- package/lib/TimeSeriesChartBase.js.map +1 -1
- package/lib/TimeSeriesChartPanel.d.ts +1 -1
- package/lib/TimeSeriesChartPanel.d.ts.map +1 -1
- package/lib/TimeSeriesChartPanel.js +2 -3
- package/lib/TimeSeriesChartPanel.js.map +1 -1
- package/lib/cjs/TimeSeriesChartBase.js +3 -4
- package/lib/cjs/TimeSeriesChartPanel.js +4 -5
- package/lib/cjs/utils/data-transform.js +1 -2
- package/lib/test/mock-query-results.d.ts +1 -1
- package/lib/test/mock-query-results.js.map +1 -1
- package/lib/time-series-chart-model.d.ts +2 -1
- package/lib/time-series-chart-model.d.ts.map +1 -1
- package/lib/time-series-chart-model.js.map +1 -1
- package/lib/utils/data-transform.d.ts +2 -2
- package/lib/utils/data-transform.d.ts.map +1 -1
- package/lib/utils/data-transform.js +1 -2
- package/lib/utils/data-transform.js.map +1 -1
- package/mf-manifest.json +16 -17
- package/mf-stats.json +16 -17
- package/package.json +5 -4
- package/__mf/js/TimeSeriesChart.7df900ef.js +0 -7
- package/__mf/js/async/366.084dd32e.js +0 -24
- package/__mf/js/async/377.7ec764e5.js +0 -2
- package/__mf/js/async/377.7ec764e5.js.LICENSE.txt +0 -15
- package/__mf/js/async/558.401fb679.js +0 -1
- package/__mf/js/async/721.88bf4be4.js +0 -110
- package/__mf/js/async/826.c7b150c6.js +0 -7
- package/__mf/js/async/891.18ba0e56.js +0 -38
- package/__mf/js/async/945.1a85358e.js +0 -1
- package/__mf/js/async/__federation_expose_TimeSeriesChart.0329eb0a.js +0 -1
- package/__mf/js/async/lib-router.1934857d.js +0 -2
- package/__mf/js/main.496219f9.js +0 -7
- /package/__mf/css/async/{826.85c2cbf6.css → 821.85c2cbf6.css} +0 -0
- /package/__mf/js/async/{826.c7b150c6.js.LICENSE.txt → 821.aa2ab3e8.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{366.084dd32e.js.LICENSE.txt → 90.16425d5a.js.LICENSE.txt} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { YAXisComponentOption } from 'echarts';
|
|
2
2
|
import { LineSeriesOption } from 'echarts/charts';
|
|
3
|
-
import {
|
|
4
|
-
import { LegacyTimeSeries, EChartsDataFormat, TimeSeriesOption } from '@perses-dev/components';
|
|
3
|
+
import { LegacyTimeSeries, EChartsDataFormat, TimeSeriesOption, StepOptions } from '@perses-dev/components';
|
|
5
4
|
import { useTimeSeriesQueries, PanelData } from '@perses-dev/plugin-system';
|
|
5
|
+
import { TimeScale, TimeSeries, TimeSeriesData } from '@perses-dev/spec';
|
|
6
6
|
import { TimeSeriesChartVisualOptions, TimeSeriesChartYAxisOptions, LineStyleType } from '../time-series-chart-model';
|
|
7
7
|
export type RunningQueriesState = ReturnType<typeof useTimeSeriesQueries>;
|
|
8
8
|
export declare const EMPTY_GRAPH_DATA: EChartsDataFormat;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-transform.d.ts","sourceRoot":"","sources":["../../../src/utils/data-transform.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAmB,MAAM,gBAAgB,CAAC;AACnE,OAAO,
|
|
1
|
+
{"version":3,"file":"data-transform.d.ts","sourceRoot":"","sources":["../../../src/utils/data-transform.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAmB,MAAM,gBAAgB,CAAC;AACnE,OAAO,EAEL,gBAAgB,EAChB,iBAAiB,EAEjB,gBAAgB,EAChB,WAAW,EAEZ,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC5E,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,cAAc,EAAwB,MAAM,kBAAkB,CAAC;AAC/F,OAAO,EAQL,4BAA4B,EAC5B,2BAA2B,EAC3B,aAAa,EACd,MAAM,4BAA4B,CAAC;AAEpC,MAAM,MAAM,mBAAmB,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAE1E,eAAO,MAAM,gBAAgB,EAAE,iBAI9B,CAAC;AAEF,eAAO,MAAM,qBAAqB,KAAK,CAAC;AAExC,eAAO,MAAM,oBAAoB,MAAM,CAAC;AAExC;;;;GAIG;AACH,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,GAAG,SAAS,GAAG,SAAS,CAG7G;AAED;;GAEG;AACH,wBAAgB,aAAa,CAC3B,EAAE,EAAE,MAAM,EACV,YAAY,EAAE,MAAM,EACpB,aAAa,EAAE,MAAM,EACrB,MAAM,EAAE,4BAA4B,EACpC,SAAS,EAAE,SAAS,EACpB,YAAY,EAAE,MAAM,EACpB,aAAa,CAAC,EAAE;IAAE,SAAS,CAAC,EAAE,aAAa,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,EACnE,UAAU,CAAC,EAAE,MAAM,GAClB,gBAAgB,CA2ElB;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,GAAG,gBAAgB,CA2B9G;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,gBAAgB,EAAE,GAAG,UAAU,EAAE,EACvC,GAAG,CAAC,EAAE,MAAM,EACZ,GAAG,CAAC,EAAE,MAAM,GACX,MAAM,CAMR;AA4BD;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,GAAE,2BAAgC,GAAG,oBAAoB,CAgDnG;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAI7C"}
|
|
@@ -10,8 +10,7 @@
|
|
|
10
10
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
11
|
// See the License for the specific language governing permissions and
|
|
12
12
|
// limitations under the License.
|
|
13
|
-
import { getCommonTimeScale } from '@perses-dev/
|
|
14
|
-
import { OPTIMIZED_MODE_SERIES_LIMIT } from '@perses-dev/components';
|
|
13
|
+
import { OPTIMIZED_MODE_SERIES_LIMIT, getCommonTimeScale } from '@perses-dev/components';
|
|
15
14
|
import { DEFAULT_AREA_OPACITY, DEFAULT_CONNECT_NULLS, DEFAULT_LINE_WIDTH, DEFAULT_POINT_RADIUS, DEFAULT_Y_AXIS, POSITIVE_MIN_VALUE_MULTIPLIER, NEGATIVE_MIN_VALUE_MULTIPLIER } from '../time-series-chart-model';
|
|
16
15
|
export const EMPTY_GRAPH_DATA = {
|
|
17
16
|
timeSeries: [],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/utils/data-transform.ts"],"sourcesContent":["// Copyright 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 yAxisIndex?: 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 yAxisIndex: yAxisIndex,\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 yAxisIndex: yAxisIndex,\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 * Handles both linear and logarithmic scales with appropriate min/max calculations.\n */\nexport function convertPanelYAxis(inputAxis: TimeSeriesChartYAxisOptions = {}): YAXisComponentOption {\n // Determine the appropriate min value based on scale type and user input\n let minValue: YAXisComponentOption['min'];\n if (inputAxis.logBase !== undefined) {\n // For logarithmic scales without explicit min:\n // Let ECharts auto-calculate the range based on data to avoid issues with\n // function-based calculations which can result in improper ranges (e.g., 1-10)\n minValue = undefined;\n } else if (inputAxis?.min !== undefined) {\n // User explicitly set a min value - use it for both linear and log scales\n minValue = inputAxis.min;\n } else {\n // For linear scales without explicit min:\n // Use dynamic calculation with padding for better visualization\n // https://echarts.apache.org/en/option.html#yAxis.min\n minValue = (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 // Build the yAxis configuration\n const yAxis: YAXisComponentOption = {\n show: inputAxis?.show ?? DEFAULT_Y_AXIS.show,\n min: minValue,\n max: inputAxis?.max,\n };\n\n // Apply logarithmic scale settings if requested\n if (inputAxis.logBase !== undefined) {\n return {\n ...yAxis,\n type: 'log',\n logBase: inputAxis.logBase,\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","yAxisIndex","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","minValue","logBase","roundDown","yAxis","num","magnitude","Math","floor","log10","abs","firstDigit","pow"],"mappings":"AAAA,+BAA+B;AAC/B,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,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AG,GAAG/D;YAC/B;QACF;IACF;IAEA,gCAAgC;IAChC,MAAMgF,QAA8B;QAClC7C,MAAMyC,WAAWzC,QAAQrC,eAAeqC,IAAI;QAC5C4B,KAAKc;QACLf,KAAKc,WAAWd;IAClB;IAEA,gDAAgD;IAChD,IAAIc,UAAUE,OAAO,KAAK7C,WAAW;QACnC,OAAO;YACL,GAAG+C,KAAK;YACRnD,MAAM;YACNiD,SAASF,UAAUE,OAAO;QAC5B;IACF;IAEA,OAAOE;AACT;AAEA;;;;;;;CAOC,GACD,OAAO,SAASD,UAAUE,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 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 OPTIMIZED_MODE_SERIES_LIMIT,\n LegacyTimeSeries,\n EChartsDataFormat,\n EChartsValues,\n TimeSeriesOption,\n StepOptions,\n getCommonTimeScale,\n} from '@perses-dev/components';\nimport { useTimeSeriesQueries, PanelData } from '@perses-dev/plugin-system';\nimport { TimeScale, TimeSeries, TimeSeriesData, TimeSeriesValueTuple } from '@perses-dev/spec';\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 yAxisIndex?: 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 yAxisIndex: yAxisIndex,\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 yAxisIndex: yAxisIndex,\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 * Handles both linear and logarithmic scales with appropriate min/max calculations.\n */\nexport function convertPanelYAxis(inputAxis: TimeSeriesChartYAxisOptions = {}): YAXisComponentOption {\n // Determine the appropriate min value based on scale type and user input\n let minValue: YAXisComponentOption['min'];\n if (inputAxis.logBase !== undefined) {\n // For logarithmic scales without explicit min:\n // Let ECharts auto-calculate the range based on data to avoid issues with\n // function-based calculations which can result in improper ranges (e.g., 1-10)\n minValue = undefined;\n } else if (inputAxis?.min !== undefined) {\n // User explicitly set a min value - use it for both linear and log scales\n minValue = inputAxis.min;\n } else {\n // For linear scales without explicit min:\n // Use dynamic calculation with padding for better visualization\n // https://echarts.apache.org/en/option.html#yAxis.min\n minValue = (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 // Build the yAxis configuration\n const yAxis: YAXisComponentOption = {\n show: inputAxis?.show ?? DEFAULT_Y_AXIS.show,\n min: minValue,\n max: inputAxis?.max,\n };\n\n // Apply logarithmic scale settings if requested\n if (inputAxis.logBase !== undefined) {\n return {\n ...yAxis,\n type: 'log',\n logBase: inputAxis.logBase,\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":["OPTIMIZED_MODE_SERIES_LIMIT","getCommonTimeScale","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","yAxisIndex","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","minValue","logBase","roundDown","yAxis","num","magnitude","Math","floor","log10","abs","firstDigit","pow"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAIjC,SACEA,2BAA2B,EAM3BC,kBAAkB,QACb,yBAAyB;AAGhC,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,OAAOnB,mBAAmBgB;AAC5B;AAEA;;CAEC,GACD,OAAO,SAASI,cACdC,EAAU,EACVC,YAAoB,EACpBC,aAAqB,EACrBC,MAAoC,EACpCC,SAAoB,EACpBC,YAAoB,EACpBC,aAAmE,EACnEC,UAAmB;IAEnB,MAAMC,YAAYL,OAAOK,SAAS,IAAI1B;IACtC,MAAM2B,cAAcN,OAAOM,WAAW,IAAI1B;IAE1C,iFAAiF;IACjF,MAAM2B,WAAW;IACjB,IAAIC,aAAaP,UAAUQ,OAAO,IAAIF,WAAW;IACjD,kGAAkG;IAClG,IAAIP,OAAOQ,UAAU,KAAK,UAAU;QAClCA,aAAa;IACf;IAEA,IAAIR,OAAOU,OAAO,KAAK,OAAO;QAC5B,MAAMC,SAA0B;YAC9BC,MAAM;YACNf,IAAIA;YAC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WAAWb,QAAQ9B,WAAW;QACvC,0EAA0E;QAC1E4C,WAAWD,UAAUb,GAAG;IAC1B,OAAO;QACL,0CAA0C;QAC1C,gEAAgE;QAChE,sDAAsD;QACtDc,WAAW,CAACH;YACV,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,GAAGhE;YAC/B,OAAO;gBACL,OAAOgF,UAAUL,MAAMX,GAAG,GAAG/D;YAC/B;QACF;IACF;IAEA,gCAAgC;IAChC,MAAMgF,QAA8B;QAClC7C,MAAMyC,WAAWzC,QAAQrC,eAAeqC,IAAI;QAC5C4B,KAAKc;QACLf,KAAKc,WAAWd;IAClB;IAEA,gDAAgD;IAChD,IAAIc,UAAUE,OAAO,KAAK7C,WAAW;QACnC,OAAO;YACL,GAAG+C,KAAK;YACRnD,MAAM;YACNiD,SAASF,UAAUE,OAAO;QAC5B;IACF;IAEA,OAAOE;AACT;AAEA;;;;;;;CAOC,GACD,OAAO,SAASD,UAAUE,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"}
|
package/mf-manifest.json
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
"name": "TimeSeriesChart",
|
|
6
6
|
"type": "app",
|
|
7
7
|
"buildInfo": {
|
|
8
|
-
"buildVersion": "0.13.0-beta.
|
|
8
|
+
"buildVersion": "0.13.0-beta.2",
|
|
9
9
|
"buildName": "@perses-dev/timeseries-chart-plugin"
|
|
10
10
|
},
|
|
11
11
|
"remoteEntry": {
|
|
12
|
-
"name": "__mf/js/TimeSeriesChart.
|
|
12
|
+
"name": "__mf/js/TimeSeriesChart.e9912623.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": "2.
|
|
23
|
+
"pluginVersion": "2.5.1",
|
|
24
24
|
"getPublicPath": "function() { const prefix = window.PERSES_PLUGIN_ASSETS_PATH || window.PERSES_APP_CONFIG?.api_prefix || \"\"; return prefix + \"/plugins/TimeSeriesChart/\"; }"
|
|
25
25
|
},
|
|
26
26
|
"shared": [
|
|
@@ -89,20 +89,20 @@
|
|
|
89
89
|
{
|
|
90
90
|
"id": "TimeSeriesChart:@perses-dev/components",
|
|
91
91
|
"name": "@perses-dev/components",
|
|
92
|
-
"version": "0.54.0-beta.
|
|
92
|
+
"version": "0.54.0-beta.8",
|
|
93
93
|
"singleton": true,
|
|
94
|
-
"requiredVersion": "^0.54.0-beta.
|
|
94
|
+
"requiredVersion": "^0.54.0-beta.8",
|
|
95
95
|
"assets": {
|
|
96
96
|
"js": {
|
|
97
97
|
"async": [],
|
|
98
98
|
"sync": [
|
|
99
|
-
"__mf/js/async/
|
|
99
|
+
"__mf/js/async/821.aa2ab3e8.js"
|
|
100
100
|
]
|
|
101
101
|
},
|
|
102
102
|
"css": {
|
|
103
103
|
"async": [],
|
|
104
104
|
"sync": [
|
|
105
|
-
"__mf/css/async/
|
|
105
|
+
"__mf/css/async/821.85c2cbf6.css"
|
|
106
106
|
]
|
|
107
107
|
}
|
|
108
108
|
},
|
|
@@ -111,14 +111,14 @@
|
|
|
111
111
|
{
|
|
112
112
|
"id": "TimeSeriesChart:@perses-dev/plugin-system",
|
|
113
113
|
"name": "@perses-dev/plugin-system",
|
|
114
|
-
"version": "0.54.0-beta.
|
|
114
|
+
"version": "0.54.0-beta.8",
|
|
115
115
|
"singleton": true,
|
|
116
|
-
"requiredVersion": "^0.54.0-beta.
|
|
116
|
+
"requiredVersion": "^0.54.0-beta.8",
|
|
117
117
|
"assets": {
|
|
118
118
|
"js": {
|
|
119
119
|
"async": [],
|
|
120
120
|
"sync": [
|
|
121
|
-
"__mf/js/async/
|
|
121
|
+
"__mf/js/async/90.16425d5a.js"
|
|
122
122
|
]
|
|
123
123
|
},
|
|
124
124
|
"css": {
|
|
@@ -258,26 +258,25 @@
|
|
|
258
258
|
"js": {
|
|
259
259
|
"sync": [
|
|
260
260
|
"__mf/js/async/702.de247ad8.js",
|
|
261
|
-
"__mf/js/async/
|
|
261
|
+
"__mf/js/async/681.8d61b348.js",
|
|
262
262
|
"__mf/js/async/78.91de282a.js",
|
|
263
|
-
"__mf/js/async/
|
|
264
|
-
"__mf/js/async/
|
|
265
|
-
"__mf/js/async/__federation_expose_TimeSeriesChart.0329eb0a.js"
|
|
263
|
+
"__mf/js/async/724.3439df06.js",
|
|
264
|
+
"__mf/js/async/__federation_expose_TimeSeriesChart.58a7f341.js"
|
|
266
265
|
],
|
|
267
266
|
"async": [
|
|
268
267
|
"__mf/js/async/588.6662e16a.js",
|
|
269
268
|
"__mf/js/async/356.9f551c8a.js",
|
|
270
269
|
"__mf/js/async/71.84e486c9.js",
|
|
271
|
-
"__mf/js/async/
|
|
270
|
+
"__mf/js/async/291.5ce0f3cb.js",
|
|
272
271
|
"__mf/js/async/491.6f81cf51.js",
|
|
273
|
-
"__mf/js/async/lib-router.
|
|
272
|
+
"__mf/js/async/lib-router.7a3f7bb4.js",
|
|
274
273
|
"__mf/js/async/177.56f1be10.js"
|
|
275
274
|
]
|
|
276
275
|
},
|
|
277
276
|
"css": {
|
|
278
277
|
"sync": [],
|
|
279
278
|
"async": [
|
|
280
|
-
"__mf/css/async/
|
|
279
|
+
"__mf/css/async/821.85c2cbf6.css"
|
|
281
280
|
]
|
|
282
281
|
}
|
|
283
282
|
},
|
package/mf-stats.json
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
"name": "TimeSeriesChart",
|
|
6
6
|
"type": "app",
|
|
7
7
|
"buildInfo": {
|
|
8
|
-
"buildVersion": "0.13.0-beta.
|
|
8
|
+
"buildVersion": "0.13.0-beta.2",
|
|
9
9
|
"buildName": "@perses-dev/timeseries-chart-plugin"
|
|
10
10
|
},
|
|
11
11
|
"remoteEntry": {
|
|
12
|
-
"name": "__mf/js/TimeSeriesChart.
|
|
12
|
+
"name": "__mf/js/TimeSeriesChart.e9912623.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": "2.
|
|
23
|
+
"pluginVersion": "2.5.1",
|
|
24
24
|
"getPublicPath": "function() { const prefix = window.PERSES_PLUGIN_ASSETS_PATH || window.PERSES_APP_CONFIG?.api_prefix || \"\"; return prefix + \"/plugins/TimeSeriesChart/\"; }"
|
|
25
25
|
},
|
|
26
26
|
"shared": [
|
|
@@ -100,23 +100,23 @@
|
|
|
100
100
|
},
|
|
101
101
|
{
|
|
102
102
|
"singleton": true,
|
|
103
|
-
"requiredVersion": "^0.54.0-beta.
|
|
103
|
+
"requiredVersion": "^0.54.0-beta.8",
|
|
104
104
|
"shareScope": "default",
|
|
105
105
|
"name": "@perses-dev/components",
|
|
106
|
-
"version": "0.54.0-beta.
|
|
106
|
+
"version": "0.54.0-beta.8",
|
|
107
107
|
"eager": false,
|
|
108
108
|
"id": "TimeSeriesChart:@perses-dev/components",
|
|
109
109
|
"assets": {
|
|
110
110
|
"js": {
|
|
111
111
|
"async": [],
|
|
112
112
|
"sync": [
|
|
113
|
-
"__mf/js/async/
|
|
113
|
+
"__mf/js/async/821.aa2ab3e8.js"
|
|
114
114
|
]
|
|
115
115
|
},
|
|
116
116
|
"css": {
|
|
117
117
|
"async": [],
|
|
118
118
|
"sync": [
|
|
119
|
-
"__mf/css/async/
|
|
119
|
+
"__mf/css/async/821.85c2cbf6.css"
|
|
120
120
|
]
|
|
121
121
|
}
|
|
122
122
|
},
|
|
@@ -128,17 +128,17 @@
|
|
|
128
128
|
},
|
|
129
129
|
{
|
|
130
130
|
"singleton": true,
|
|
131
|
-
"requiredVersion": "^0.54.0-beta.
|
|
131
|
+
"requiredVersion": "^0.54.0-beta.8",
|
|
132
132
|
"shareScope": "default",
|
|
133
133
|
"name": "@perses-dev/plugin-system",
|
|
134
|
-
"version": "0.54.0-beta.
|
|
134
|
+
"version": "0.54.0-beta.8",
|
|
135
135
|
"eager": false,
|
|
136
136
|
"id": "TimeSeriesChart:@perses-dev/plugin-system",
|
|
137
137
|
"assets": {
|
|
138
138
|
"js": {
|
|
139
139
|
"async": [],
|
|
140
140
|
"sync": [
|
|
141
|
-
"__mf/js/async/
|
|
141
|
+
"__mf/js/async/90.16425d5a.js"
|
|
142
142
|
]
|
|
143
143
|
},
|
|
144
144
|
"css": {
|
|
@@ -315,26 +315,25 @@
|
|
|
315
315
|
"js": {
|
|
316
316
|
"sync": [
|
|
317
317
|
"__mf/js/async/702.de247ad8.js",
|
|
318
|
-
"__mf/js/async/
|
|
318
|
+
"__mf/js/async/681.8d61b348.js",
|
|
319
319
|
"__mf/js/async/78.91de282a.js",
|
|
320
|
-
"__mf/js/async/
|
|
321
|
-
"__mf/js/async/
|
|
322
|
-
"__mf/js/async/__federation_expose_TimeSeriesChart.0329eb0a.js"
|
|
320
|
+
"__mf/js/async/724.3439df06.js",
|
|
321
|
+
"__mf/js/async/__federation_expose_TimeSeriesChart.58a7f341.js"
|
|
323
322
|
],
|
|
324
323
|
"async": [
|
|
325
324
|
"__mf/js/async/588.6662e16a.js",
|
|
326
325
|
"__mf/js/async/356.9f551c8a.js",
|
|
327
326
|
"__mf/js/async/71.84e486c9.js",
|
|
328
|
-
"__mf/js/async/
|
|
327
|
+
"__mf/js/async/291.5ce0f3cb.js",
|
|
329
328
|
"__mf/js/async/491.6f81cf51.js",
|
|
330
|
-
"__mf/js/async/lib-router.
|
|
329
|
+
"__mf/js/async/lib-router.7a3f7bb4.js",
|
|
331
330
|
"__mf/js/async/177.56f1be10.js"
|
|
332
331
|
]
|
|
333
332
|
},
|
|
334
333
|
"css": {
|
|
335
334
|
"sync": [],
|
|
336
335
|
"async": [
|
|
337
|
-
"__mf/css/async/
|
|
336
|
+
"__mf/css/async/821.85c2cbf6.css"
|
|
338
337
|
]
|
|
339
338
|
}
|
|
340
339
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@perses-dev/timeseries-chart-plugin",
|
|
3
|
-
"version": "0.13.0-beta.
|
|
3
|
+
"version": "0.13.0-beta.2",
|
|
4
|
+
"license": "Apache-2.0",
|
|
4
5
|
"homepage": "https://github.com/perses/plugins/blob/main/README.md",
|
|
5
6
|
"repository": {
|
|
6
7
|
"type": "git",
|
|
@@ -30,9 +31,9 @@
|
|
|
30
31
|
"@emotion/react": "^11.7.1",
|
|
31
32
|
"@emotion/styled": "^11.6.0",
|
|
32
33
|
"@hookform/resolvers": "^3.2.0",
|
|
33
|
-
"@perses-dev/components": "^0.54.0-beta.
|
|
34
|
-
"@perses-dev/
|
|
35
|
-
"@perses-dev/
|
|
34
|
+
"@perses-dev/components": "^0.54.0-beta.8",
|
|
35
|
+
"@perses-dev/plugin-system": "^0.54.0-beta.8",
|
|
36
|
+
"@perses-dev/spec": "^0.2.0-beta.6",
|
|
36
37
|
"date-fns": "^4.1.0",
|
|
37
38
|
"date-fns-tz": "^3.2.0",
|
|
38
39
|
"echarts": "5.5.0",
|