@axdspub/axiom-charts 0.0.11 → 0.0.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.
@@ -85,6 +85,7 @@ interface IPlot extends IRequestItemProps {
85
85
  data?: IDataResult;
86
86
  axes?: IChartAxes;
87
87
  style?: IPlotStyle;
88
+ scrubbing?: boolean;
88
89
  axisSettings?: IPlotAxisSettings;
89
90
  }
90
91
  interface IPlotImplementationProps extends IPlot {
@@ -96,13 +97,23 @@ type IPlotDataAccessors = {
96
97
  interface IPlotData extends IRequestItemData {
97
98
  accessors: IPlotDataAccessors;
98
99
  }
100
+ interface IPlotScrubPosition {
101
+ xPosition: number;
102
+ yPosition: number;
103
+ xValue: number | Date | string;
104
+ yValue: number;
105
+ }
106
+ type PlotId = string;
107
+ type IPlotScrubPositions = Record<PlotId, IPlotScrubPosition>;
99
108
  interface IPlotImplementation extends IPlotImplementationProps, IRequestItemImplementation {
100
109
  chart: IChartImplementation;
101
110
  draw: () => Promise<void>;
111
+ drawScrubbing: (mouseX: number) => void;
102
112
  destroy: () => void;
103
113
  getDomain: (axis: EChartAxes) => Promise<IChartDimensionDomain>;
104
114
  getYDomain: () => Promise<IChartDimensionDomain>;
105
115
  getAxisSetting: (axis: string) => IPlotAxisSetting;
116
+ getScrubPosition: (mouseX: number) => IPlotScrubPosition | undefined;
106
117
  runtime: any;
107
118
  }
108
119
  interface IPlotImplementationGroup {
@@ -135,6 +146,7 @@ interface IChart {
135
146
  label?: string;
136
147
  description?: string;
137
148
  help?: string;
149
+ onScrub?: (scrubPositions: IPlotScrubPositions) => void;
138
150
  }
139
151
  interface IChartImplementationProps extends IChart {
140
152
  element?: HTMLElement;
@@ -150,6 +162,7 @@ declare class ChartRoot implements IChartImplementation {
150
162
  element?: HTMLElement;
151
163
  settings: IChartSettings;
152
164
  plotImplementations?: IPlotImplementation[];
165
+ onScrub?: (scrubPositions: IPlotScrubPositions) => void;
153
166
  runtime: {
154
167
  prevWidth: number;
155
168
  prevHeight: number;
@@ -183,6 +196,7 @@ declare class ChartRoot implements IChartImplementation {
183
196
  showAxes(xGroup: Record<string, IPlotImplementation[]>, yGroup: Record<string, IPlotImplementation[]>): void;
184
197
  showYAxes(yAxes: IChartAxis[]): void;
185
198
  showXAxes(xAxes: IChartAxis[]): void;
199
+ adjustYAxis(): void;
186
200
  draw(): Promise<void>;
187
201
  destroy(): void;
188
202
  createPlots(): IPlotImplementation[];
@@ -195,4 +209,4 @@ declare class RadialChartRoot extends ChartRoot {
195
209
 
196
210
  declare const AxiomChartComponent: (props: IChart) => ReactElement;
197
211
 
198
- export { AxiomChartComponent as Chart, ChartRoot, EChartAxes, EPlotTypes, IChart, IChartAxes, IChartAxis, IChartDimension, IChartDimensionAccessor, IChartDimensionDomain, IChartDimensionParameter, IChartDimensions, IChartImplementation, IChartImplementationProps, IChartLibrary, IChartScale, IChartSettings, INumericRange, INumericScale, IPlot, IPlotAxisSetting, IPlotAxisSettings, IPlotData, IPlotDataAccessors, IPlotImplementation, IPlotImplementationGroup, IPlotImplementationGroups, IPlotImplementationProps, IPlotStyle, IPlotTypes, RadialChartRoot };
212
+ export { AxiomChartComponent as Chart, ChartRoot, EChartAxes, EPlotTypes, IChart, IChartAxes, IChartAxis, IChartDimension, IChartDimensionAccessor, IChartDimensionDomain, IChartDimensionParameter, IChartDimensions, IChartImplementation, IChartImplementationProps, IChartLibrary, IChartScale, IChartSettings, INumericRange, INumericScale, IPlot, IPlotAxisSetting, IPlotAxisSettings, IPlotData, IPlotDataAccessors, IPlotImplementation, IPlotImplementationGroup, IPlotImplementationGroups, IPlotImplementationProps, IPlotScrubPosition, IPlotScrubPositions, IPlotStyle, IPlotTypes, RadialChartRoot };
@@ -118,6 +118,7 @@ var AxiomCharts = (function (exports, axiomUiDataServices, d3Array, lodash, requ
118
118
  _this.chart = props.chart;
119
119
  _this.dimensions = props.dimensions;
120
120
  _this.style = props.style;
121
+ _this.scrubbing = props.scrubbing;
121
122
  _this.axisSettings = props.axisSettings;
122
123
  _this.runtime = {};
123
124
  return _this;
@@ -244,6 +245,13 @@ var AxiomCharts = (function (exports, axiomUiDataServices, d3Array, lodash, requ
244
245
  });
245
246
  });
246
247
  };
248
+ PlotRoot.prototype.drawScrubbing = function (mouseX) {
249
+ console.log('drawScrubbing not implemented');
250
+ };
251
+ PlotRoot.prototype.getScrubPosition = function (mouseX) {
252
+ console.log('getScrubPosition not implemented');
253
+ return undefined;
254
+ };
247
255
  PlotRoot.prototype.destroy = function () {
248
256
  };
249
257
  return PlotRoot;
@@ -254,6 +262,7 @@ var AxiomCharts = (function (exports, axiomUiDataServices, d3Array, lodash, requ
254
262
  this.plots = props.plots.map(function (p) { return (__assign({}, p)); });
255
263
  this.settings = props.settings;
256
264
  this.element = props.element;
265
+ this.onScrub = props.onScrub;
257
266
  this.runtime = {
258
267
  prevWidth: 0,
259
268
  prevHeight: 0
@@ -488,6 +497,8 @@ var AxiomCharts = (function (exports, axiomUiDataServices, d3Array, lodash, requ
488
497
  };
489
498
  ChartRoot.prototype.showXAxes = function (xAxes) {
490
499
  };
500
+ ChartRoot.prototype.adjustYAxis = function () {
501
+ };
491
502
  ChartRoot.prototype.draw = function () {
492
503
  return __awaiter(this, void 0, void 0, function () {
493
504
  var plotImplementations;