@rfkit/charts 1.0.93 → 1.0.95

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.
@@ -1,36 +1,47 @@
1
+ import { Series } from '../../engine';
1
2
  import type { SeriesConfig } from '../../types';
2
- export declare const passThroughSeries: (globalID: string, series?: any) => any;
3
+ export declare const passThroughSeries: (globalID: string, series?: Record<string, SeriesConfig>) => any;
4
+ interface SpectrumState {
5
+ chart: Series | null;
6
+ autoranging: boolean;
7
+ prevAutoRangeTime: number;
8
+ id: string;
9
+ renderRange: [number, number];
10
+ interval: number;
11
+ series: Record<string, SeriesConfig>;
12
+ globalID: string;
13
+ }
3
14
  export default class Spectrum {
4
- [x: string]: any;
5
- constructor(props: any);
15
+ state: SpectrumState;
16
+ useRangeAutoFocus: () => void;
17
+ firstRenderAutoFocus: boolean;
18
+ constructor(props: Record<string, unknown>);
6
19
  init(): void;
7
20
  /**
8
21
  * 更新数据
9
22
  * TODO:可以自定义线
10
23
  */
11
- updateSeries(d: {
12
- [x: string]: any;
13
- [x: number]: any;
14
- }, extraData?: Map<string, {
24
+ updateSeries(d: Record<string | number, Float32Array>, extraData?: Map<string, {
15
25
  outputData: Float32Array;
16
26
  originalData: Float32Array;
17
27
  }>): void;
18
28
  updateMainSeries(data: {
19
- length: any;
20
- at: (arg0: number) => undefined;
29
+ length: number;
30
+ at: (arg0: number) => number | undefined;
21
31
  }): void;
22
32
  /**
23
33
  * 更新参数
24
34
  */
25
- updateParams(params: any): void;
35
+ updateParams(params: Record<string, unknown>): void;
26
36
  /**
27
37
  * 设置线信息
28
38
  */
29
39
  setSeries(config: SeriesConfig): void;
30
40
  setDisabledClearRect(disabledClearRect: boolean): void;
31
- setRange(renderRange?: any): void;
41
+ setRange(renderRange?: [number, number]): void;
32
42
  zoom(): void;
33
43
  reset(): void;
34
44
  resize(): void;
35
45
  clear(): void;
36
46
  }
47
+ export {};
package/package.json CHANGED
@@ -5,6 +5,6 @@
5
5
  "types": "index.d.ts",
6
6
  "author": "Hxgh",
7
7
  "license": "MIT",
8
- "version": "1.0.93",
8
+ "version": "1.0.95",
9
9
  "private": false
10
10
  }
@@ -48,6 +48,7 @@ export interface PublishSpectrum {
48
48
  data?: Float32Array;
49
49
  maxData?: Float32Array;
50
50
  extraData?: SpectrumExtraData;
51
+ template?: Float32Array;
51
52
  timestamp?: number;
52
53
  offset?: number;
53
54
  segmentOffset?: number;