mirror of
https://github.com/grafana/grafana.git
synced 2026-09-05 04:40:13 -05:00
GraphNG: uPlot 1.6.22 (#51945)
This commit is contained in:
+4
-5
@@ -9699,11 +9699,10 @@ exports[`better eslint`] = {
|
|||||||
"public/app/plugins/panel/histogram/Histogram.tsx:5381": [
|
"public/app/plugins/panel/histogram/Histogram.tsx:5381": [
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
||||||
[0, 0, 0, "Do not use any type assertions.", "1"],
|
[0, 0, 0, "Do not use any type assertions.", "1"],
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "2"],
|
[0, 0, 0, "Do not use any type assertions.", "2"],
|
||||||
[0, 0, 0, "Do not use any type assertions.", "3"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "3"],
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "4"],
|
[0, 0, 0, "Do not use any type assertions.", "4"],
|
||||||
[0, 0, 0, "Do not use any type assertions.", "5"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "5"]
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "6"]
|
|
||||||
],
|
],
|
||||||
"public/app/plugins/panel/icon/IconPanel.tsx:5381": [
|
"public/app/plugins/panel/icon/IconPanel.tsx:5381": [
|
||||||
[0, 0, 0, "Do not use any type assertions.", "0"],
|
[0, 0, 0, "Do not use any type assertions.", "0"],
|
||||||
|
|||||||
+1
-1
@@ -391,7 +391,7 @@
|
|||||||
"tether-drop": "https://github.com/torkelo/drop",
|
"tether-drop": "https://github.com/torkelo/drop",
|
||||||
"tinycolor2": "1.4.2",
|
"tinycolor2": "1.4.2",
|
||||||
"tslib": "2.4.0",
|
"tslib": "2.4.0",
|
||||||
"uplot": "1.6.21",
|
"uplot": "1.6.22",
|
||||||
"uuid": "8.3.2",
|
"uuid": "8.3.2",
|
||||||
"vendor": "link:./public/vendor",
|
"vendor": "link:./public/vendor",
|
||||||
"visjs-network": "4.25.0",
|
"visjs-network": "4.25.0",
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
"regenerator-runtime": "0.13.9",
|
"regenerator-runtime": "0.13.9",
|
||||||
"rxjs": "7.5.5",
|
"rxjs": "7.5.5",
|
||||||
"tslib": "2.4.0",
|
"tslib": "2.4.0",
|
||||||
"uplot": "1.6.21",
|
"uplot": "1.6.22",
|
||||||
"xss": "1.0.11"
|
"xss": "1.0.11"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -241,10 +241,9 @@ export type TypedArray =
|
|||||||
| Float32Array
|
| Float32Array
|
||||||
| Float64Array;
|
| Float64Array;
|
||||||
|
|
||||||
export type AlignedData = [
|
export type AlignedData =
|
||||||
xValues: number[] | TypedArray,
|
| TypedArray[]
|
||||||
...yValues: Array<Array<number | null | undefined> | TypedArray>
|
| [xValues: number[] | TypedArray, ...yValues: Array<Array<number | null | undefined> | TypedArray>];
|
||||||
];
|
|
||||||
|
|
||||||
// nullModes
|
// nullModes
|
||||||
const NULL_REMOVE = 0; // nulls are converted to undefined (e.g. for spanGaps: true)
|
const NULL_REMOVE = 0; // nulls are converted to undefined (e.g. for spanGaps: true)
|
||||||
|
|||||||
@@ -91,7 +91,7 @@
|
|||||||
"slate-plain-serializer": "0.7.10",
|
"slate-plain-serializer": "0.7.10",
|
||||||
"tinycolor2": "1.4.2",
|
"tinycolor2": "1.4.2",
|
||||||
"tslib": "2.4.0",
|
"tslib": "2.4.0",
|
||||||
"uplot": "1.6.21",
|
"uplot": "1.6.22",
|
||||||
"uuid": "8.3.2"
|
"uuid": "8.3.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -102,14 +102,6 @@ export class UPlotChart extends React.Component<PlotProps, UPlotChartState> {
|
|||||||
this.reinitPlot();
|
this.reinitPlot();
|
||||||
} else if (!sameData(prevProps, this.props)) {
|
} else if (!sameData(prevProps, this.props)) {
|
||||||
plot?.setData(this.props.data as AlignedData);
|
plot?.setData(this.props.data as AlignedData);
|
||||||
|
|
||||||
// this is a uPlot cache-busting hack for bar charts in case x axis labels changed
|
|
||||||
// since the x scale's "range" doesnt change, the axis size doesnt get recomputed, which is where the tick labels are regenerated & cached
|
|
||||||
// the more expensive, more proper/thorough way to do this is to force all axes to recalc: plot?.redraw(false, true);
|
|
||||||
if (plot && typeof this.props.data[0]?.[0] === 'string') {
|
|
||||||
//@ts-ignore
|
|
||||||
plot.axes[0]._values = this.props.data[0];
|
|
||||||
}
|
|
||||||
} else if (!sameTimeRange(prevProps, this.props)) {
|
} else if (!sameTimeRange(prevProps, this.props)) {
|
||||||
plot?.setScale('x', {
|
plot?.setScale('x', {
|
||||||
min: this.props.timeRange.from.valueOf(),
|
min: this.props.timeRange.from.valueOf(),
|
||||||
|
|||||||
@@ -221,7 +221,7 @@ const prepConfig = (frame: DataFrame, theme: GrafanaTheme2) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const preparePlotData = (frame: DataFrame) => {
|
const preparePlotData = (frame: DataFrame) => {
|
||||||
let data: AlignedData = [] as any;
|
let data = [];
|
||||||
|
|
||||||
for (const field of frame.fields) {
|
for (const field of frame.fields) {
|
||||||
if (field.name !== histogramFrameBucketMaxFieldName) {
|
if (field.name !== histogramFrameBucketMaxFieldName) {
|
||||||
@@ -240,7 +240,7 @@ const preparePlotData = (frame: DataFrame) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return data;
|
return data as AlignedData;
|
||||||
};
|
};
|
||||||
|
|
||||||
interface State {
|
interface State {
|
||||||
|
|||||||
@@ -4698,7 +4698,7 @@ __metadata:
|
|||||||
tinycolor2: 1.4.2
|
tinycolor2: 1.4.2
|
||||||
tslib: 2.4.0
|
tslib: 2.4.0
|
||||||
typescript: 4.6.4
|
typescript: 4.6.4
|
||||||
uplot: 1.6.21
|
uplot: 1.6.22
|
||||||
xss: 1.0.11
|
xss: 1.0.11
|
||||||
languageName: unknown
|
languageName: unknown
|
||||||
linkType: soft
|
linkType: soft
|
||||||
@@ -5146,7 +5146,7 @@ __metadata:
|
|||||||
ts-loader: 8.0.11
|
ts-loader: 8.0.11
|
||||||
tslib: 2.4.0
|
tslib: 2.4.0
|
||||||
typescript: 4.6.4
|
typescript: 4.6.4
|
||||||
uplot: 1.6.21
|
uplot: 1.6.22
|
||||||
uuid: 8.3.2
|
uuid: 8.3.2
|
||||||
webpack: 5.73.0
|
webpack: 5.73.0
|
||||||
webpack-filter-warnings-plugin: 1.2.1
|
webpack-filter-warnings-plugin: 1.2.1
|
||||||
@@ -21231,7 +21231,7 @@ __metadata:
|
|||||||
ts-node: 10.8.1
|
ts-node: 10.8.1
|
||||||
tslib: 2.4.0
|
tslib: 2.4.0
|
||||||
typescript: 4.6.4
|
typescript: 4.6.4
|
||||||
uplot: 1.6.21
|
uplot: 1.6.22
|
||||||
uuid: 8.3.2
|
uuid: 8.3.2
|
||||||
vendor: "link:./public/vendor"
|
vendor: "link:./public/vendor"
|
||||||
visjs-network: 4.25.0
|
visjs-network: 4.25.0
|
||||||
@@ -36037,10 +36037,10 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"uplot@npm:1.6.21":
|
"uplot@npm:1.6.22":
|
||||||
version: 1.6.21
|
version: 1.6.22
|
||||||
resolution: "uplot@npm:1.6.21"
|
resolution: "uplot@npm:1.6.22"
|
||||||
checksum: 38aa8c899f5010ce6a340db2717ef14e50e49a227a64be225ecba5a5d64bbda4d84a29a6a93ce77aa19a68f0631beaab8ba9ed6a456f11ce65160a6757b5b384
|
checksum: 4a73835b93fcbd0f62d99c062aac75d0d9d2e3f383fcc77b022abbecd936cd989188ed60da756e45d4306353c6d0e38baaac73b372a674d9e2f47bff7f7d11a6
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user