tsichart-core 2.0.0-beta.7 → 2.0.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
@@ -409,6 +409,40 @@ declare class LineChartData extends ChartComponentData {
409
409
  mergeDataToDisplayStateAndTimeArrays(data: any, aggregateExpressionOptions?: any): void;
410
410
  }
411
411
 
412
+ /**
413
+ * Configuration options for the LineChart component.
414
+ *
415
+ * Provides type safety for LineChart-specific configuration with all properties being optional.
416
+ * Based on ChartOptions class, allowing partial configuration where defaults are applied internally.
417
+ *
418
+ * @remarks
419
+ * This type includes all properties from ChartOptions as optional fields:
420
+ * - **Appearance**: theme, color, legend, tooltip, grid, isArea, interpolationFunction
421
+ * - **Axis Configuration**: xAxisHidden, yAxisHidden, yAxisState, yExtent, aggTopMargin
422
+ * - **Brush Settings**: brushMoveAction, brushMoveEndAction, brushContextMenuActions, brushHandlesVisible,
423
+ * brushRangeVisible, snapBrush, minBrushWidth, keepBrush, brushClearable, autoTriggerBrushContextMenu
424
+ * - **Interaction**: focusHidden, onMouseover, onMouseout, onSticky, onUnsticky, shouldSticky
425
+ * - **Markers**: markers, onMarkersChange, labelSeriesWithMarker
426
+ * - **Swim Lanes**: swimLaneOptions (for stacked charts with multiple y-axes)
427
+ * - **Time Configuration**: timeFrame, offset, is24HourTime, dateLocale, xAxisTimeFormat
428
+ * - **UI Controls**: hideChartControlPanel, suppressResizeListener
429
+ * - **Data Display**: includeEnvelope, includeDots
430
+ * - **Styling**: strings (for i18n), noAnimate
431
+ *
432
+ * @example
433
+ * ```typescript
434
+ * const lineChartOptions: ILineChartOptions = {
435
+ * theme: 'dark',
436
+ * legend: 'shown',
437
+ * yAxisState: 'stacked',
438
+ * brushHandlesVisible: true,
439
+ * interpolationFunction: 'curveMonotoneX',
440
+ * labelSeriesWithMarker: true
441
+ * };
442
+ * ```
443
+ */
444
+ type ILineChartOptions = Partial<Omit<ChartOptions, 'onSelect' | 'onInput' | 'onKeydown' | 'onInstanceClick' | 'hierarchyOptions' | 'withContextMenu' | 'timeSeriesIdProperties' | 'isTemporal' | 'spMeasures' | 'scatterPlotRadius' | 'spAxisLabels'>>;
445
+
412
446
  declare class LineChart extends TemporalXAxisComponent {
413
447
  private targetElement;
414
448
  private focus;
@@ -547,7 +581,7 @@ declare class LineChart extends TemporalXAxisComponent {
547
581
  private getAdditionalOffsetFromHorizontalMargin;
548
582
  private drawHorizontalMarkers;
549
583
  private createSwimlaneLabels;
550
- render(data: any, options: any, aggregateExpressionOptions: any): void;
584
+ render(data: any, options: ILineChartOptions, aggregateExpressionOptions: any): void;
551
585
  private createPlot;
552
586
  }
553
587
 
@@ -1684,8 +1718,28 @@ declare class Utils {
1684
1718
  static offsetToUTC(date: Date, offset?: number): Date;
1685
1719
  static parseUserInputDateTime(timeText: any, offset: any): number;
1686
1720
  static getBrighterColor(color: string): any;
1687
- static createSplitByColors(displayState: any, aggKey: string, ignoreIsOnlyAgg?: boolean): any[];
1688
- static colorSplitBy(displayState: any, splitByIndex: number, aggKey: string, ignoreIsOnlyAgg?: boolean): any;
1721
+ private static splitByColorCache;
1722
+ /**
1723
+ * Creates an array of colors for split-by series
1724
+ * @param displayState - The current display state
1725
+ * @param aggKey - The aggregate key
1726
+ * @param ignoreIsOnlyAgg - Whether to ignore the "only aggregate" optimization
1727
+ * @returns Array of color strings for each split-by
1728
+ */
1729
+ static createSplitByColors(displayState: any, aggKey: string, ignoreIsOnlyAgg?: boolean): string[];
1730
+ /**
1731
+ * Helper method to check if an aggregate is the only visible one
1732
+ */
1733
+ private static isOnlyVisibleAggregate;
1734
+ /**
1735
+ * Helper method to generate color variations for split-bys
1736
+ */
1737
+ private static generateSplitByColorVariations;
1738
+ /**
1739
+ * Clears the split-by color cache (useful when display state changes significantly)
1740
+ */
1741
+ static clearSplitByColorCache(): void;
1742
+ static colorSplitBy(displayState: any, splitByIndex: number, aggKey: string, ignoreIsOnlyAgg?: boolean): string;
1689
1743
  static getTheme(theme: any): string;
1690
1744
  static clearSelection(): void;
1691
1745
  static mark(filter: any, text: any): any;
@@ -1742,3 +1796,4 @@ declare class Utils {
1742
1796
  }
1743
1797
 
1744
1798
  export { AggregateExpression, AvailabilityChart, AxisState, CategoricalPlot, ChartComponentData, ChartDataOptions, ChartOptions, ColorPicker, ContextMenu, DateTimeButtonRange, DateTimeButtonSingle, DateTimePicker, EllipsisMenu, EventsPlot, EventsTable, EventsTableData, GeoProcessGraphic, Grid, GroupedBarChart, GroupedBarChartData, Heatmap, HeatmapCanvas, HeatmapData, Hierarchy, HierarchyNavigation, HierarchyNode, HistoryPlayback, Legend, LineChart, LineChartData, LinePlot, Marker, ModelAutocomplete, ModelSearch, PieChart, PieChartData, PlaybackControls, ProcessGraphic, ScatterPlot, ScatterPlotData, SingleDateTimePicker, Slider, Strings, TimeSeriesEvent, TimeSeriesEventCell, TimezonePicker, Tooltip, TsqExpression, TsqRange, UXClient, Utils, UXClient as default };
1799
+ export type { ILineChartOptions };