katucharts.js 0.2.1

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.
Files changed (200) hide show
  1. package/LICENSE +106 -0
  2. package/README.md +1100 -0
  3. package/dist/__vite-optional-peer-dep_jspdf_katucharts-BDMct_Gn.js +4 -0
  4. package/dist/accessibility/A11yModule.d.ts +26 -0
  5. package/dist/axis/Axis.d.ts +140 -0
  6. package/dist/axis/AxisCoordinator.d.ts +38 -0
  7. package/dist/bio.d.ts +22 -0
  8. package/dist/components/Credits.d.ts +38 -0
  9. package/dist/components/Crosshair.d.ts +15 -0
  10. package/dist/components/DataLabels.d.ts +7 -0
  11. package/dist/components/ExportButton.d.ts +27 -0
  12. package/dist/components/Legend.d.ts +53 -0
  13. package/dist/components/TitleRenderer.d.ts +19 -0
  14. package/dist/components/Tooltip.d.ts +61 -0
  15. package/dist/core/Chart.d.ts +156 -0
  16. package/dist/core/EventBus.d.ts +14 -0
  17. package/dist/core/InteractionController.d.ts +62 -0
  18. package/dist/core/OptionsParser.d.ts +61 -0
  19. package/dist/core/Registry.d.ts +27 -0
  20. package/dist/core/SVGRenderer.d.ts +48 -0
  21. package/dist/core/ScrollablePlotOverlay.d.ts +31 -0
  22. package/dist/core/StackComputer.d.ts +25 -0
  23. package/dist/core/StateManager.d.ts +21 -0
  24. package/dist/core/UpdateScheduler.d.ts +28 -0
  25. package/dist/core/animationConstants.d.ts +20 -0
  26. package/dist/core/chartTypes.d.ts +46 -0
  27. package/dist/core/registerAll.d.ts +4 -0
  28. package/dist/core/registerBio.d.ts +4 -0
  29. package/dist/core/registerCore.d.ts +4 -0
  30. package/dist/core/registerFinance.d.ts +4 -0
  31. package/dist/core/registerFinancial.d.ts +4 -0
  32. package/dist/core/registerFlow.d.ts +4 -0
  33. package/dist/core/registerGeneral.d.ts +4 -0
  34. package/dist/datatable/DataTable.d.ts +162 -0
  35. package/dist/datatable/DataTableDefaults.d.ts +7 -0
  36. package/dist/datatable/api/TableApi.d.ts +35 -0
  37. package/dist/datatable/columns/ColumnDef.d.ts +16 -0
  38. package/dist/datatable/columns/ColumnManager.d.ts +31 -0
  39. package/dist/datatable/data/DataProcessor.d.ts +46 -0
  40. package/dist/datatable/data/DataSource.d.ts +26 -0
  41. package/dist/datatable/editing/CellEditor.d.ts +29 -0
  42. package/dist/datatable/export/TableExport.d.ts +23 -0
  43. package/dist/datatable/locales/en.d.ts +9 -0
  44. package/dist/datatable/locales/es.d.ts +6 -0
  45. package/dist/datatable/locales/index.d.ts +22 -0
  46. package/dist/datatable/locales/pt-BR.d.ts +6 -0
  47. package/dist/datatable/locales/resolveLocale.d.ts +16 -0
  48. package/dist/datatable/locales/zh.d.ts +6 -0
  49. package/dist/datatable/render/CellRenderer.d.ts +24 -0
  50. package/dist/datatable/render/HeaderRenderer.d.ts +51 -0
  51. package/dist/datatable/render/PaginationRenderer.d.ts +26 -0
  52. package/dist/datatable/render/SearchRenderer.d.ts +21 -0
  53. package/dist/datatable/render/TableRenderer.d.ts +81 -0
  54. package/dist/datatable/render/ToolbarRenderer.d.ts +34 -0
  55. package/dist/datatable/render/icons.d.ts +24 -0
  56. package/dist/datatable/render/popover.d.ts +15 -0
  57. package/dist/datatable/selection/SelectionManager.d.ts +29 -0
  58. package/dist/datatable/themes/TableTheme.d.ts +36 -0
  59. package/dist/datatable/themes/styleSheet.d.ts +16 -0
  60. package/dist/datatable.d.ts +19 -0
  61. package/dist/export/ChartExporter.d.ts +50 -0
  62. package/dist/export/Export.d.ts +76 -0
  63. package/dist/finance.d.ts +49 -0
  64. package/dist/index.d.ts +67 -0
  65. package/dist/indicators/Indicator.d.ts +23 -0
  66. package/dist/indicators/expandIndicators.d.ts +18 -0
  67. package/dist/indicators/moving-averages/DEMA.d.ts +10 -0
  68. package/dist/indicators/moving-averages/EMA.d.ts +12 -0
  69. package/dist/indicators/moving-averages/SMA.d.ts +11 -0
  70. package/dist/indicators/moving-averages/TEMA.d.ts +10 -0
  71. package/dist/indicators/moving-averages/WMA.d.ts +12 -0
  72. package/dist/indicators/oscillators/CCI.d.ts +11 -0
  73. package/dist/indicators/oscillators/MACD.d.ts +20 -0
  74. package/dist/indicators/oscillators/Momentum.d.ts +10 -0
  75. package/dist/indicators/oscillators/ROC.d.ts +10 -0
  76. package/dist/indicators/oscillators/RSI.d.ts +11 -0
  77. package/dist/indicators/oscillators/Stochastic.d.ts +20 -0
  78. package/dist/indicators/registry.d.ts +9 -0
  79. package/dist/indicators/trend/ADX.d.ts +11 -0
  80. package/dist/indicators/trend/IchimokuCloud.d.ts +14 -0
  81. package/dist/indicators/trend/PSAR.d.ts +11 -0
  82. package/dist/indicators/util.d.ts +8 -0
  83. package/dist/indicators/volatility/ATR.d.ts +11 -0
  84. package/dist/indicators/volatility/BollingerBands.d.ts +11 -0
  85. package/dist/indicators/volume/OBV.d.ts +11 -0
  86. package/dist/indicators/volume/VBP.d.ts +12 -0
  87. package/dist/indicators/volume/VWAP.d.ts +12 -0
  88. package/dist/interaction/Drilldown.d.ts +29 -0
  89. package/dist/interaction/HoverManager.d.ts +47 -0
  90. package/dist/interaction/Zoom.d.ts +68 -0
  91. package/dist/katucharts-bio.es.js +5861 -0
  92. package/dist/katucharts-bio.umd.js +1 -0
  93. package/dist/katucharts-datatable.es.js +3363 -0
  94. package/dist/katucharts-datatable.umd.js +296 -0
  95. package/dist/katucharts-finance.es.js +4364 -0
  96. package/dist/katucharts-finance.umd.js +1 -0
  97. package/dist/katucharts-react.es.js +35 -0
  98. package/dist/katucharts-react.umd.js +1 -0
  99. package/dist/katucharts.es.js +20531 -0
  100. package/dist/katucharts.umd.js +9 -0
  101. package/dist/layout/LayoutEngine.d.ts +44 -0
  102. package/dist/license/LicenseManager.d.ts +63 -0
  103. package/dist/options/defaults.d.ts +5 -0
  104. package/dist/react/KatuChartsReact.d.ts +16 -0
  105. package/dist/react.d.ts +2 -0
  106. package/dist/responsive/ResponsiveEngine.d.ts +15 -0
  107. package/dist/series/BaseSeries.d.ts +186 -0
  108. package/dist/series/bioinformatics/CircosChart.d.ts +4 -0
  109. package/dist/series/bioinformatics/ClusteredHeatmapChart.d.ts +22 -0
  110. package/dist/series/bioinformatics/ForestPlotChart.d.ts +21 -0
  111. package/dist/series/bioinformatics/KaplanMeierChart.d.ts +22 -0
  112. package/dist/series/bioinformatics/ManhattanChart.d.ts +34 -0
  113. package/dist/series/bioinformatics/PCoAChart.d.ts +22 -0
  114. package/dist/series/bioinformatics/PhyloTreeChart.d.ts +27 -0
  115. package/dist/series/bioinformatics/SequenceLogoChart.d.ts +21 -0
  116. package/dist/series/bioinformatics/ViolinChart.d.ts +23 -0
  117. package/dist/series/bioinformatics/VolcanoChart.d.ts +28 -0
  118. package/dist/series/bioinformatics/circos/CircosChart.d.ts +20 -0
  119. package/dist/series/bioinformatics/circos/CircosColorScales.d.ts +6 -0
  120. package/dist/series/bioinformatics/circos/CircosComparativeChart.d.ts +41 -0
  121. package/dist/series/bioinformatics/circos/CircosHeatmapChart.d.ts +31 -0
  122. package/dist/series/bioinformatics/circos/CircosLayoutEngine.d.ts +37 -0
  123. package/dist/series/bioinformatics/circos/CircosRules.d.ts +6 -0
  124. package/dist/series/bioinformatics/circos/CircosSpiralChart.d.ts +39 -0
  125. package/dist/series/bioinformatics/circos/CircosTypes.d.ts +131 -0
  126. package/dist/series/bioinformatics/circos/tracks/AreaTrackRenderer.d.ts +7 -0
  127. package/dist/series/bioinformatics/circos/tracks/ConnectorTrackRenderer.d.ts +7 -0
  128. package/dist/series/bioinformatics/circos/tracks/GlyphTrackRenderer.d.ts +7 -0
  129. package/dist/series/bioinformatics/circos/tracks/HeatmapTrackRenderer.d.ts +7 -0
  130. package/dist/series/bioinformatics/circos/tracks/HighlightTrackRenderer.d.ts +6 -0
  131. package/dist/series/bioinformatics/circos/tracks/HistogramTrackRenderer.d.ts +7 -0
  132. package/dist/series/bioinformatics/circos/tracks/LineTrackRenderer.d.ts +7 -0
  133. package/dist/series/bioinformatics/circos/tracks/LinkTrackRenderer.d.ts +8 -0
  134. package/dist/series/bioinformatics/circos/tracks/LollipopTrackRenderer.d.ts +9 -0
  135. package/dist/series/bioinformatics/circos/tracks/RibbonTrackRenderer.d.ts +9 -0
  136. package/dist/series/bioinformatics/circos/tracks/ScatterTrackRenderer.d.ts +7 -0
  137. package/dist/series/bioinformatics/circos/tracks/StackTrackRenderer.d.ts +7 -0
  138. package/dist/series/bioinformatics/circos/tracks/TextTrackRenderer.d.ts +8 -0
  139. package/dist/series/bioinformatics/circos/tracks/TileTrackRenderer.d.ts +7 -0
  140. package/dist/series/bioinformatics/circos/tracks/TrackAxesRenderer.d.ts +6 -0
  141. package/dist/series/bioinformatics/circos/tracks/TrackBackgroundRenderer.d.ts +5 -0
  142. package/dist/series/cartesian/AreaChart.d.ts +33 -0
  143. package/dist/series/cartesian/BoxPlotChart.d.ts +24 -0
  144. package/dist/series/cartesian/BubbleChart.d.ts +34 -0
  145. package/dist/series/cartesian/ColumnChart.d.ts +37 -0
  146. package/dist/series/cartesian/LineChart.d.ts +28 -0
  147. package/dist/series/cartesian/ScatterChart.d.ts +20 -0
  148. package/dist/series/cartesian/SplineChart.d.ts +9 -0
  149. package/dist/series/cartesian/WaterfallChart.d.ts +25 -0
  150. package/dist/series/financial/AreaRangeChart.d.ts +24 -0
  151. package/dist/series/financial/BaselineChart.d.ts +20 -0
  152. package/dist/series/financial/CandlestickChart.d.ts +55 -0
  153. package/dist/series/financial/ColumnRangeChart.d.ts +16 -0
  154. package/dist/series/financial/FlagsChart.d.ts +34 -0
  155. package/dist/series/financial/HeikinAshiChart.d.ts +11 -0
  156. package/dist/series/financial/HollowCandlestickChart.d.ts +17 -0
  157. package/dist/series/financial/KagiChart.d.ts +23 -0
  158. package/dist/series/financial/LineBreakChart.d.ts +23 -0
  159. package/dist/series/financial/PointAndFigureChart.d.ts +24 -0
  160. package/dist/series/financial/RenkoChart.d.ts +22 -0
  161. package/dist/series/financial/VBPChart.d.ts +18 -0
  162. package/dist/series/financial/VolumeChart.d.ts +15 -0
  163. package/dist/series/flow/DependencyWheelChart.d.ts +23 -0
  164. package/dist/series/flow/NetworkGraphChart.d.ts +18 -0
  165. package/dist/series/flow/SankeyChart.d.ts +24 -0
  166. package/dist/series/gauge/GaugeChart.d.ts +40 -0
  167. package/dist/series/heatmap/HeatmapChart.d.ts +18 -0
  168. package/dist/series/hierarchical/SunburstChart.d.ts +44 -0
  169. package/dist/series/hierarchical/TreegraphChart.d.ts +19 -0
  170. package/dist/series/hierarchical/TreemapChart.d.ts +20 -0
  171. package/dist/series/hierarchical/WordcloudChart.d.ts +19 -0
  172. package/dist/series/index.d.ts +45 -0
  173. package/dist/series/map/FlowmapChart.d.ts +33 -0
  174. package/dist/series/map/MapChart.d.ts +53 -0
  175. package/dist/series/map/MapPointChart.d.ts +26 -0
  176. package/dist/series/map/mapProjection.d.ts +46 -0
  177. package/dist/series/pie/PieChart.d.ts +53 -0
  178. package/dist/series/polar/PolarChart.d.ts +18 -0
  179. package/dist/series/race/BarRaceChart.d.ts +44 -0
  180. package/dist/series/timeline/TimelineChart.d.ts +23 -0
  181. package/dist/series/venn/VennChart.d.ts +28 -0
  182. package/dist/stock/DataGrouping.d.ts +21 -0
  183. package/dist/stock/Navigator.d.ts +25 -0
  184. package/dist/stock/RangeSelector.d.ts +9 -0
  185. package/dist/stock/StockController.d.ts +47 -0
  186. package/dist/stockcharts.d.ts +8 -0
  187. package/dist/streaming/StreamAdapter.d.ts +36 -0
  188. package/dist/types/datatable-options.d.ts +633 -0
  189. package/dist/types/options.d.ts +1333 -0
  190. package/dist/utils/CircularBuffer.d.ts +24 -0
  191. package/dist/utils/chartText.d.ts +18 -0
  192. package/dist/utils/color.d.ts +23 -0
  193. package/dist/utils/decimation.d.ts +19 -0
  194. package/dist/utils/deepMerge.d.ts +5 -0
  195. package/dist/utils/dom.d.ts +10 -0
  196. package/dist/utils/format.d.ts +42 -0
  197. package/dist/utils/index.d.ts +7 -0
  198. package/dist/utils/math.d.ts +6 -0
  199. package/dist/utils/throttle.d.ts +2 -0
  200. package/package.json +95 -0
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Computes the plot area by measuring title, subtitle, axes, and legend space.
3
+ */
4
+ import type { InternalConfig, PlotArea } from '../types/options';
5
+ export interface LayoutResult {
6
+ plotArea: PlotArea;
7
+ titleArea: {
8
+ x: number;
9
+ y: number;
10
+ width: number;
11
+ height: number;
12
+ };
13
+ subtitleArea: {
14
+ x: number;
15
+ y: number;
16
+ width: number;
17
+ height: number;
18
+ };
19
+ legendArea: {
20
+ x: number;
21
+ y: number;
22
+ width: number;
23
+ height: number;
24
+ };
25
+ }
26
+ export declare class LayoutEngine {
27
+ compute(config: InternalConfig, chartWidth: number, chartHeight: number): LayoutResult;
28
+ private isNonCartesian;
29
+ private getSpacing;
30
+ private estimateTextHeight;
31
+ private estimateWrappedTextHeight;
32
+ private computeAutoFontSize;
33
+ private estimateLegendHeight;
34
+ /**
35
+ * Horizontal space reserved for a vertical legend pinned to the left/right
36
+ * edge — the widest of the series labels and (when present) the bubble-legend
37
+ * size-reference cluster.
38
+ */
39
+ private estimateLegendWidth;
40
+ private estimateSeriesLegendHeight;
41
+ private estimateAxisWidth;
42
+ private estimateLabelWidth;
43
+ private estimateAxisHeight;
44
+ }
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Singleton that manages license state globally across all chart instances.
3
+ *
4
+ * Validation is hybrid:
5
+ * - Offline: Ed25519 signature check, synchronous and instant. The bundle
6
+ * carries only the public key, so it can verify keys but never sign them.
7
+ * This alone governs behaviour when no verifyUrl is configured.
8
+ * - Online (opt-in via configureLicensing): a background POST to the issuing
9
+ * backend confirms the key is genuine, the subscription is active, and the
10
+ * current host is within the key's seat limit. Results are cached with an
11
+ * offline grace window. In 'strict' mode, once the grace window lapses a
12
+ * successful online check becomes mandatory; in 'lenient' mode an unreachable
13
+ * backend falls back to the offline signature.
14
+ */
15
+ export interface LicensePayload {
16
+ customer: string;
17
+ domains?: string[];
18
+ expiry?: string;
19
+ kid?: string;
20
+ }
21
+ export type LicenseMode = 'strict' | 'lenient';
22
+ export interface LicenseConfig {
23
+ /** Backend endpoint for the online check, e.g. https://api.host/api/v1/license/verify */
24
+ verifyUrl?: string;
25
+ /** Behaviour once the offline grace window lapses. Defaults to 'lenient'. */
26
+ mode?: LicenseMode;
27
+ /** How long an offline/unconfirmed key keeps working since its last successful
28
+ * online 'valid', in milliseconds. Defaults to 7 days. */
29
+ gracePeriodMs?: number;
30
+ /** Background re-check cadence while a key is set, in milliseconds. Defaults to 1 hour. */
31
+ recheckIntervalMs?: number;
32
+ }
33
+ declare class LicenseManagerClass {
34
+ private licenseKey;
35
+ private payload;
36
+ private offlineValid;
37
+ private verifyUrl;
38
+ private mode;
39
+ private gracePeriodMs;
40
+ private recheckIntervalMs;
41
+ private cache;
42
+ private pending;
43
+ private timer;
44
+ private listeners;
45
+ private lastEmitted;
46
+ configure(config: LicenseConfig): void;
47
+ setKey(key: string): boolean;
48
+ isLicensed(): boolean;
49
+ getPayload(): LicensePayload | null;
50
+ /** Subscribe to license-state transitions. Returns an unsubscribe function. */
51
+ onChange(cb: (licensed: boolean) => void): () => void;
52
+ private startOnlineChecks;
53
+ private verifyOnline;
54
+ private applyResult;
55
+ private emit;
56
+ private loadCache;
57
+ private saveCache;
58
+ private validate;
59
+ private checkExpiry;
60
+ private checkDomain;
61
+ }
62
+ export declare const LicenseManager: LicenseManagerClass;
63
+ export {};
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Default option values for KatuCharts.
3
+ */
4
+ import type { KatuChartsOptions } from '../types/options';
5
+ export declare const defaultOptions: KatuChartsOptions;
@@ -0,0 +1,16 @@
1
+ import { type HTMLAttributes } from 'react';
2
+ interface KatuChartsStatic {
3
+ chart(container: string | HTMLElement, options: Record<string, unknown>): KatuChartInstance;
4
+ }
5
+ interface KatuChartInstance {
6
+ update(options: Record<string, unknown>, redraw?: boolean): void;
7
+ destroy(): void;
8
+ }
9
+ export interface KatuChartsReactProps {
10
+ katuCharts: KatuChartsStatic;
11
+ options: Record<string, unknown>;
12
+ callback?: (chart: KatuChartInstance) => void;
13
+ containerProps?: HTMLAttributes<HTMLDivElement>;
14
+ }
15
+ export declare const KatuChartsReact: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<KatuChartsReactProps & import("react").RefAttributes<HTMLDivElement>>>;
16
+ export {};
@@ -0,0 +1,2 @@
1
+ export { KatuChartsReact } from './react/KatuChartsReact';
2
+ export type { KatuChartsReactProps } from './react/KatuChartsReact';
@@ -0,0 +1,15 @@
1
+ import type { ResponsiveOptions, ResponsiveRuleOptions } from '../types/options';
2
+ export declare class ResponsiveEngine {
3
+ private rules;
4
+ private activeIndices;
5
+ constructor(config: ResponsiveOptions);
6
+ evaluate(chartWidth: number, chartHeight: number): {
7
+ changed: boolean;
8
+ matchingIndices: number[];
9
+ };
10
+ getRules(): ResponsiveRuleOptions[];
11
+ getCurrentActiveIndices(): number[];
12
+ reset(): void;
13
+ private setsEqual;
14
+ private matchesCondition;
15
+ }
@@ -0,0 +1,186 @@
1
+ /**
2
+ * Base class for all series types. Defines the template method pattern
3
+ * with shared data labels, selection, clipping, shadow, and inactive state support.
4
+ */
5
+ import { Selection } from 'd3-selection';
6
+ import 'd3-transition';
7
+ import type { InternalSeriesConfig, PointOptions, PlotArea, DashStyleType } from '../types/options';
8
+ import type { AxisInstance } from '../axis/Axis';
9
+ import { EventBus } from '../core/EventBus';
10
+ export interface SeriesContext {
11
+ plotArea: PlotArea;
12
+ xAxis: AxisInstance;
13
+ yAxis: AxisInstance;
14
+ colorIndex: number;
15
+ colors: string[];
16
+ events: EventBus;
17
+ chartGroup: Selection<SVGGElement, unknown, null, undefined>;
18
+ plotGroup?: Selection<SVGGElement, unknown, null, undefined>;
19
+ totalSeriesOfType?: number;
20
+ indexInType?: number;
21
+ animate?: boolean;
22
+ stackOffsets?: Map<number | string, number>;
23
+ stackTotals?: Map<number | string, number>;
24
+ allSeries?: BaseSeries[];
25
+ inverted?: boolean;
26
+ legendConfig?: {
27
+ align?: string;
28
+ layout?: string;
29
+ verticalAlign?: string;
30
+ [key: string]: any;
31
+ };
32
+ pane?: {
33
+ size?: string | number;
34
+ [key: string]: any;
35
+ };
36
+ /** Chart background — lets labels drawn on it pick a readable color automatically. */
37
+ backgroundColor?: string;
38
+ }
39
+ type AnimatedRedrawFn = (duration?: number) => void;
40
+ export declare const STAGGER_MAX_POINTS = 500;
41
+ export declare function staggerDelay(index: number, base: number, perItem: number, totalItems: number): number;
42
+ export declare const DASH_STYLE_MAP: Record<string, string>;
43
+ export declare function resolveDashArray(style?: DashStyleType | string): string;
44
+ export declare function brightenColor(color: string, amount: number): string;
45
+ export declare abstract class BaseSeries {
46
+ config: InternalSeriesConfig;
47
+ protected context: SeriesContext;
48
+ protected group: Selection<SVGGElement, unknown, null, undefined>;
49
+ protected clipId?: string;
50
+ protected selectedPoints: Set<number>;
51
+ visible: boolean;
52
+ data: PointOptions[];
53
+ private _cachedExtents;
54
+ private _onVisibilityChange?;
55
+ constructor(config: InternalSeriesConfig);
56
+ init(context: SeriesContext): void;
57
+ setOnVisibilityChange(fn: AnimatedRedrawFn): void;
58
+ processData(): void;
59
+ getColor(): string;
60
+ /**
61
+ * Readable color for a label drawn on the chart background. An explicit color
62
+ * always wins; otherwise dark ink is used on light backgrounds and switched to
63
+ * light on dark ones (WCAG-based), so labels stay legible under any theme.
64
+ */
65
+ protected autoLabelColor(override?: string): string;
66
+ /**
67
+ * Text halo (`text-shadow`) for labels placed over busy fills like maps. The
68
+ * halo contrasts with the label so the outline reads on both light and dark
69
+ * backgrounds instead of glowing white on dark themes. `readableTextColor`
70
+ * returns white only when the background is dark enough to need light text.
71
+ */
72
+ protected labelHalo(): string;
73
+ /** Single halo color (for SVG `stroke` outlines) that contrasts with the label. */
74
+ protected labelHaloColor(): string;
75
+ /**
76
+ * Border/separator color for cells, slices, nodes and point markers. Matches
77
+ * the chart background so adjacent shapes read as clean gaps on any theme —
78
+ * dark gaps on dark backgrounds instead of harsh white grid lines. Falls back
79
+ * to white on transparent/unset backgrounds (the light-theme default).
80
+ */
81
+ protected autoBorderColor(): string;
82
+ getMultiLegendItems(): {
83
+ label: string;
84
+ color: string;
85
+ }[] | null;
86
+ getLegendSymbolShape(): string | null;
87
+ /**
88
+ * Size-reference data for a bubble legend. Returns null for every series
89
+ * type except bubble, which overrides this to report the pixel radius that
90
+ * maps to each reference z value so the legend can draw matching circles.
91
+ */
92
+ getBubbleLegendInfo(): {
93
+ sizeBy: 'area' | 'width';
94
+ color: string;
95
+ ranges: {
96
+ value: number;
97
+ radius: number;
98
+ }[];
99
+ } | null;
100
+ abstract render(): void;
101
+ /**
102
+ * Animate elements to new positions after axis domain change.
103
+ */
104
+ animateUpdate(duration: number): void;
105
+ /**
106
+ * Update context (axes, grouping info) without re-init.
107
+ */
108
+ updateContext(partial: Partial<SeriesContext>): void;
109
+ redraw(): void;
110
+ setVisible(visible: boolean, animate?: boolean): void;
111
+ toggleVisible(): void;
112
+ getDataExtents(): {
113
+ xMin: number;
114
+ xMax: number;
115
+ yMin: number;
116
+ yMax: number;
117
+ };
118
+ getCategories(): string[];
119
+ destroy(): void;
120
+ /**
121
+ * Replace all data in the series and optionally trigger a redraw.
122
+ */
123
+ setData(data: PointOptions[], redraw?: boolean, animation?: boolean): void;
124
+ /**
125
+ * Append a single point and optionally shift the oldest one off.
126
+ */
127
+ addPoint(point: PointOptions, redraw?: boolean, shift?: boolean, animation?: boolean): void;
128
+ /**
129
+ * Batch-append multiple points and optionally shift the oldest ones off.
130
+ */
131
+ addPoints(points: PointOptions[], redraw?: boolean, shift?: boolean, animation?: boolean): void;
132
+ /**
133
+ * Remove a point by index.
134
+ */
135
+ removePoint(index: number, redraw?: boolean, animation?: boolean): void;
136
+ /**
137
+ * Merge new options into this series config and optionally redraw.
138
+ */
139
+ updateSeries(options: Partial<InternalSeriesConfig>, redraw?: boolean): void;
140
+ /**
141
+ * Apply a coalesced batch of updates from the UpdateScheduler.
142
+ * Override in subclasses for incremental rendering.
143
+ */
144
+ applyBatch(batch: {
145
+ entries: {
146
+ type: string;
147
+ payload: any;
148
+ }[];
149
+ }): void;
150
+ show(): void;
151
+ hide(): void;
152
+ /**
153
+ * Return all currently selected point indices and their data.
154
+ */
155
+ getSelectedPoints(): {
156
+ index: number;
157
+ point: PointOptions;
158
+ }[];
159
+ protected applyClipPath(): void;
160
+ protected applyShadowFilter(): void;
161
+ /**
162
+ * Dim all other series when this series is hovered.
163
+ */
164
+ protected applyInactiveState(): void;
165
+ protected clearInactiveState(): void;
166
+ /**
167
+ * Emit afterAnimate event and invoke animation.complete callback at the end of the entry animation.
168
+ */
169
+ protected emitAfterAnimate(delay: number): void;
170
+ /**
171
+ * Render data labels for all visible points based on dataLabels config.
172
+ */
173
+ protected renderDataLabels(data: PointOptions[], getX: (d: PointOptions, i: number) => number, getY: (d: PointOptions, i: number) => number): void;
174
+ /**
175
+ * Handle point selection toggle when allowPointSelect is enabled.
176
+ */
177
+ protected handlePointSelect(element: Selection<any, any, any, any>, point: PointOptions, index: number, event: MouseEvent): void;
178
+ protected applySelectStyle(element: Selection<any, any, any, any>): void;
179
+ protected clearSelectStyle(element: Selection<any, any, any, any>): void;
180
+ protected attachPointEvents(element: Selection<any, any, any, any>, point: PointOptions, index: number): void;
181
+ /**
182
+ * Apply jitter offset to a coordinate value.
183
+ */
184
+ protected applyJitter(value: number, range: number, jitterAmount?: number): number;
185
+ }
186
+ export {};
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Re-export from modular circos system for backward compatibility.
3
+ */
4
+ export { CircosChart } from './circos/CircosChart';
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Clustered heatmap with row and column dendrograms.
3
+ * Extends heatmap concepts with hierarchical clustering visualization
4
+ * using d3-hierarchy cluster layout.
5
+ */
6
+ import 'd3-transition';
7
+ import { BaseSeries } from '../BaseSeries';
8
+ import type { InternalSeriesConfig } from '../../types/options';
9
+ export declare class ClusteredHeatmapChart extends BaseSeries {
10
+ constructor(config: InternalSeriesConfig);
11
+ render(): void;
12
+ private renderHeatmapCells;
13
+ private renderRowDendrogram;
14
+ private renderColDendrogram;
15
+ private renderLabels;
16
+ getDataExtents(): {
17
+ xMin: number;
18
+ xMax: number;
19
+ yMin: number;
20
+ yMax: number;
21
+ };
22
+ }
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Forest plot for meta-analysis visualization.
3
+ * Horizontal effect sizes with confidence intervals, weight-proportional markers,
4
+ * and diamond shapes for summary estimates.
5
+ */
6
+ import 'd3-transition';
7
+ import { BaseSeries } from '../BaseSeries';
8
+ import type { InternalSeriesConfig } from '../../types/options';
9
+ export declare class ForestPlotChart extends BaseSeries {
10
+ constructor(config: InternalSeriesConfig);
11
+ render(): void;
12
+ private renderNullEffectLine;
13
+ private renderDiamond;
14
+ private attachRowEvents;
15
+ getDataExtents(): {
16
+ xMin: number;
17
+ xMax: number;
18
+ yMin: number;
19
+ yMax: number;
20
+ };
21
+ }
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Kaplan-Meier survival curve with step function, confidence interval bands,
3
+ * censoring marks, and optional at-risk table.
4
+ */
5
+ import 'd3-transition';
6
+ import { BaseSeries } from '../BaseSeries';
7
+ import type { InternalSeriesConfig } from '../../types/options';
8
+ export declare class KaplanMeierChart extends BaseSeries {
9
+ constructor(config: InternalSeriesConfig);
10
+ render(): void;
11
+ private renderSurvivalCurve;
12
+ private renderConfidenceInterval;
13
+ private renderCensoringMarks;
14
+ private renderMedianLine;
15
+ private renderAtRiskTable;
16
+ getDataExtents(): {
17
+ xMin: number;
18
+ xMax: number;
19
+ yMin: number;
20
+ yMax: number;
21
+ };
22
+ }
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Manhattan plot for genome-wide association studies (GWAS).
3
+ * Points grouped by chromosome with alternating colors and significance threshold lines.
4
+ *
5
+ * Optimized for large datasets:
6
+ * - Canvas rendering when data exceeds canvasThreshold (default 20000)
7
+ * - Stack-safe min/max computations
8
+ * - Significance points rendered as SVG overlay on top of canvas for interactivity
9
+ */
10
+ import 'd3-transition';
11
+ import { BaseSeries } from '../BaseSeries';
12
+ import type { InternalSeriesConfig } from '../../types/options';
13
+ export declare class ManhattanChart extends BaseSeries {
14
+ private chrGroups;
15
+ private positions;
16
+ constructor(config: InternalSeriesConfig);
17
+ render(): void;
18
+ private groupByChromosome;
19
+ private getChrIndex;
20
+ private buildChrColorMap;
21
+ private renderSignificanceLines;
22
+ private renderPointsCanvas;
23
+ private renderSignificantPointsSVG;
24
+ private renderChromosomePoints;
25
+ private renderChromosomeLabels;
26
+ private renderTopLabels;
27
+ private attachManhattanEvents;
28
+ getDataExtents(): {
29
+ xMin: number;
30
+ xMax: number;
31
+ yMin: number;
32
+ yMax: number;
33
+ };
34
+ }
@@ -0,0 +1,22 @@
1
+ /**
2
+ * PCoA / Ordination scatter plot with an optional confidence ellipse per series.
3
+ *
4
+ * Behaves like scatter for point rendering but owns the ellipse: its extents are
5
+ * contributed to the axis domain calculation and the ellipse path is rendered inside
6
+ * the series group, so ellipses always fit inside the plot area without callers having
7
+ * to pre-compute axis min/max.
8
+ */
9
+ import { ScatterChart } from '../cartesian/ScatterChart';
10
+ import type { InternalSeriesConfig } from '../../types/options';
11
+ export declare class PCoAChart extends ScatterChart {
12
+ constructor(config: InternalSeriesConfig);
13
+ getDataExtents(): {
14
+ xMin: number;
15
+ xMax: number;
16
+ yMin: number;
17
+ yMax: number;
18
+ };
19
+ render(): void;
20
+ animateUpdate(duration: number): void;
21
+ private renderEllipse;
22
+ }
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Phylogenetic tree for evolutionary relationship visualization.
3
+ * Supports rectangular and radial layouts with branch length scaling,
4
+ * bootstrap values, and interactive subtree collapse.
5
+ */
6
+ import 'd3-transition';
7
+ import { BaseSeries } from '../BaseSeries';
8
+ import type { InternalSeriesConfig } from '../../types/options';
9
+ export declare class PhyloTreeChart extends BaseSeries {
10
+ constructor(config: InternalSeriesConfig);
11
+ render(): void;
12
+ private getTreeData;
13
+ private estimateLabelSpace;
14
+ private renderRectangular;
15
+ private renderRadial;
16
+ private scaleBranchLengths;
17
+ private getDistanceFromRoot;
18
+ private getMaxDistance;
19
+ private renderScaleBar;
20
+ private attachTreeEvents;
21
+ getDataExtents(): {
22
+ xMin: number;
23
+ xMax: number;
24
+ yMin: number;
25
+ yMax: number;
26
+ };
27
+ }
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Sequence logo for visualizing conserved sequence motifs.
3
+ * Stacked letters proportional to information content at each position.
4
+ * Supports DNA, RNA, and protein alphabets with configurable color schemes.
5
+ */
6
+ import 'd3-transition';
7
+ import { BaseSeries } from '../BaseSeries';
8
+ import type { InternalSeriesConfig } from '../../types/options';
9
+ export declare class SequenceLogoChart extends BaseSeries {
10
+ constructor(config: InternalSeriesConfig);
11
+ render(): void;
12
+ private getDefaultColors;
13
+ private getColumnWidth;
14
+ private attachPositionEvents;
15
+ getDataExtents(): {
16
+ xMin: number;
17
+ xMax: number;
18
+ yMin: number;
19
+ yMax: number;
20
+ };
21
+ }
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Violin plot with kernel density estimation for distribution visualization.
3
+ * Supports optional inner boxplot, jittered points, and split violins.
4
+ */
5
+ import 'd3-transition';
6
+ import { BaseSeries } from '../BaseSeries';
7
+ import type { InternalSeriesConfig } from '../../types/options';
8
+ export declare class ViolinChart extends BaseSeries {
9
+ constructor(config: InternalSeriesConfig);
10
+ render(): void;
11
+ private renderInnerBoxplot;
12
+ private renderInnerPoints;
13
+ private quantile;
14
+ private median;
15
+ private computeViolinGeometry;
16
+ private attachViolinEvents;
17
+ getDataExtents(): {
18
+ xMin: number;
19
+ xMax: number;
20
+ yMin: number;
21
+ yMax: number;
22
+ };
23
+ }
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Volcano plot for differential expression analysis.
3
+ * x = log2(fold change), y = -log10(p-value).
4
+ * Auto-colors points by significance and renders threshold lines.
5
+ */
6
+ import 'd3-transition';
7
+ import { BaseSeries } from '../BaseSeries';
8
+ import type { InternalSeriesConfig } from '../../types/options';
9
+ export declare class VolcanoChart extends BaseSeries {
10
+ constructor(config: InternalSeriesConfig);
11
+ getMultiLegendItems(): {
12
+ label: string;
13
+ color: string;
14
+ }[] | null;
15
+ render(): void;
16
+ private classifyPoint;
17
+ private getPointColor;
18
+ private renderThresholdLines;
19
+ private renderPoints;
20
+ private renderTopLabels;
21
+ private attachVolcanoEvents;
22
+ getDataExtents(): {
23
+ xMin: number;
24
+ xMax: number;
25
+ yMin: number;
26
+ yMax: number;
27
+ };
28
+ }
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Circos plot for circular multi-track genome visualization.
3
+ * Refactored to use modular track renderers and shared layout engine.
4
+ * Supports 14 track types: scatter, line, histogram, heatmap, link, highlight,
5
+ * stack, text, tile, ribbon, connector, area, glyph, lollipop.
6
+ */
7
+ import { BaseSeries } from '../../BaseSeries';
8
+ import type { InternalSeriesConfig } from '../../../types/options';
9
+ export declare class CircosChart extends BaseSeries {
10
+ constructor(config: InternalSeriesConfig);
11
+ render(): void;
12
+ private renderTrack;
13
+ private getCircosData;
14
+ getDataExtents(): {
15
+ xMin: number;
16
+ xMax: number;
17
+ yMin: number;
18
+ yMax: number;
19
+ };
20
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Color scale factory mapping named scales to D3 interpolator functions.
3
+ * Supports 24 named color scales across sequential, diverging, and multi-hue categories.
4
+ */
5
+ import type { CircosColorScaleName } from './CircosTypes';
6
+ export declare function getColorInterpolator(name?: CircosColorScaleName): (t: number) => string;
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Multi-Species Synteny visualization.
3
+ * Arranges chromosomes from multiple species on a single circle with
4
+ * inter-species gaps larger than intra-species gaps, renders species label
5
+ * arcs above each group, and draws variable-width synteny ribbons between
6
+ * conserved regions across species.
7
+ */
8
+ import 'd3-transition';
9
+ import { BaseSeries } from '../../BaseSeries';
10
+ import type { InternalSeriesConfig } from '../../../types/options';
11
+ export declare class CircosComparativeChart extends BaseSeries {
12
+ constructor(config: InternalSeriesConfig);
13
+ render(): void;
14
+ getDataExtents(): {
15
+ xMin: number;
16
+ xMax: number;
17
+ yMin: number;
18
+ yMax: number;
19
+ };
20
+ private getComparativeData;
21
+ /**
22
+ * Build a flat chromosome list with prefixed IDs and appropriate gaps.
23
+ * Inter-species gaps use speciesGap; intra-species gaps use chrGap.
24
+ */
25
+ private buildChromosomeList;
26
+ private buildPrefixedBlocks;
27
+ /** Render chromosome labels using the clean ID (without species prefix). */
28
+ private renderCleanLabels;
29
+ /** Render curved label arcs above each species group. */
30
+ private renderSpeciesLabelArcs;
31
+ /** Render synteny ribbons connecting conserved regions across species. */
32
+ private renderSyntenyRibbons;
33
+ /**
34
+ * Inner heatmap ring showing conservation scores at BOTH source and target
35
+ * positions of each synteny block, matching real circos conservation tracks.
36
+ */
37
+ private renderConservationTrack;
38
+ /** Build ribbon SVG path: source arc → bezier → target arc → bezier back. */
39
+ private buildRibbonPath;
40
+ private adjustColorBrightness;
41
+ }