@reside-ic/skadi-chart 1.1.13-alpha.1 → 1.1.13

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.
@@ -18,7 +18,6 @@ declare module "types" {
18
18
  metadata?: Metadata;
19
19
  bands?: Partial<XY<string>>;
20
20
  };
21
- export type XYLabel = Partial<XY<string>>;
22
21
  export type Bounds = {
23
22
  width: number;
24
23
  height: number;
@@ -149,15 +148,24 @@ declare module "helpers" {
149
148
  start: number;
150
149
  end: number;
151
150
  }>, color: string) => import("d3-selection").Selection<SVGLineElement, Point, null, undefined>;
151
+ export type DebounceConfig = {
152
+ timeout: NodeJS.Timeout | undefined;
153
+ time: number;
154
+ };
155
+ export const debounce: (cfg: DebounceConfig, callback: () => any) => void;
152
156
  }
153
157
  declare module "layers/AxesLayer" {
154
158
  import { LayerType, OptionalLayer } from "layers/Layer";
155
- import { LayerArgs, XY, XYLabel } from "types";
159
+ import { LayerArgs, XY } from "types";
160
+ export type AxisConfig = {
161
+ label?: string;
162
+ labelPosition: number;
163
+ includeZeroLine: boolean;
164
+ };
156
165
  export class AxesLayer extends OptionalLayer {
157
- labels: XYLabel;
158
- labelPositions: XY<number>;
166
+ options: XY<AxisConfig>;
159
167
  type: LayerType;
160
- constructor(labels: XYLabel, labelPositions: XY<number>);
168
+ constructor(options: XY<AxisConfig>);
161
169
  private drawAxis;
162
170
  draw: (layerArgs: LayerArgs) => void;
163
171
  private drawCategoricalAxis;
@@ -278,7 +286,7 @@ declare module "Chart" {
278
286
  import { TracesOptions } from "layers/TracesLayer";
279
287
  import { ZoomOptions } from "layers/ZoomLayer";
280
288
  import { TooltipHtmlCallback } from "layers/TooltipsLayer";
281
- import { AllOptionalLayers, Bounds, LayerArgs, Lines, PartialScales, Scales, ScatterPoints, XY, XYLabel, ClipPathBounds, TickConfig } from "types";
289
+ import { AllOptionalLayers, Bounds, LayerArgs, Lines, PartialScales, Scales, ScatterPoints, XY, ClipPathBounds, TickConfig } from "types";
282
290
  import { LifecycleHooks, OptionalLayer } from "layers/Layer";
283
291
  import { GridOptions } from "layers/GridLayer";
284
292
  export type ChartOptions = {
@@ -312,7 +320,7 @@ declare module "Chart" {
312
320
  options: ChartOptions;
313
321
  autoscaledMaxExtents: Scales;
314
322
  constructor(options?: PartialChartOptions);
315
- addAxes: (labels?: XYLabel, labelPositions?: Partial<XY<number>>) => this;
323
+ addAxes: (labels?: Partial<XY<string>>, labelPositions?: Partial<XY<number>>, includeZeroLine?: Partial<XY<boolean>>) => this;
316
324
  addGridLines: (options?: Partial<XY<Partial<GridOptions>>>) => this;
317
325
  private filterLinesForLogAxis;
318
326
  private filterLines;