@qfo/qfchart 0.7.3 → 0.8.0

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.
package/dist/index.d.ts CHANGED
@@ -105,9 +105,18 @@ interface QFChartOptions {
105
105
  position: 'floating' | 'left' | 'right';
106
106
  triggerOn?: 'mousemove' | 'click' | 'none';
107
107
  };
108
+ grid?: {
109
+ show?: boolean;
110
+ lineColor?: string;
111
+ lineOpacity?: number;
112
+ borderColor?: string;
113
+ borderShow?: boolean;
114
+ };
108
115
  layout?: {
109
- mainPaneHeight: string;
110
- gap: number;
116
+ mainPaneHeight?: string;
117
+ gap?: number;
118
+ left?: string;
119
+ right?: string;
111
120
  };
112
121
  watermark?: boolean;
113
122
  }
@@ -267,6 +276,12 @@ declare class QFChart implements ChartContext {
267
276
  private readonly defaultPadding;
268
277
  private padding;
269
278
  private dataIndexOffset;
279
+ private _paddingPoints;
280
+ private readonly LAZY_MIN_PADDING;
281
+ private readonly LAZY_MAX_PADDING;
282
+ private readonly LAZY_CHUNK_SIZE;
283
+ private readonly LAZY_EDGE_THRESHOLD;
284
+ private _expandScheduled;
270
285
  private rootContainer;
271
286
  private layoutContainer;
272
287
  private toolbarContainer;
@@ -275,6 +290,9 @@ declare class QFChart implements ChartContext {
275
290
  private chartContainer;
276
291
  private overlayContainer;
277
292
  private _lastTables;
293
+ private _tableGraphicIds;
294
+ private _baseGraphics;
295
+ private _labelTooltipEl;
278
296
  private _lastLayout;
279
297
  private _mainHeightOverride;
280
298
  private _paneDragState;
@@ -363,9 +381,38 @@ declare class QFChart implements ChartContext {
363
381
  removeIndicator(id: string): void;
364
382
  toggleIndicator(id: string, action?: 'collapse' | 'maximize' | 'fullscreen'): void;
365
383
  resize(): void;
384
+ /**
385
+ * Build table canvas graphic elements from the current _lastTables.
386
+ * Must be called AFTER setOption so grid rects are available from ECharts.
387
+ * Returns an array of ECharts graphic elements.
388
+ */
389
+ private _buildTableGraphics;
390
+ /**
391
+ * Render table overlays after a non-replacing setOption (updateData, resize).
392
+ * Uses replaceMerge to cleanly replace all graphic elements without disrupting
393
+ * other interactive components (dataZoom, tooltip, etc.).
394
+ */
366
395
  private _renderTableOverlays;
367
396
  destroy(): void;
368
397
  private rebuildTimeIndex;
398
+ /**
399
+ * Expand symmetric padding to the given number of points per side.
400
+ * No-op if newPaddingPoints <= current. Performs a full render() and
401
+ * restores the viewport position so there is no visual jump.
402
+ */
403
+ expandPadding(newPaddingPoints: number): void;
404
+ /**
405
+ * Resize symmetric padding to the given number of points per side.
406
+ * Works for both growing and shrinking. Clamps to [min, max].
407
+ * Uses merge-mode setOption to preserve drag/interaction state.
408
+ */
409
+ private _resizePadding;
410
+ /**
411
+ * Check if user scrolled near an edge (expand) or away from edges (contract).
412
+ * Uses requestAnimationFrame to avoid cascading re-renders inside
413
+ * the ECharts dataZoom event callback.
414
+ */
415
+ private _checkEdgeAndExpand;
369
416
  private render;
370
417
  }
371
418