@opendata-ai/openchart-core 8.0.0-rc.24 → 8.0.0-rc.26
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 +58 -52
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/styles.css.map +1 -1
- package/package.json +1 -1
- package/schema/chart.schema.json +32 -176
- package/schema/vizspec.schema.json +64 -352
package/dist/index.d.ts
CHANGED
|
@@ -67,7 +67,12 @@ interface LayoutStrategy {
|
|
|
67
67
|
*
|
|
68
68
|
* Compact: minimal chrome, no inline labels, legend on top, reduced axes.
|
|
69
69
|
* Medium: moderate labels, legend on top, reduced axes.
|
|
70
|
-
* Full: all labels, legend on
|
|
70
|
+
* Full: all labels, legend on top, full axes.
|
|
71
|
+
*
|
|
72
|
+
* Legend position is 'top' at every breakpoint: a top legend reads as a key to
|
|
73
|
+
* the chart before the eye reaches the plot, and it keeps the plotting area
|
|
74
|
+
* full-width instead of surrendering a right-hand column. `legend.position`
|
|
75
|
+
* still overrides it per spec.
|
|
71
76
|
*
|
|
72
77
|
* Height constraints further reduce chrome and legend when container is short.
|
|
73
78
|
*/
|
|
@@ -571,25 +576,6 @@ interface MarkDef {
|
|
|
571
576
|
* - `'none'` (default): solid fills only.
|
|
572
577
|
*/
|
|
573
578
|
fillPattern?: 'auto' | 'none';
|
|
574
|
-
/**
|
|
575
|
-
* Rendering backend for point marks. High-cardinality scatter plots draw
|
|
576
|
-
* thousands of SVG circles, which is what makes their entrance and update
|
|
577
|
-
* transitions stutter; a canvas layer draws the same dots in a handful of
|
|
578
|
-
* batched paint calls.
|
|
579
|
-
*
|
|
580
|
-
* - `'auto'` (default): canvas above 1,000 compiled point marks, SVG below.
|
|
581
|
-
* - `'svg'`: always SVG, whatever the point count.
|
|
582
|
-
* - `'canvas'`: always canvas, whatever the point count.
|
|
583
|
-
*
|
|
584
|
-
* Canvas mode trades per-mark keyboard focus and edit-mode point selection
|
|
585
|
-
* (the screen-reader data table still carries every row), and draws the
|
|
586
|
-
* trendline above the dots even when `trendline.layer` is `'below'`.
|
|
587
|
-
* Tooltips, hover, and click callbacks work the same in both modes.
|
|
588
|
-
*
|
|
589
|
-
* Ignored with a console warning for non-point marks, and for faceted,
|
|
590
|
-
* layered, and sparkline charts.
|
|
591
|
-
*/
|
|
592
|
-
render?: 'auto' | 'svg' | 'canvas';
|
|
593
579
|
/**
|
|
594
580
|
* Visual style for range marks. Only meaningful when `type` is `'range'`.
|
|
595
581
|
* - 'dumbbell' (default): a dot at each end joined by a connector line.
|
|
@@ -2693,32 +2679,32 @@ interface TileMapSpec {
|
|
|
2693
2679
|
valueFormat?: string;
|
|
2694
2680
|
}
|
|
2695
2681
|
/** Supported map projections. */
|
|
2696
|
-
type
|
|
2682
|
+
type GeoMapProjection = 'albersUsa' | 'mercator' | 'equalEarth' | 'identity';
|
|
2697
2683
|
/** Focus target for map camera: feature id(s) to zoom/pan to. */
|
|
2698
2684
|
/**
|
|
2699
2685
|
* Fit the point layer's cluster. `true` fits every point; `{ field, value }`
|
|
2700
2686
|
* fits only the points whose data row has `row[field] === value` (e.g. only the
|
|
2701
2687
|
* campuses rated "F"), which lets a story pan between sub-clusters.
|
|
2702
2688
|
*/
|
|
2703
|
-
type
|
|
2689
|
+
type GeoMapPointsFocus = true | {
|
|
2704
2690
|
field: string;
|
|
2705
2691
|
value: string | number;
|
|
2706
2692
|
};
|
|
2707
|
-
type
|
|
2693
|
+
type GeoMapFocus = string | number | Array<string | number> | {
|
|
2708
2694
|
features: string | number | Array<string | number>;
|
|
2709
2695
|
padding?: number;
|
|
2710
2696
|
} | {
|
|
2711
|
-
points:
|
|
2697
|
+
points: GeoMapPointsFocus;
|
|
2712
2698
|
padding?: number;
|
|
2713
2699
|
};
|
|
2714
2700
|
/** Geo configuration for map specs. */
|
|
2715
|
-
interface
|
|
2701
|
+
interface GeoMapGeo {
|
|
2716
2702
|
/** TopoJSON topology object. User imports this from us-atlas, world-atlas, or their own source. */
|
|
2717
2703
|
features: unknown;
|
|
2718
2704
|
/** Field in the TopoJSON feature properties to use as the join key. Defaults to 'id'. */
|
|
2719
2705
|
idField?: string;
|
|
2720
2706
|
/** Map projection. Defaults to 'albersUsa'. */
|
|
2721
|
-
projection?:
|
|
2707
|
+
projection?: GeoMapProjection;
|
|
2722
2708
|
/**
|
|
2723
2709
|
* Focus the camera. A feature id (or array) fits those features; `{ features, padding }`
|
|
2724
2710
|
* adds breathing room; `{ points: true, padding }` fits the points layer's cluster
|
|
@@ -2727,10 +2713,10 @@ interface MapGeo {
|
|
|
2727
2713
|
* `{ points: { field, value }, padding }` fits only the matching point subset, so a
|
|
2728
2714
|
* story can pan between sub-clusters. null clears focus from a prior story step.
|
|
2729
2715
|
*/
|
|
2730
|
-
focus?:
|
|
2716
|
+
focus?: GeoMapFocus | null;
|
|
2731
2717
|
}
|
|
2732
2718
|
/** Encoding channels specific to map visualizations. */
|
|
2733
|
-
interface
|
|
2719
|
+
interface GeoMapEncoding {
|
|
2734
2720
|
/** Join key field in the data. Required for choropleth; optional in basemap-only mode (points layer with empty data). */
|
|
2735
2721
|
key?: EncodingChannel;
|
|
2736
2722
|
/** Color encoding (quantitative or nominal). Drives fill color of features. Optional when a points layer is present (basemap-only mode). */
|
|
@@ -2739,7 +2725,7 @@ interface MapEncoding {
|
|
|
2739
2725
|
tooltip?: EncodingChannel | EncodingChannel[];
|
|
2740
2726
|
}
|
|
2741
2727
|
/** Point/symbol layer rendered above choropleth features. */
|
|
2742
|
-
interface
|
|
2728
|
+
interface GeoMapPointsLayer {
|
|
2743
2729
|
/** Tabular data for the points. Independent of the choropleth data join. */
|
|
2744
2730
|
data: DataRow[];
|
|
2745
2731
|
/** Field holding longitude (x coordinate). */
|
|
@@ -2750,22 +2736,22 @@ interface MapPointsLayer {
|
|
|
2750
2736
|
size?: EncodingChannel;
|
|
2751
2737
|
/** Optional color encoding (nominal or quantitative). Independent scale from choropleth. */
|
|
2752
2738
|
color?: EncodingChannel;
|
|
2753
|
-
/** Tooltip channel(s), same shape as
|
|
2739
|
+
/** Tooltip channel(s), same shape as GeoMapEncoding.tooltip. */
|
|
2754
2740
|
tooltip?: EncodingChannel | EncodingChannel[];
|
|
2755
2741
|
/** Stable id for event callbacks. Data-update transitions for points are not yet supported. */
|
|
2756
2742
|
key?: EncodingChannel;
|
|
2757
2743
|
/** Fill opacity for point circles. Default 0.65. Range 0-1. */
|
|
2758
2744
|
opacity?: number;
|
|
2759
2745
|
}
|
|
2760
|
-
interface
|
|
2746
|
+
interface GeoMapSpec {
|
|
2761
2747
|
/** Discriminant: always "map". */
|
|
2762
2748
|
type: 'map';
|
|
2763
2749
|
/** Geo configuration: TopoJSON features, join key, and projection. */
|
|
2764
|
-
geo:
|
|
2750
|
+
geo: GeoMapGeo;
|
|
2765
2751
|
/** Tabular data to join to geo features. */
|
|
2766
2752
|
data: DataRow[];
|
|
2767
2753
|
/** Encoding channels mapping data fields to visual properties. */
|
|
2768
|
-
encoding:
|
|
2754
|
+
encoding: GeoMapEncoding;
|
|
2769
2755
|
/** Editorial chrome (title, subtitle, source, byline, footer). */
|
|
2770
2756
|
chrome?: Chrome;
|
|
2771
2757
|
/** Legend display configuration. */
|
|
@@ -2777,7 +2763,7 @@ interface MapSpec {
|
|
|
2777
2763
|
/** Whether to show the tryOpenData.ai watermark. Defaults to true. */
|
|
2778
2764
|
watermark?: boolean;
|
|
2779
2765
|
/** Optional point/symbol layer rendered above choropleth features. */
|
|
2780
|
-
points?:
|
|
2766
|
+
points?: GeoMapPointsLayer;
|
|
2781
2767
|
/** Animation configuration for entrance animations. */
|
|
2782
2768
|
animation?: AnimationSpec;
|
|
2783
2769
|
/**
|
|
@@ -2842,7 +2828,7 @@ interface BarListEncoding {
|
|
|
2842
2828
|
* - GraphSpec: has `type: 'graph'`
|
|
2843
2829
|
* - SankeySpec: has `type: 'sankey'`
|
|
2844
2830
|
* - TileMapSpec: has `type: 'tilemap'`
|
|
2845
|
-
* -
|
|
2831
|
+
* - GeoMapSpec: has `type: 'map'`
|
|
2846
2832
|
* - BarListSpec: has `type: 'barlist'`
|
|
2847
2833
|
*
|
|
2848
2834
|
* Election parliament (hemicycle) charts are `ChartSpec` with `mark:
|
|
@@ -2852,7 +2838,7 @@ interface BarListEncoding {
|
|
|
2852
2838
|
* for free instead of a second bespoke compile path (see
|
|
2853
2839
|
* `packages/engine/src/charts/parliament/`).
|
|
2854
2840
|
*/
|
|
2855
|
-
type VizSpec = ChartSpec | LayerSpec | TableSpec | GraphSpec | SankeySpec | TileMapSpec |
|
|
2841
|
+
type VizSpec = ChartSpec | LayerSpec | TableSpec | GraphSpec | SankeySpec | TileMapSpec | GeoMapSpec | BarListSpec;
|
|
2856
2842
|
/**
|
|
2857
2843
|
* Chart spec without runtime data, for persistence/storage.
|
|
2858
2844
|
* Generic: `ChartSpecWithoutData<MyRow>` constrains encoding field names.
|
|
@@ -2867,13 +2853,13 @@ type SankeySpecWithoutData = Omit<SankeySpec, 'data'>;
|
|
|
2867
2853
|
/** TileMap spec without runtime data, for persistence/storage. */
|
|
2868
2854
|
type TileMapSpecWithoutData = Omit<TileMapSpec, 'data'>;
|
|
2869
2855
|
/** Map spec without runtime data, for persistence/storage. */
|
|
2870
|
-
type
|
|
2871
|
-
points?: Omit<
|
|
2856
|
+
type GeoMapSpecWithoutData = Omit<GeoMapSpec, 'data' | 'points'> & {
|
|
2857
|
+
points?: Omit<GeoMapPointsLayer, 'data'>;
|
|
2872
2858
|
};
|
|
2873
2859
|
/** BarList spec without runtime data, for persistence/storage. */
|
|
2874
2860
|
type BarListSpecWithoutData = Omit<BarListSpec, 'data'>;
|
|
2875
2861
|
/** Union of data-stripped spec types for persistence/storage. */
|
|
2876
|
-
type StoredVizSpec = ChartSpecWithoutData | TableSpecWithoutData | GraphSpecWithoutData | SankeySpecWithoutData | TileMapSpecWithoutData |
|
|
2862
|
+
type StoredVizSpec = ChartSpecWithoutData | TableSpecWithoutData | GraphSpecWithoutData | SankeySpecWithoutData | TileMapSpecWithoutData | GeoMapSpecWithoutData | BarListSpecWithoutData;
|
|
2877
2863
|
/** Logical AND combinator for filter predicates. */
|
|
2878
2864
|
interface LogicalAnd<T> {
|
|
2879
2865
|
and: T[];
|
|
@@ -3102,8 +3088,8 @@ declare function isSankeySpec(spec: VizSpec | Record<string, unknown>): spec is
|
|
|
3102
3088
|
declare function isTileMapSpec(spec: VizSpec | Record<string, unknown>): spec is TileMapSpec;
|
|
3103
3089
|
/** Check if a spec is a BarListSpec. */
|
|
3104
3090
|
declare function isBarListSpec(spec: VizSpec | Record<string, unknown>): spec is BarListSpec;
|
|
3105
|
-
/** Check if a spec is a
|
|
3106
|
-
declare function
|
|
3091
|
+
/** Check if a spec is a GeoMapSpec. */
|
|
3092
|
+
declare function isGeoMapSpec(spec: VizSpec | Record<string, unknown>): spec is GeoMapSpec;
|
|
3107
3093
|
/** Check if an annotation is a TextAnnotation. */
|
|
3108
3094
|
declare function isTextAnnotation(annotation: Annotation): annotation is TextAnnotation;
|
|
3109
3095
|
/** Check if an annotation is a RangeAnnotation. */
|
|
@@ -5013,7 +4999,7 @@ interface CompileWarning {
|
|
|
5013
4999
|
context?: Record<string, unknown>;
|
|
5014
5000
|
}
|
|
5015
5001
|
/** Resolved focus target for map camera framing. */
|
|
5016
|
-
interface
|
|
5002
|
+
interface GeoMapFocusLayout {
|
|
5017
5003
|
target: {
|
|
5018
5004
|
x: number;
|
|
5019
5005
|
y: number;
|
|
@@ -5024,7 +5010,7 @@ interface MapFocusLayout {
|
|
|
5024
5010
|
ids: Array<string | number>;
|
|
5025
5011
|
}
|
|
5026
5012
|
/** A resolved map feature mark with computed SVG path and fill. */
|
|
5027
|
-
interface
|
|
5013
|
+
interface GeoMapFeatureMark {
|
|
5028
5014
|
type: 'map-feature';
|
|
5029
5015
|
/** SVG path `d` attribute for this feature's shape. */
|
|
5030
5016
|
path: string;
|
|
@@ -5055,7 +5041,7 @@ interface MapFeatureMark {
|
|
|
5055
5041
|
centroid: [number, number];
|
|
5056
5042
|
}
|
|
5057
5043
|
/** A resolved map point mark with projected coordinates and visual properties. */
|
|
5058
|
-
interface
|
|
5044
|
+
interface GeoMapPointMark {
|
|
5059
5045
|
type: 'map-point';
|
|
5060
5046
|
/** Projected center x in map-local coordinates. */
|
|
5061
5047
|
cx: number;
|
|
@@ -5081,7 +5067,7 @@ interface MapPointMark {
|
|
|
5081
5067
|
animationIndex: number;
|
|
5082
5068
|
}
|
|
5083
5069
|
/** Border paths for the map (interior borders and coastline/outline). */
|
|
5084
|
-
interface
|
|
5070
|
+
interface GeoMapBorders {
|
|
5085
5071
|
/** SVG path `d` for interior borders between features. */
|
|
5086
5072
|
interiorPath: string;
|
|
5087
5073
|
/** SVG path `d` for the outer boundary / coastline. */
|
|
@@ -5092,23 +5078,23 @@ interface MapBorders {
|
|
|
5092
5078
|
outlineStroke: string;
|
|
5093
5079
|
}
|
|
5094
5080
|
/**
|
|
5095
|
-
*
|
|
5081
|
+
* GeoMapLayout: the complete engine output for map visualizations.
|
|
5096
5082
|
*
|
|
5097
5083
|
* Contains everything an adapter needs to render the map: dimensions,
|
|
5098
5084
|
* chrome, feature paths, borders, legend, tooltip descriptors, and
|
|
5099
5085
|
* accessibility metadata.
|
|
5100
5086
|
*/
|
|
5101
|
-
interface
|
|
5087
|
+
interface GeoMapLayout {
|
|
5102
5088
|
/** The map drawing area (after chrome and legend are subtracted). */
|
|
5103
5089
|
area: Rect;
|
|
5104
5090
|
/** Resolved chrome text elements with positions and styles. */
|
|
5105
5091
|
chrome: ResolvedChrome;
|
|
5106
5092
|
/** Resolved feature marks with paths, fills, and joined data. */
|
|
5107
|
-
features:
|
|
5093
|
+
features: GeoMapFeatureMark[];
|
|
5108
5094
|
/** Border paths (interior mesh and outline). */
|
|
5109
|
-
borders:
|
|
5095
|
+
borders: GeoMapBorders;
|
|
5110
5096
|
/** Resolved point marks for the symbol layer (empty array if no points layer). */
|
|
5111
|
-
pointMarks:
|
|
5097
|
+
pointMarks: GeoMapPointMark[];
|
|
5112
5098
|
/** Categorical legend for the point color channel (null if no point color). */
|
|
5113
5099
|
pointCategoricalLegend: CategoricalLegendLayout | null;
|
|
5114
5100
|
/** Continuous legend for the point color channel (null if no point color). */
|
|
@@ -5141,7 +5127,7 @@ interface MapLayout {
|
|
|
5141
5127
|
height: number;
|
|
5142
5128
|
};
|
|
5143
5129
|
/** Resolved focus target for camera framing (null if no focus). */
|
|
5144
|
-
focus:
|
|
5130
|
+
focus: GeoMapFocusLayout | null;
|
|
5145
5131
|
}
|
|
5146
5132
|
/** A resolved bar list row with computed positions and visual properties. */
|
|
5147
5133
|
interface BarListRowMark {
|
|
@@ -5250,6 +5236,26 @@ interface CompileOptions {
|
|
|
5250
5236
|
* before calling compile. The engine always receives a resolved boolean.
|
|
5251
5237
|
*/
|
|
5252
5238
|
darkMode?: boolean;
|
|
5239
|
+
/**
|
|
5240
|
+
* Rendering backend for point marks, mirroring vega-embed's `renderer`
|
|
5241
|
+
* embed option: backend choice is host policy, not part of the spec.
|
|
5242
|
+
* High-cardinality scatter plots draw thousands of SVG circles, which is
|
|
5243
|
+
* what makes their entrance and update transitions stutter; a canvas layer
|
|
5244
|
+
* draws the same dots in a handful of batched paint calls.
|
|
5245
|
+
*
|
|
5246
|
+
* - `'auto'` (default): canvas above 1,000 compiled point marks, SVG below.
|
|
5247
|
+
* - `'svg'`: always SVG, whatever the point count.
|
|
5248
|
+
* - `'canvas'`: always canvas, whatever the point count.
|
|
5249
|
+
*
|
|
5250
|
+
* Canvas mode trades per-mark keyboard focus and edit-mode point selection
|
|
5251
|
+
* (the screen-reader data table still carries every row), and draws the
|
|
5252
|
+
* trendline above the dots even when `trendline.layer` is `'below'`.
|
|
5253
|
+
* Tooltips, hover, and click callbacks work the same in both modes.
|
|
5254
|
+
*
|
|
5255
|
+
* Ignored with a console warning for non-point marks, and for faceted,
|
|
5256
|
+
* layered, and sparkline charts.
|
|
5257
|
+
*/
|
|
5258
|
+
renderer?: 'auto' | 'svg' | 'canvas';
|
|
5253
5259
|
/** Whether to show the tryOpenData.ai watermark. Defaults to true. */
|
|
5254
5260
|
watermark?: boolean;
|
|
5255
5261
|
/**
|
|
@@ -6283,4 +6289,4 @@ declare const CSS_TOKEN_ROOT_SELECTORS: readonly string[];
|
|
|
6283
6289
|
declare const CSS_TOKENS: readonly CssTokenDef[];
|
|
6284
6290
|
declare function cssTokenDefault(name: string, mode: 'light' | 'dark'): string;
|
|
6285
6291
|
|
|
6286
|
-
export { type A11yConfig, type A11yMetadata, ACHROMATIC_RAMP, AXIS_TITLE_GAP, AXIS_TITLE_OFFSET_COMPACT, AXIS_TITLE_OFFSET_DEFAULT, AXIS_TITLE_TRAILING_PAD, type AggregateOp, type AggregateTransform, type AnimationConfig, type AnimationEase, type AnimationPhaseConfig, type AnimationSpec, type AnimationStagger, type Annotation, type AnnotationAnchor, type AnnotationFootnote, type AnnotationOffset, type AnnotationPosition, type ArcEncoding, type ArcMark, type AreaEncoding, type AreaMark, type AxisConfig, type AxisLabelDensity, type AxisLayout, type AxisTick, BRAND_FONT_SIZE, BRAND_MIN_WIDTH, BRAND_RESERVE_WIDTH, BREAKPOINT_COMPACT_MAX, BREAKPOINT_MEDIUM_MAX, type BarColumnConfig, type BarEncoding, type BarListEncoding, type BarListLayout, type BarListRowMark, type BarListSpec, type BarListSpecWithoutData, type BarTableCell, type BaseLegendLayout, type BeeswarmEncoding, type BinParams, type BinTransform, type Breakpoint, CATEGORICAL_PALETTE, COMPACT_WIDTH, CSS_TOKENS, CSS_TOKEN_ROOT_SELECTORS, type CalculateExpression, type CalculateTransform, type CalendarEncoding, type CategoricalLegendLayout, type CategoricalPalette, type CategoryColorsConfig, type CategoryTableCell, type CellStyle, type ChannelRule, type ChartBuilderOptions, type ChartEventHandlers, type ChartLayout, type ChartSpec, type ChartSpecOverride, type ChartSpecWithoutData, type Chrome, type ChromeDefaults, type ChromeKey, type ChromeMode, type ChromeText, type ChromeTextStyle, type ChromeThemeOverride, type CircleEncoding, type ColorBlindnessType, type ColumnConfig, type CompileOptions, type CompileTableOptions, type CompileWarning, type Condition, type ConditionalValueDef, type ConnectorConfig, type ConnectorType, type ContinuousLegendBin, type ContinuousLegendLayout, type ContinuousLegendTick, type CssTokenDef, DEFAULT_THEME, DIVERGING_PALETTES, type DarkMode, type DataRow, type DateGranularity, type Display, type DivergingPalette, EXTENDED_OFFSET_STRATEGIES, type ElementEdit, type ElementRef, type Encoding, type EncodingChannel, type EncodingRule, type EndpointLabelContent, type EndpointLabelEntry, type EndpointLabelsConfig, type EndpointLabelsLayout, FOOTNOTE_LINE_HEIGHT, type FacetChannel, type FacetLayout, type FacetPanelLayout, type FieldFormatContext, type FieldPredicate, type FieldRef, type FieldType, type FillPatternType, type FilterPredicate, type FilterTransform, type FlagTableCell, type FoldTransform, GRAPH_ENCODING_RULES, type GradientColorStop, type GradientDef, type GradientLegendLayout, type GradientStop, type GraphAnimationConfig, type GraphAnimationSpec, type GraphChannelRule, type GraphEdge, type GraphEdgeLayout, type GraphEncoding, type GraphEncodingChannel, type GraphInteractionConfig, type GraphLayout, type GraphLayoutConfig, type GraphNode, type GraphNodeLayout, type GraphSpec, type GraphSpecWithoutData, type Gridline, HEIGHT_CRAMPED_MAX, HEIGHT_SHORT_MAX, HPAD_COMPACT_FRACTION, HPAD_COMPACT_MIN, type HeatmapColumnConfig, type HeatmapTableCell, type HeightClass, type ImageColumnConfig, type ImageTableCell, LABEL_GAP_COMPACT, LABEL_GAP_DEFAULT, LABEL_GAP_NARROW_MAX, type LabelCandidate, type LabelConfig, type LabelDensity, type LabelMode, type LabelPriority, type LabelSpec, type LayerSpec, type LayoutStrategy, type LegendChannel, type LegendConfig, type LegendEntry, type LegendEntryPosition, type LegendLayout, type LegendPosition, type LineEncoding, type LineMark, type LinearGradient, type LogicalAnd, type LogicalNot, type LogicalOr, type LollipopEncoding, MARK_DISPLAY_NAMES, MARK_ENCODING_RULES, MARK_TYPES, MAX_LEFT_LABEL_FRACTION_COMPACT, MAX_LEFT_LABEL_FRACTION_DEFAULT, MAX_LEFT_LABEL_FRACTION_MEDIUM, MAX_LEFT_LABEL_FRACTION_MEDIUM_MAX, MAX_SR_TABLE_ROWS, type
|
|
6292
|
+
export { type A11yConfig, type A11yMetadata, ACHROMATIC_RAMP, AXIS_TITLE_GAP, AXIS_TITLE_OFFSET_COMPACT, AXIS_TITLE_OFFSET_DEFAULT, AXIS_TITLE_TRAILING_PAD, type AggregateOp, type AggregateTransform, type AnimationConfig, type AnimationEase, type AnimationPhaseConfig, type AnimationSpec, type AnimationStagger, type Annotation, type AnnotationAnchor, type AnnotationFootnote, type AnnotationOffset, type AnnotationPosition, type ArcEncoding, type ArcMark, type AreaEncoding, type AreaMark, type AxisConfig, type AxisLabelDensity, type AxisLayout, type AxisTick, BRAND_FONT_SIZE, BRAND_MIN_WIDTH, BRAND_RESERVE_WIDTH, BREAKPOINT_COMPACT_MAX, BREAKPOINT_MEDIUM_MAX, type BarColumnConfig, type BarEncoding, type BarListEncoding, type BarListLayout, type BarListRowMark, type BarListSpec, type BarListSpecWithoutData, type BarTableCell, type BaseLegendLayout, type BeeswarmEncoding, type BinParams, type BinTransform, type Breakpoint, CATEGORICAL_PALETTE, COMPACT_WIDTH, CSS_TOKENS, CSS_TOKEN_ROOT_SELECTORS, type CalculateExpression, type CalculateTransform, type CalendarEncoding, type CategoricalLegendLayout, type CategoricalPalette, type CategoryColorsConfig, type CategoryTableCell, type CellStyle, type ChannelRule, type ChartBuilderOptions, type ChartEventHandlers, type ChartLayout, type ChartSpec, type ChartSpecOverride, type ChartSpecWithoutData, type Chrome, type ChromeDefaults, type ChromeKey, type ChromeMode, type ChromeText, type ChromeTextStyle, type ChromeThemeOverride, type CircleEncoding, type ColorBlindnessType, type ColumnConfig, type CompileOptions, type CompileTableOptions, type CompileWarning, type Condition, type ConditionalValueDef, type ConnectorConfig, type ConnectorType, type ContinuousLegendBin, type ContinuousLegendLayout, type ContinuousLegendTick, type CssTokenDef, DEFAULT_THEME, DIVERGING_PALETTES, type DarkMode, type DataRow, type DateGranularity, type Display, type DivergingPalette, EXTENDED_OFFSET_STRATEGIES, type ElementEdit, type ElementRef, type Encoding, type EncodingChannel, type EncodingRule, type EndpointLabelContent, type EndpointLabelEntry, type EndpointLabelsConfig, type EndpointLabelsLayout, FOOTNOTE_LINE_HEIGHT, type FacetChannel, type FacetLayout, type FacetPanelLayout, type FieldFormatContext, type FieldPredicate, type FieldRef, type FieldType, type FillPatternType, type FilterPredicate, type FilterTransform, type FlagTableCell, type FoldTransform, GRAPH_ENCODING_RULES, type GeoMapBorders, type GeoMapEncoding, type GeoMapFeatureMark, type GeoMapFocus, type GeoMapFocusLayout, type GeoMapGeo, type GeoMapLayout, type GeoMapPointMark, type GeoMapPointsLayer, type GeoMapProjection, type GeoMapSpec, type GeoMapSpecWithoutData, type GradientColorStop, type GradientDef, type GradientLegendLayout, type GradientStop, type GraphAnimationConfig, type GraphAnimationSpec, type GraphChannelRule, type GraphEdge, type GraphEdgeLayout, type GraphEncoding, type GraphEncodingChannel, type GraphInteractionConfig, type GraphLayout, type GraphLayoutConfig, type GraphNode, type GraphNodeLayout, type GraphSpec, type GraphSpecWithoutData, type Gridline, HEIGHT_CRAMPED_MAX, HEIGHT_SHORT_MAX, HPAD_COMPACT_FRACTION, HPAD_COMPACT_MIN, type HeatmapColumnConfig, type HeatmapTableCell, type HeightClass, type ImageColumnConfig, type ImageTableCell, LABEL_GAP_COMPACT, LABEL_GAP_DEFAULT, LABEL_GAP_NARROW_MAX, type LabelCandidate, type LabelConfig, type LabelDensity, type LabelMode, type LabelPriority, type LabelSpec, type LayerSpec, type LayoutStrategy, type LegendChannel, type LegendConfig, type LegendEntry, type LegendEntryPosition, type LegendLayout, type LegendPosition, type LineEncoding, type LineMark, type LinearGradient, type LogicalAnd, type LogicalNot, type LogicalOr, type LollipopEncoding, MARK_DISPLAY_NAMES, MARK_ENCODING_RULES, MARK_TYPES, MAX_LEFT_LABEL_FRACTION_COMPACT, MAX_LEFT_LABEL_FRACTION_DEFAULT, MAX_LEFT_LABEL_FRACTION_MEDIUM, MAX_LEFT_LABEL_FRACTION_MEDIUM_MAX, MAX_SR_TABLE_ROWS, type Margins, type Mark, type MarkAria, type MarkDef, type MarkEvent, type MarkType, type MeasureTextFn, type Metric, NARROW_VIEWPORT_MAX, type NodeOverride, type NumberFormatter, OFFSET_STRATEGIES, type OffsetStrategy, type PaginationState, type ParliamentEncoding, type Point, type PointEncoding, type PointMark, type RadialGradient, type RangeAnnotation, type RangeEncoding, type Rect, type RectEncoding, type RectMark, type RefLineAnnotation, type RelativeTimeRef, type ResolveConfig, type ResolveMode, type ResolvedAnimation, type ResolvedAnimationPhase, type ResolvedAnnotation, type ResolvedChrome, type ResolvedChromeElement, type ResolvedColumn, type ResolvedFillPattern, type ResolvedLabel, type ResolvedMetricBar, type ResolvedMetricCell, type ResolvedSeriesSearch, type ResolvedTheme, type ResolvedYouDrawIt, type ResponsiveConfig, type RuleMarkLayout, SEQUENTIAL_PALETTES, SUPPORTED_SCHEME_NAMES, type SankeyEncoding, type SankeyLayout, type SankeyLinkColor, type SankeyLinkMark, type SankeyNodeAlign, type SankeyNodeMark, type SankeySpec, type SankeySpecWithoutData, type ScaleConfig, type ScaleInvert, type ScaleType, type SequentialPalette, type SeriesSearchConfig, type SeriesStrategy, type SeriesStyle, type SizeLegendCircle, type SizeLegendLayout, type SortByField, type SortState, type SparklineColumnConfig, type SparklineData, type SparklineTableCell, type StoredVizSpec, TICK_LABEL_OFFSET, TICK_LINE_HEIGHT_FACTOR, TOP_PAD_EXTRA_NARROW, TOP_PAD_NARROW_MAX, type TableBuilderOptions, type TableCell, type TableCellBase, type TableLayout, type TableRow, type TableSpec, type TableSpecWithoutData, type TextAnnotation, type TextEncoding, type TextMarkLayout, type TextStyle, type TextTableCell, type Theme, type ThemeChromeDefaults, type ThemeColors, type ThemeConfig, type ThemeFontSizes, type ThemeFontWeights, type ThemeFonts, type ThemeSpacing, type TickEncoding, type TickMarkLayout, type TileMapBuilderOptions, type TileMapEncoding, type TileMapLayout, type TileMapPalette, type TileMapSpec, type TileMapSpecWithoutData, type TileMapTileMark, type TimeUnit, type TimeUnitTransform, type TokenValue, type TooltipContent, type TooltipField, type Transform, type UpdatePhaseConfig, type ValueDef, type VizSpec, type WaffleEncoding, type WindowFieldDef, type WindowOp, type WindowSortField, type WindowTransform, type XAxisExtentInput, X_AXIS_BAND_HEIGHT, X_AXIS_ROTATED_EXTENT_CAP, X_AXIS_TITLE_BAND, X_AXIS_TITLE_BAND_ROTATED, type YouDrawItConfig, type YouDrawItSample, type YouDrawItYInvert, abbreviateNumber, adaptColorForDarkMode, adaptForLightLineStroke, adaptTheme, areaChart, axisTitleOffset, barChart, buildCompactStepFormatter, buildD3Formatter, buildTemporalFormatter, checkPaletteDistinguishability, columnChart, computeChrome, computeFieldFormatContext, computeLabelBounds, computeXAxisExtentFromLabels, contrastRatio, cssTokenDefault, dataTable, deepMergeSpec, defaultNumberFormatter, detectCollision, donutChart, dotChart, editorial, elementRef, essay, estimateTextWidth, findAccessibleColor, footnoteBandHeight, formatCurrency, formatDate, formatNumber, formatOrdinal, formatPercent, generateAltText, generateAriaLabels, generateDataTable, getAxisTitleOffset, getBreakpoint, getHeightClass, getLayoutStrategy, getRepresentativeColor, heuristicMeasure, inferFieldType, isAxislessMark, isBarListSpec, isChartSpec, isConditionalDef, isEncodingChannel, isGeoMapSpec, isGradientDef, isGraphSpec, isLayerSpec, isOpaqueColor, isRangeAnnotation, isRefLineAnnotation, isSankeySpec, isTableSpec, isTextAnnotation, isTileMapSpec, isValueDef, isYearContext, lineChart, maxRotatedLabelWidth, meetsAA, overlapArea, pickLabelColor, pieChart, resolveCollisions, resolveMarkDef, resolveMarkType, resolveMeasurer, resolveNumberFormatter, resolveSchemeName, resolveTheme, scatterChart, simulateColorBlindness, textAscent, tileMap, truncateRotatedLabel, truncateToWidth, wire, wrapText };
|
package/dist/index.js
CHANGED
|
@@ -284,7 +284,7 @@ function isTileMapSpec(spec) {
|
|
|
284
284
|
function isBarListSpec(spec) {
|
|
285
285
|
return "type" in spec && spec.type === "barlist";
|
|
286
286
|
}
|
|
287
|
-
function
|
|
287
|
+
function isGeoMapSpec(spec) {
|
|
288
288
|
return "type" in spec && spec.type === "map";
|
|
289
289
|
}
|
|
290
290
|
function isTextAnnotation(annotation) {
|
|
@@ -1277,7 +1277,7 @@ function getWidthStrategy(breakpoint) {
|
|
|
1277
1277
|
case "full":
|
|
1278
1278
|
return {
|
|
1279
1279
|
labelMode: "all",
|
|
1280
|
-
legendPosition: "
|
|
1280
|
+
legendPosition: "top",
|
|
1281
1281
|
annotationPosition: "inline",
|
|
1282
1282
|
axisLabelDensity: "full",
|
|
1283
1283
|
chromeMode: "full",
|
|
@@ -4118,10 +4118,10 @@ export {
|
|
|
4118
4118
|
isChartSpec,
|
|
4119
4119
|
isConditionalDef,
|
|
4120
4120
|
isEncodingChannel,
|
|
4121
|
+
isGeoMapSpec,
|
|
4121
4122
|
isGradientDef,
|
|
4122
4123
|
isGraphSpec,
|
|
4123
4124
|
isLayerSpec,
|
|
4124
|
-
isMapSpec,
|
|
4125
4125
|
isOpaqueColor,
|
|
4126
4126
|
isRangeAnnotation,
|
|
4127
4127
|
isRefLineAnnotation,
|