GraphNG: uPlot 1.6.13 (#35844) (#35902)

(cherry picked from commit 9eac9aefde)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
This commit is contained in:
Grot (@grafanabot) 2021-06-17 14:46:18 -04:00 committed by GitHub
parent 2b0291f997
commit 2745265f99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 21 additions and 6 deletions

View File

@ -72,7 +72,7 @@
"react-transition-group": "4.4.1",
"slate": "0.47.8",
"tinycolor2": "1.4.1",
"uplot": "1.6.12"
"uplot": "1.6.13"
},
"devDependencies": {
"@rollup/plugin-commonjs": "16.0.0",

View File

@ -64,7 +64,7 @@ export class UPlotScaleBuilder extends PlotConfigBuilder<ScaleProps, Scale> {
const rangeFn = (u: uPlot, dataMin: number, dataMax: number, scaleKey: string) => {
const scale = u.scales[scaleKey];
let minMax = [dataMin, dataMax];
let minMax: uPlot.Range.MinMax = [dataMin, dataMax];
if (scale.distr === 1 || scale.distr === 2) {
// @ts-ignore here we may use hardMin / hardMax to make sure any extra padding is computed from a more accurate delta

View File

@ -6,6 +6,21 @@ import 'mutationobserver-shim';
const global = window as any;
global.$ = global.jQuery = $;
// https://jestjs.io/docs/manual-mocks#mocking-methods-which-are-not-implemented-in-jsdom
Object.defineProperty(global, 'matchMedia', {
writable: true,
value: jest.fn().mockImplementation((query) => ({
matches: false,
media: query,
onchange: null,
addListener: jest.fn(), // deprecated
removeListener: jest.fn(), // deprecated
addEventListener: jest.fn(),
removeEventListener: jest.fn(),
dispatchEvent: jest.fn(),
})),
});
import '../vendor/flot/jquery.flot';
import '../vendor/flot/jquery.flot.time';
import angular from 'angular';

View File

@ -22043,10 +22043,10 @@ update-notifier@^2.5.0:
semver-diff "^2.0.0"
xdg-basedir "^3.0.0"
uplot@1.6.12:
version "1.6.12"
resolved "https://registry.yarnpkg.com/uplot/-/uplot-1.6.12.tgz#a2741f224c3d3b4f4f25a53797c1687ddfef2989"
integrity sha512-afBjwy/9SM0E7w29Gen+wQ+UAe6ipiA2zE/s1dMCidMXQYvYkCpEgxLRkVA179/8eRJz+og2r7ZFS1HIzT75fQ==
uplot@1.6.13:
version "1.6.13"
resolved "https://registry.yarnpkg.com/uplot/-/uplot-1.6.13.tgz#21608f484792a837e7ff4610428881c1e2f2387f"
integrity sha512-O5NHrZwetCUMUrYMN2/OG6v0poPXtlb68XBCERHqvvePFJvFPIuJI/SxdyZOygKzh0pAjMTX0xz3S0msAsPX0w==
upper-case@^1.1.1:
version "1.1.3"