@opendata-ai/openchart-core 6.27.0 → 6.28.2

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
@@ -261,9 +261,10 @@ interface MarkDef {
261
261
  * Show point markers on line/area marks.
262
262
  * - true: filled circles at each data point
263
263
  * - 'transparent': invisible hover targets (legacy behavior)
264
+ * - 'endpoints': show only first and last point per series
264
265
  * - false: no point marks (default; uses voronoi overlay for tooltips)
265
266
  */
266
- point?: boolean | 'transparent';
267
+ point?: boolean | 'transparent' | 'endpoints';
267
268
  /**
268
269
  * Curve interpolation for line/area marks.
269
270
  * Maps to d3-shape curve factories.
@@ -275,8 +276,10 @@ interface MarkDef {
275
276
  innerRadius?: number;
276
277
  /** Outer radius for arc marks. */
277
278
  outerRadius?: number;
278
- /** Corner radius for rect/bar marks. */
279
- cornerRadius?: number;
279
+ /** Corner radius for rect/bar marks. 'pill' sets rx to half the bar thickness. */
280
+ cornerRadius?: number | 'pill';
281
+ /** Fixed bar thickness in pixels for bar/column marks. When set, bars are this height (horizontal) or width (vertical), centered within the band. */
282
+ size?: number;
280
283
  /** Whether the mark is filled (vs stroked only). */
281
284
  filled?: boolean;
282
285
  /** Default opacity (0-1). */
@@ -384,8 +387,8 @@ interface EncodingChannel {
384
387
  type: FieldType;
385
388
  /** Optional aggregate to apply before encoding. */
386
389
  aggregate?: AggregateOp;
387
- /** Axis configuration. Only relevant for x and y channels. */
388
- axis?: AxisConfig;
390
+ /** Axis configuration. Set to `false` to suppress axis entirely (no space reserved). */
391
+ axis?: AxisConfig | false;
389
392
  /** Scale configuration. */
390
393
  scale?: ScaleConfig;
391
394
  /**
@@ -393,7 +396,15 @@ interface EncodingChannel {
393
396
  * - undefined | true | 'zero': stack from zero baseline (default)
394
397
  * - 'normalize': stack and normalize to fraction of total (0-1 per category)
395
398
  * - 'center': center stacks around zero (streamgraph style)
396
- * - null | false: no stacking (grouped/dodged side-by-side)
399
+ * - null | false: no stacking -- renders grouped (side-by-side) bars instead
400
+ *
401
+ * Use `stack: null` to get grouped/dodged bars. This is the idiomatic way to
402
+ * compare values across categories side-by-side rather than stacked on top of
403
+ * each other. Without it, multi-series bar data stacks by default.
404
+ *
405
+ * @example
406
+ * // Side-by-side grouped bars (comparing 2018 vs 2022 wages by firm size):
407
+ * "x": { "field": "pay", "type": "quantitative", "stack": null }
397
408
  */
398
409
  stack?: boolean | 'zero' | 'normalize' | 'center' | null;
399
410
  /**
@@ -735,6 +746,8 @@ interface LabelConfig {
735
746
  format?: string;
736
747
  /** Literal string prepended to each formatted label value (e.g. "-" or "$"). */
737
748
  prefix?: string;
749
+ /** Fixed CSS color for all labels. Overrides the default fill-derived color. */
750
+ color?: string;
738
751
  /** Per-series pixel offsets for fine-tuning label positions, keyed by series name. */
739
752
  offsets?: Record<string, AnnotationOffset>;
740
753
  }
@@ -1160,7 +1173,7 @@ interface TileMapEncoding {
1160
1173
  tooltip?: EncodingChannel | EncodingChannel[];
1161
1174
  }
1162
1175
  /** Sequential color palette names available for tile maps. */
1163
- type TileMapPalette = 'blue' | 'green' | 'orange' | 'purple';
1176
+ type TileMapPalette = 'blue' | 'green' | 'orange' | 'purple' | 'teal';
1164
1177
  interface TileMapSpec {
1165
1178
  /** Discriminant: always "tilemap". */
1166
1179
  type: 'tilemap';
@@ -1195,6 +1208,51 @@ interface TileMapSpec {
1195
1208
  */
1196
1209
  valueFormat?: string;
1197
1210
  }
1211
+ interface BarListSpec {
1212
+ /** Discriminant: always "barlist". */
1213
+ type: 'barlist';
1214
+ /**
1215
+ * Data rows. Each row must have at least a label field and a value field.
1216
+ * Rendered as a ranked list of horizontal bars.
1217
+ */
1218
+ data: DataRow[];
1219
+ /** Encoding channels mapping data fields to visual properties. */
1220
+ encoding: BarListEncoding;
1221
+ /** Bar height in pixels. Defaults to 6. */
1222
+ barHeight?: number;
1223
+ /** Corner radius: number in px or "pill" for fully rounded ends. Defaults to "pill". */
1224
+ cornerRadius?: number | 'pill';
1225
+ /** Maximum number of rows to show. Defaults to 20. */
1226
+ maxItems?: number;
1227
+ /** Editorial chrome (title, subtitle, source, byline, footer). */
1228
+ chrome?: Chrome;
1229
+ /** Theme configuration overrides. */
1230
+ theme?: ThemeConfig;
1231
+ /** Dark mode behavior. Defaults to "off". */
1232
+ darkMode?: DarkMode;
1233
+ /** Whether to show the tryOpenData.ai watermark. Defaults to true. */
1234
+ watermark?: boolean;
1235
+ /** Animation configuration for entrance animations. */
1236
+ animation?: AnimationSpec;
1237
+ /**
1238
+ * d3-format string applied to bar values and tooltips.
1239
+ * Examples: ".1f" for one decimal, "$,.0f" for currency, "~s" for SI.
1240
+ */
1241
+ valueFormat?: string;
1242
+ }
1243
+ /** Encoding channels for a barlist visualization. */
1244
+ interface BarListEncoding {
1245
+ /** Label field (required, nominal). The category name for each row. */
1246
+ label: EncodingChannel;
1247
+ /** Value field (required, quantitative). The numeric value that drives bar width. */
1248
+ value: EncodingChannel;
1249
+ /** Subtitle field (optional, nominal). Secondary text shown beside the label in lighter weight. */
1250
+ subtitle?: EncodingChannel;
1251
+ /** Color field (optional, nominal). Maps categories to colors from the palette. When omitted, colors cycle by row index. */
1252
+ color?: EncodingChannel;
1253
+ /** Tooltip encoding (optional). */
1254
+ tooltip?: EncodingChannel | EncodingChannel[];
1255
+ }
1198
1256
  /**
1199
1257
  * Top-level visualization spec: union discriminated by structural shape.
1200
1258
  *
@@ -1204,8 +1262,9 @@ interface TileMapSpec {
1204
1262
  * - GraphSpec: has `type: 'graph'`
1205
1263
  * - SankeySpec: has `type: 'sankey'`
1206
1264
  * - TileMapSpec: has `type: 'tilemap'`
1265
+ * - BarListSpec: has `type: 'barlist'`
1207
1266
  */
1208
- type VizSpec = ChartSpec | LayerSpec | TableSpec | GraphSpec | SankeySpec | TileMapSpec;
1267
+ type VizSpec = ChartSpec | LayerSpec | TableSpec | GraphSpec | SankeySpec | TileMapSpec | BarListSpec;
1209
1268
  /** Chart spec without runtime data, for persistence/storage. */
1210
1269
  type ChartSpecWithoutData = Omit<ChartSpec, 'data'>;
1211
1270
  /** Table spec without runtime data and columns, for persistence/storage. Columns can be auto-generated via dataTable(). */
@@ -1216,8 +1275,10 @@ type GraphSpecWithoutData = Omit<GraphSpec, 'nodes' | 'edges'>;
1216
1275
  type SankeySpecWithoutData = Omit<SankeySpec, 'data'>;
1217
1276
  /** TileMap spec without runtime data, for persistence/storage. */
1218
1277
  type TileMapSpecWithoutData = Omit<TileMapSpec, 'data'>;
1278
+ /** BarList spec without runtime data, for persistence/storage. */
1279
+ type BarListSpecWithoutData = Omit<BarListSpec, 'data'>;
1219
1280
  /** Union of data-stripped spec types for persistence/storage. */
1220
- type StoredVizSpec = ChartSpecWithoutData | TableSpecWithoutData | GraphSpecWithoutData | SankeySpecWithoutData | TileMapSpecWithoutData;
1281
+ type StoredVizSpec = ChartSpecWithoutData | TableSpecWithoutData | GraphSpecWithoutData | SankeySpecWithoutData | TileMapSpecWithoutData | BarListSpecWithoutData;
1221
1282
  /** Logical AND combinator for filter predicates. */
1222
1283
  interface LogicalAnd<T> {
1223
1284
  and: T[];
@@ -1414,6 +1475,8 @@ declare function isGraphSpec(spec: VizSpec | Record<string, unknown>): spec is G
1414
1475
  declare function isSankeySpec(spec: VizSpec | Record<string, unknown>): spec is SankeySpec;
1415
1476
  /** Check if a spec is a TileMapSpec. */
1416
1477
  declare function isTileMapSpec(spec: VizSpec | Record<string, unknown>): spec is TileMapSpec;
1478
+ /** Check if a spec is a BarListSpec. */
1479
+ declare function isBarListSpec(spec: VizSpec | Record<string, unknown>): spec is BarListSpec;
1417
1480
  /** Check if an annotation is a TextAnnotation. */
1418
1481
  declare function isTextAnnotation(annotation: Annotation): annotation is TextAnnotation;
1419
1482
  /** Check if an annotation is a RangeAnnotation. */
@@ -1542,6 +1605,11 @@ declare const elementRef: {
1542
1605
  * Fired by the `onEdit` callback when any editable chart element is modified.
1543
1606
  * Covers repositioning (drag), deletion (Delete key), and text editing (double-click).
1544
1607
  * Selection events (onSelect/onDeselect) are separate callbacks, not part of this union.
1608
+ *
1609
+ * For the `annotation` variant:
1610
+ * - `annotation` is the ORIGINAL spec annotation (may have a stale or missing offset)
1611
+ * - `offset` is the NEW accumulated position after the drag completes
1612
+ * - To persist a drag edit back into your spec: `{ ...edit.annotation, offset: edit.offset }`
1545
1613
  */
1546
1614
  type ElementEdit = {
1547
1615
  type: 'annotation';
@@ -2293,6 +2361,8 @@ interface GradientColorStop {
2293
2361
  offset: number;
2294
2362
  /** CSS color value. */
2295
2363
  color: string;
2364
+ /** Optional stop-opacity (0 to 1). */
2365
+ opacity?: number;
2296
2366
  }
2297
2367
  /** Gradient legend for continuous color scales. */
2298
2368
  interface GradientLegendLayout extends BaseLegendLayout {
@@ -2743,6 +2813,8 @@ interface TileMapTileMark {
2743
2813
  size: number;
2744
2814
  /** Fill color from the sequential color scale. */
2745
2815
  fill: string;
2816
+ /** Fill opacity (0-1). Used for opacity-based encoding. */
2817
+ fillOpacity: number;
2746
2818
  /** Tile border color. */
2747
2819
  stroke: string;
2748
2820
  /** Tile border width. */
@@ -2800,6 +2872,79 @@ interface TileMapLayout {
2800
2872
  /** Text measurement function for the rendering adapter. */
2801
2873
  measureText: MeasureTextFn;
2802
2874
  }
2875
+ /** A resolved bar list row with computed positions and visual properties. */
2876
+ interface BarListRowMark {
2877
+ type: 'barlist-row';
2878
+ /** Row index (0-based). */
2879
+ index: number;
2880
+ /** Row top y position. */
2881
+ y: number;
2882
+ /** Row height (includes spacing). */
2883
+ height: number;
2884
+ /** Label text for this row. */
2885
+ label: ResolvedLabel;
2886
+ /** Optional subtitle text. */
2887
+ subtitle?: ResolvedLabel;
2888
+ /** Track rectangle (the muted background bar). */
2889
+ track: {
2890
+ x: number;
2891
+ y: number;
2892
+ width: number;
2893
+ height: number;
2894
+ cornerRadius: number;
2895
+ };
2896
+ /** Fill bar rectangle (the colored bar proportional to value). */
2897
+ bar: {
2898
+ x: number;
2899
+ y: number;
2900
+ width: number;
2901
+ height: number;
2902
+ cornerRadius: number;
2903
+ fill: string;
2904
+ };
2905
+ /** Formatted value label (right-aligned). */
2906
+ valueLabel: ResolvedLabel;
2907
+ /** Raw numeric value. */
2908
+ value: number;
2909
+ /** Formatted value string. */
2910
+ formattedValue: string;
2911
+ /** Accessibility attributes. */
2912
+ aria: MarkAria;
2913
+ /** Index for stagger animation ordering. */
2914
+ animationIndex: number;
2915
+ /** Original data row. */
2916
+ data: Record<string, unknown>;
2917
+ }
2918
+ /**
2919
+ * BarListLayout: the complete engine output for bar list visualizations.
2920
+ *
2921
+ * Contains everything an adapter needs to render the bar list: dimensions,
2922
+ * chrome, row marks, tooltip descriptors, and accessibility metadata.
2923
+ */
2924
+ interface BarListLayout {
2925
+ /** The bar list drawing area. */
2926
+ area: Rect;
2927
+ /** Resolved chrome text elements with positions and styles. */
2928
+ chrome: ResolvedChrome;
2929
+ /** Resolved row marks with positions, colors, and labels. */
2930
+ rows: BarListRowMark[];
2931
+ /** Tooltip content descriptors keyed by row index. */
2932
+ tooltipDescriptors: Map<string, TooltipContent>;
2933
+ /** Accessibility metadata. */
2934
+ a11y: A11yMetadata;
2935
+ /** Resolved theme. */
2936
+ theme: ResolvedTheme;
2937
+ /** Total SVG width in pixels. */
2938
+ width: number;
2939
+ /** Total SVG height in pixels. */
2940
+ height: number;
2941
+ /** Resolved animation config (undefined if animation is disabled). */
2942
+ animation: ResolvedAnimation | undefined;
2943
+ /** Whether to render the watermark. */
2944
+ watermark: boolean;
2945
+ /** Text measurement function for the rendering adapter. */
2946
+ measureText: MeasureTextFn;
2947
+ }
2803
2948
  /** Function signature for text measurement provided by adapters. */
2804
2949
  type MeasureTextFn = (text: string, fontSize: number, fontWeight?: number) => {
2805
2950
  width: number;
@@ -3501,4 +3646,4 @@ interface TileMapBuilderOptions {
3501
3646
  */
3502
3647
  declare function tileMap(data: Record<string, number | null> | DataRow[], options?: TileMapBuilderOptions): TileMapSpec;
3503
3648
 
3504
- export { type A11yMetadata, 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 AnnotationOffset, type AnnotationPosition, type ArcMark, 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 BarTableCell, type BaseLegendLayout, type BinParams, type BinTransform, type Breakpoint, CATEGORICAL_PALETTE, CHART_ENCODING_RULES, CHART_TYPES, COMPACT_WIDTH, type CalculateExpression, type CalculateTransform, 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 ChartType, type Chrome, type ChromeDefaults, type ChromeKey, type ChromeMode, type ChromeText, type ChromeTextStyle, type ColorBlindnessType, type ColumnConfig, type CompileOptions, type CompileTableOptions, type Condition, type ConditionalValueDef, 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 FieldPredicate, type FieldRef, type FieldType, type FilterPredicate, type FilterTransform, type FlagTableCell, type FoldTransform, GRAPH_ENCODING_RULES, type GradientColorStop, type GradientDef, type GradientLegendLayout, type GradientStop, type GraphChannelRule, type GraphEdge, type GraphEdgeLayout, type GraphEncoding, type GraphEncodingChannel, 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 LegendConfig, type LegendEntry, type LegendLayout, type LegendPosition, type LineMark, type LinearGradient, type LogicalAnd, type LogicalNot, type LogicalOr, 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, type Margins, type Mark, type MarkAria, type MarkDef, type MarkEvent, type MarkType, type MeasureTextFn, NARROW_VIEWPORT_MAX, type NodeOverride, OFFSET_STRATEGIES, type OffsetStrategy, type PaginationState, type Point, type PointMark, type RadialGradient, type RangeAnnotation, type Rect, type RectMark, type RefLineAnnotation, type RelativeTimeRef, type ResolveConfig, type ResolveMode, type ResolvedAnimation, type ResolvedAnnotation, type ResolvedChrome, type ResolvedChromeElement, type ResolvedColumn, type ResolvedLabel, type ResolvedTheme, type RuleMarkLayout, SEQUENTIAL_PALETTES, type SankeyEncoding, type SankeyLayout, type SankeyLinkColor, type SankeyLinkMark, type SankeyNodeAlign, type SankeyNodeMark, type SankeySpec, type SankeySpecWithoutData, type ScaleConfig, type ScaleType, type SequentialPalette, type SeriesStyle, type SortState, type SparklineColumnConfig, type SparklineData, type SparklineTableCell, type StoredVizSpec, TICK_LABEL_OFFSET, 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 TextMarkLayout, type TextStyle, type TextTableCell, type Theme, type ThemeChromeDefaults, type ThemeColors, type ThemeConfig, type ThemeFontSizes, type ThemeFontWeights, type ThemeFonts, type ThemeSpacing, type TickMarkLayout, type TileMapBuilderOptions, type TileMapEncoding, type TileMapLayout, type TileMapPalette, type TileMapSpec, type TileMapSpecWithoutData, type TileMapTileMark, type TimeUnit, type TimeUnitTransform, type TooltipContent, type TooltipField, type Transform, type VizSpec, type WindowFieldDef, type WindowOp, type WindowSortField, type WindowTransform, abbreviateNumber, adaptColorForDarkMode, adaptTheme, areaChart, barChart, buildD3Formatter, buildTemporalFormatter, checkPaletteDistinguishability, columnChart, computeChrome, computeLabelBounds, contrastRatio, dataTable, detectCollision, donutChart, dotChart, elementRef, estimateTextWidth, findAccessibleColor, formatDate, formatNumber, generateAltText, generateAriaLabels, generateDataTable, getAxisTitleOffset, getBreakpoint, getHeightClass, getLayoutStrategy, getRepresentativeColor, inferFieldType, isChartSpec, isConditionalDef, isEncodingChannel, isGradientDef, isGraphSpec, isLayerSpec, isRangeAnnotation, isRefLineAnnotation, isSankeySpec, isTableSpec, isTextAnnotation, isTileMapSpec, lineChart, meetsAA, pieChart, resolveCollisions, resolveMarkDef, resolveMarkType, resolveTheme, scatterChart, simulateColorBlindness, tileMap, wrapText };
3649
+ export { type A11yMetadata, 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 AnnotationOffset, type AnnotationPosition, type ArcMark, 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 BarListEncoding, type BarListLayout, type BarListRowMark, type BarListSpec, type BarListSpecWithoutData, type BarTableCell, type BaseLegendLayout, type BinParams, type BinTransform, type Breakpoint, CATEGORICAL_PALETTE, CHART_ENCODING_RULES, CHART_TYPES, COMPACT_WIDTH, type CalculateExpression, type CalculateTransform, 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 ChartType, type Chrome, type ChromeDefaults, type ChromeKey, type ChromeMode, type ChromeText, type ChromeTextStyle, type ColorBlindnessType, type ColumnConfig, type CompileOptions, type CompileTableOptions, type Condition, type ConditionalValueDef, 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 FieldPredicate, type FieldRef, type FieldType, type FilterPredicate, type FilterTransform, type FlagTableCell, type FoldTransform, GRAPH_ENCODING_RULES, type GradientColorStop, type GradientDef, type GradientLegendLayout, type GradientStop, type GraphChannelRule, type GraphEdge, type GraphEdgeLayout, type GraphEncoding, type GraphEncodingChannel, 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 LegendConfig, type LegendEntry, type LegendLayout, type LegendPosition, type LineMark, type LinearGradient, type LogicalAnd, type LogicalNot, type LogicalOr, 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, type Margins, type Mark, type MarkAria, type MarkDef, type MarkEvent, type MarkType, type MeasureTextFn, NARROW_VIEWPORT_MAX, type NodeOverride, OFFSET_STRATEGIES, type OffsetStrategy, type PaginationState, type Point, type PointMark, type RadialGradient, type RangeAnnotation, type Rect, type RectMark, type RefLineAnnotation, type RelativeTimeRef, type ResolveConfig, type ResolveMode, type ResolvedAnimation, type ResolvedAnnotation, type ResolvedChrome, type ResolvedChromeElement, type ResolvedColumn, type ResolvedLabel, type ResolvedTheme, type RuleMarkLayout, SEQUENTIAL_PALETTES, type SankeyEncoding, type SankeyLayout, type SankeyLinkColor, type SankeyLinkMark, type SankeyNodeAlign, type SankeyNodeMark, type SankeySpec, type SankeySpecWithoutData, type ScaleConfig, type ScaleType, type SequentialPalette, type SeriesStyle, type SortState, type SparklineColumnConfig, type SparklineData, type SparklineTableCell, type StoredVizSpec, TICK_LABEL_OFFSET, 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 TextMarkLayout, type TextStyle, type TextTableCell, type Theme, type ThemeChromeDefaults, type ThemeColors, type ThemeConfig, type ThemeFontSizes, type ThemeFontWeights, type ThemeFonts, type ThemeSpacing, type TickMarkLayout, type TileMapBuilderOptions, type TileMapEncoding, type TileMapLayout, type TileMapPalette, type TileMapSpec, type TileMapSpecWithoutData, type TileMapTileMark, type TimeUnit, type TimeUnitTransform, type TooltipContent, type TooltipField, type Transform, type VizSpec, type WindowFieldDef, type WindowOp, type WindowSortField, type WindowTransform, abbreviateNumber, adaptColorForDarkMode, adaptTheme, areaChart, barChart, buildD3Formatter, buildTemporalFormatter, checkPaletteDistinguishability, columnChart, computeChrome, computeLabelBounds, contrastRatio, dataTable, detectCollision, donutChart, dotChart, elementRef, estimateTextWidth, findAccessibleColor, formatDate, formatNumber, generateAltText, generateAriaLabels, generateDataTable, getAxisTitleOffset, getBreakpoint, getHeightClass, getLayoutStrategy, getRepresentativeColor, inferFieldType, isBarListSpec, isChartSpec, isConditionalDef, isEncodingChannel, isGradientDef, isGraphSpec, isLayerSpec, isRangeAnnotation, isRefLineAnnotation, isSankeySpec, isTableSpec, isTextAnnotation, isTileMapSpec, lineChart, meetsAA, pieChart, resolveCollisions, resolveMarkDef, resolveMarkType, resolveTheme, scatterChart, simulateColorBlindness, tileMap, wrapText };
package/dist/index.js CHANGED
@@ -215,6 +215,9 @@ function isSankeySpec(spec) {
215
215
  function isTileMapSpec(spec) {
216
216
  return "type" in spec && spec.type === "tilemap";
217
217
  }
218
+ function isBarListSpec(spec) {
219
+ return "type" in spec && spec.type === "barlist";
220
+ }
218
221
  function isTextAnnotation(annotation) {
219
222
  return annotation.type === "text";
220
223
  }
@@ -734,11 +737,16 @@ var SEQUENTIAL_PURPLE = {
734
737
  name: "purple",
735
738
  stops: ["#efedf5", "#dadaeb", "#bcbddc", "#9e9ac8", "#756bb1", "#54278f"]
736
739
  };
740
+ var SEQUENTIAL_TEAL = {
741
+ name: "teal",
742
+ stops: ["#06b6d4", "#05a3be", "#0490a8", "#037d92", "#026a7c", "#015766", "#004450"]
743
+ };
737
744
  var SEQUENTIAL_PALETTES = {
738
745
  blue: [...SEQUENTIAL_BLUE.stops],
739
746
  green: [...SEQUENTIAL_GREEN.stops],
740
747
  orange: [...SEQUENTIAL_ORANGE.stops],
741
- purple: [...SEQUENTIAL_PURPLE.stops]
748
+ purple: [...SEQUENTIAL_PURPLE.stops],
749
+ teal: [...SEQUENTIAL_TEAL.stops]
742
750
  };
743
751
  var DIVERGING_RED_BLUE = {
744
752
  name: "redBlue",
@@ -2941,6 +2949,7 @@ export {
2941
2949
  getLayoutStrategy,
2942
2950
  getRepresentativeColor,
2943
2951
  inferFieldType,
2952
+ isBarListSpec,
2944
2953
  isChartSpec,
2945
2954
  isConditionalDef,
2946
2955
  isEncodingChannel,