@opendata-ai/openchart-engine 8.3.1 → 8.4.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.
- package/dist/index.d.ts +23 -4
- package/dist/index.js +2095 -733
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _opendata_ai_openchart_core from '@opendata-ai/openchart-core';
|
|
2
|
-
import { AnimationEase, LegendLayout, ResolvedChrome, TooltipContent, A11yMetadata, ResolvedTheme, LegendEntry, CompileOptions, ChartLayout, LayerSpec, CompileTableOptions, TableLayout, ResolvedAnimationPhase, AnimationSpec, ResolvedAnimation, Point, DataRow, BarListEncoding, ThemeConfig, DarkMode, GeoMapGeo, GeoMapEncoding, LegendConfig, GeoMapPointsLayer, SankeyEncoding, SankeyNodeAlign, SankeyLinkColor, TileMapEncoding, TileMapPalette, MarkType, MarkDef, Encoding, ChromeText, Annotation, LabelConfig, Display, ColumnConfig, GraphSpec, GraphEncoding, GraphLayoutConfig, NodeOverride, GraphAnimationSpec, GraphInteractionConfig, ScaleType, EncodingChannel, FieldFormatContext, Rect, LayoutStrategy, VizSpec, Mark, BinTransform, CalculateTransform, ConditionalValueDef, FilterPredicate, TimeUnitTransform, Transform } from '@opendata-ai/openchart-core';
|
|
2
|
+
import { AnimationEase, LegendLayout, ResolvedChrome, TooltipContent, A11yMetadata, ResolvedTheme, LegendEntry, CompileOptions, ChartLayout, LayerSpec, CompileTableOptions, TableLayout, ResolvedAnimationPhase, AnimationSpec, ResolvedAnimation, Point, DataRow, BarListEncoding, ThemeConfig, DarkMode, GeoMapGeo, GeoMapProjection, GeoMapEncoding, LegendConfig, GeoMapPointsLayer, SankeyEncoding, SankeyNodeAlign, SankeyLinkColor, TileMapEncoding, TileMapPalette, MarkType, MarkDef, Encoding, ChromeText, Annotation, LabelConfig, Display, ColumnConfig, TableDensity, SortState, GraphSpec, GraphEncoding, GraphLayoutConfig, NodeOverride, GraphAnimationSpec, GraphInteractionConfig, ScaleType, EncodingChannel, FieldFormatContext, Rect, LayoutStrategy, VizSpec, Mark, BinTransform, CalculateTransform, ConditionalValueDef, FilterPredicate, TimeUnitTransform, Transform } from '@opendata-ai/openchart-core';
|
|
3
3
|
export { BarListLayout, BarListSpec, ChartLayout, ChartSpec, CompileOptions, CompileTableOptions, GeoMapLayout, GeoMapSpec, GraphLayout, GraphSpec, LayerSpec, SankeyLayout, SankeySpec, TableLayout, TableSpec, TileMapLayout, TileMapSpec, VizSpec } from '@opendata-ai/openchart-core';
|
|
4
4
|
import { ScaleLinear, ScaleTime, ScaleLogarithmic, ScalePower, ScaleSymLog, ScaleBand, ScalePoint, ScaleOrdinal, ScaleQuantile, ScaleQuantize, ScaleThreshold } from 'd3-scale';
|
|
5
5
|
|
|
@@ -66,7 +66,7 @@ type GraphHoverMode = 'neighbors' | 'category' | 'node' | 'none';
|
|
|
66
66
|
interface ResolvedGraphInteraction {
|
|
67
67
|
/** Hover emphasis mode. Default `'neighbors'`. */
|
|
68
68
|
hoverMode: GraphHoverMode;
|
|
69
|
-
/** Node dim tier during hover/focus. Default 0.
|
|
69
|
+
/** Node dim tier during hover/focus. Default 0.3. */
|
|
70
70
|
dimOpacity: number;
|
|
71
71
|
/** Whether selecting a node flies the camera to it. Default false. */
|
|
72
72
|
selectFlyTo: boolean;
|
|
@@ -421,7 +421,9 @@ interface NormalizedBarListSpec {
|
|
|
421
421
|
|
|
422
422
|
interface NormalizedGeoMapSpec {
|
|
423
423
|
type: 'map';
|
|
424
|
-
geo: Required<GeoMapGeo
|
|
424
|
+
geo: Required<Omit<GeoMapGeo, 'projection'>> & {
|
|
425
|
+
projection?: GeoMapProjection;
|
|
426
|
+
};
|
|
425
427
|
data: Record<string, unknown>[];
|
|
426
428
|
encoding: GeoMapEncoding;
|
|
427
429
|
chrome: NormalizedChrome;
|
|
@@ -462,6 +464,10 @@ interface NormalizedSankeySpec {
|
|
|
462
464
|
animation?: AnimationSpec;
|
|
463
465
|
valueFormat?: string;
|
|
464
466
|
linkOpacity?: number;
|
|
467
|
+
other?: number | {
|
|
468
|
+
threshold: number;
|
|
469
|
+
label?: string;
|
|
470
|
+
};
|
|
465
471
|
}
|
|
466
472
|
|
|
467
473
|
/**
|
|
@@ -604,6 +610,13 @@ interface NormalizedTableSpec {
|
|
|
604
610
|
pageSize: number;
|
|
605
611
|
};
|
|
606
612
|
stickyFirstColumn: boolean;
|
|
613
|
+
density: TableDensity;
|
|
614
|
+
striped: boolean;
|
|
615
|
+
sort?: SortState;
|
|
616
|
+
totalRow?: {
|
|
617
|
+
label: string;
|
|
618
|
+
};
|
|
619
|
+
/** Mirrors `density === 'condensed'` for back-compat. */
|
|
607
620
|
compact: boolean;
|
|
608
621
|
responsive: boolean;
|
|
609
622
|
animation?: AnimationSpec;
|
|
@@ -788,7 +801,7 @@ declare function computeArrowheadPoints(tipX: number, tipY: number, tangentX: nu
|
|
|
788
801
|
* scored search, and two-pass deterministic placement.
|
|
789
802
|
*/
|
|
790
803
|
|
|
791
|
-
type ObstacleKind = 'mark' | 'line' | 'area-fill' | 'legend' | 'data-label' | 'endpoint-label' | 'watermark' | 'axis-band' | 'annotation';
|
|
804
|
+
type ObstacleKind = 'mark' | 'line' | 'area-fill' | 'legend' | 'data-label' | 'endpoint-label' | 'watermark' | 'axis-band' | 'annotation' | 'chrome';
|
|
792
805
|
interface PlacementObstacle extends Rect {
|
|
793
806
|
kind: ObstacleKind;
|
|
794
807
|
}
|
|
@@ -822,6 +835,12 @@ interface AnnotationContext {
|
|
|
822
835
|
debugPlacement?: boolean;
|
|
823
836
|
/** When true, annotations that overlap are demoted to footnote markers instead of being hidden. */
|
|
824
837
|
autoThin?: boolean;
|
|
838
|
+
/**
|
|
839
|
+
* First y an annotation label may occupy, in SVG coordinates. Callers pass
|
|
840
|
+
* the bottom of the top chrome block so hand-placed callouts stay clear of
|
|
841
|
+
* the title/subtitle. Defaults to the plain SVG clamp margin.
|
|
842
|
+
*/
|
|
843
|
+
topBound?: number;
|
|
825
844
|
}
|
|
826
845
|
|
|
827
846
|
/**
|