@opendata-ai/openchart-core 7.8.0 → 7.9.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 CHANGED
@@ -734,6 +734,12 @@ interface Encoding<TData extends DataRow = DataRow> {
734
734
  * Useful when you want separate lines per category but don't need the color to differ.
735
735
  */
736
736
  detail?: EncodingChannel<TData>;
737
+ /**
738
+ * Identity channel for data-update transitions. Maps a field whose value
739
+ * uniquely identifies each datum across updates. Mirrors Vega-Lite's key channel.
740
+ * Not visually encoded. Optional: charts derive sensible default keys.
741
+ */
742
+ key?: EncodingChannel<TData>;
737
743
  /**
738
744
  * Secondary x position. Used with `x` to define a horizontal span (rect marks, error bars).
739
745
  * Both `x` and `x2` must be quantitative.
@@ -1341,15 +1347,13 @@ interface AnimationPhaseConfig {
1341
1347
  /**
1342
1348
  * Full animation config object. Structured as enter/update/exit phases
1343
1349
  * following Vega's encoding set model.
1344
- *
1345
- * v1 implements enter only. update and exit reserved for v2.
1346
1350
  */
1347
1351
  interface AnimationConfig {
1348
1352
  /** Entrance animation when chart first renders. */
1349
1353
  enter?: AnimationPhaseConfig | boolean;
1350
- /** Transition animation when data updates. Reserved for v2. */
1354
+ /** Transition animation when data updates. */
1351
1355
  update?: AnimationPhaseConfig | boolean;
1352
- /** Exit animation when marks are removed. Reserved for v2. */
1356
+ /** Exit animation when marks are removed. */
1353
1357
  exit?: AnimationPhaseConfig | boolean;
1354
1358
  /** Delay before annotations animate in (ms after marks). Default: 200. */
1355
1359
  annotationDelay?: number;
@@ -2669,11 +2673,18 @@ interface MarkAria {
2669
2673
  */
2670
2674
  interface LineMark {
2671
2675
  type: 'line';
2676
+ /** Stable identity key for data-update transitions. */
2677
+ key?: string;
2678
+ /** Per-point identity keys parallel to `points`, for data-update transitions. */
2679
+ pointKeys?: string[];
2672
2680
  /** Ordered array of points defining the line path. */
2673
2681
  points: Point[];
2674
2682
  /** Pre-computed SVG path string (D3 monotone curve). When present, renderers
2675
2683
  * should use this instead of reconstructing straight M/L segments from points. */
2676
2684
  path?: string;
2685
+ /** Curve interpolation method used to build the path. Stored so the transition
2686
+ * driver can reconstruct paths from interpolated point positions. */
2687
+ interpolate?: string;
2677
2688
  /** Stroke color. */
2678
2689
  stroke: string;
2679
2690
  /** Stroke width in pixels. */
@@ -2711,6 +2722,10 @@ interface LineMark {
2711
2722
  */
2712
2723
  interface AreaMark {
2713
2724
  type: 'area';
2725
+ /** Stable identity key for data-update transitions. */
2726
+ key?: string;
2727
+ /** Per-point identity keys parallel to `topPoints`, for data-update transitions. */
2728
+ pointKeys?: string[];
2714
2729
  /** Upper boundary points. */
2715
2730
  topPoints: Point[];
2716
2731
  /** Lower boundary points (baseline, usually y=0). */
@@ -2719,6 +2734,8 @@ interface AreaMark {
2719
2734
  path: string;
2720
2735
  /** SVG path string for just the top boundary (for stroking the data line only). */
2721
2736
  topPath: string;
2737
+ /** Curve interpolation method used to build the path. */
2738
+ interpolate?: string;
2722
2739
  /** Fill color or gradient. */
2723
2740
  fill: string | GradientDef;
2724
2741
  /** Fill opacity. */
@@ -2754,6 +2771,8 @@ interface AreaMark {
2754
2771
  */
2755
2772
  interface RectMark {
2756
2773
  type: 'rect';
2774
+ /** Stable identity key for data-update transitions. */
2775
+ key?: string;
2757
2776
  /** X position. */
2758
2777
  x: number;
2759
2778
  /** Y position. */
@@ -2831,6 +2850,8 @@ interface ArcMark {
2831
2850
  label?: ResolvedLabel;
2832
2851
  /** Accessibility attributes. */
2833
2852
  aria: MarkAria;
2853
+ /** Stable identity key for data-update transitions. */
2854
+ key?: string;
2834
2855
  /** Index for stagger animation ordering. */
2835
2856
  animationIndex?: number;
2836
2857
  }
@@ -2840,6 +2861,8 @@ interface ArcMark {
2840
2861
  */
2841
2862
  interface PointMark {
2842
2863
  type: 'point';
2864
+ /** Stable identity key for data-update transitions. */
2865
+ key?: string;
2843
2866
  /** Center x position. */
2844
2867
  cx: number;
2845
2868
  /** Center y position. */
@@ -2871,6 +2894,8 @@ interface PointMark {
2871
2894
  */
2872
2895
  interface TextMarkLayout {
2873
2896
  type: 'textMark';
2897
+ /** Stable identity key for data-update transitions. */
2898
+ key?: string;
2874
2899
  /** X position. */
2875
2900
  x: number;
2876
2901
  /** Y position. */
@@ -2906,6 +2931,8 @@ interface TextMarkLayout {
2906
2931
  */
2907
2932
  interface RuleMarkLayout {
2908
2933
  type: 'rule';
2934
+ /** Stable identity key for data-update transitions. */
2935
+ key?: string;
2909
2936
  /** Start x position. */
2910
2937
  x1: number;
2911
2938
  /** Start y position. */
@@ -2937,6 +2964,8 @@ interface RuleMarkLayout {
2937
2964
  */
2938
2965
  interface TickMarkLayout {
2939
2966
  type: 'tick';
2967
+ /** Stable identity key for data-update transitions. */
2968
+ key?: string;
2940
2969
  /** X position. */
2941
2970
  x: number;
2942
2971
  /** Y position. */
@@ -3221,10 +3250,8 @@ interface A11yMetadata {
3221
3250
  /** Whether the visualization is keyboard-navigable. */
3222
3251
  keyboardNavigable: boolean;
3223
3252
  }
3224
- /** Resolved entrance animation config with all defaults applied. */
3225
- interface ResolvedAnimation {
3226
- /** Whether entrance animation is enabled. */
3227
- enabled: boolean;
3253
+ /** One fully-resolved animation phase. */
3254
+ interface ResolvedAnimationPhase {
3228
3255
  /** Duration in ms. */
3229
3256
  duration: number;
3230
3257
  /** Easing preset name. */
@@ -3233,6 +3260,15 @@ interface ResolvedAnimation {
3233
3260
  staggerDelay: number;
3234
3261
  /** Stagger ordering. */
3235
3262
  staggerOrder: 'index' | 'value' | 'reverse';
3263
+ }
3264
+ /** Resolved animation config. A phase is present iff that phase is enabled. */
3265
+ interface ResolvedAnimation {
3266
+ /** Entrance animation phase. Present when enter animation is enabled. */
3267
+ enter?: ResolvedAnimationPhase;
3268
+ /** Data-update transition phase. Present when update animation is enabled. */
3269
+ update?: ResolvedAnimationPhase;
3270
+ /** Exit animation phase. Present when exit animation is enabled. */
3271
+ exit?: ResolvedAnimationPhase;
3236
3272
  /** Delay before annotations animate in (ms after marks). */
3237
3273
  annotationDelay: number;
3238
3274
  }
@@ -4292,10 +4328,15 @@ declare const AXIS_TITLE_GAP = 7;
4292
4328
  * visible clearance remains. Falls back to the viewport-minimum offset when the
4293
4329
  * dynamic value would be smaller (short tick labels on wide containers).
4294
4330
  *
4331
+ * When `inline` is true the y-tick labels render inside the chart area (above
4332
+ * their gridlines) rather than in a left gutter, so the title only needs to
4333
+ * clear the chart edge — no tick-label width and no viewport-minimum floor,
4334
+ * both of which would otherwise leave a dead gap between the title and the plot.
4335
+ *
4295
4336
  * Shared by the engine (margin reservation) and the renderer (title placement)
4296
4337
  * so the reserved space always matches where the title is drawn.
4297
4338
  */
4298
- declare function axisTitleOffset(maxTickLabelWidth: number, titleFontSize: number, width: number): number;
4339
+ declare function axisTitleOffset(maxTickLabelWidth: number, titleFontSize: number, width: number, inline?: boolean): number;
4299
4340
  /**
4300
4341
  * Width below which "narrow" adjustments apply: extra iOS Safari top padding and
4301
4342
  * tighter category label gaps. Sits between compact (< 400) and medium (400–700).
@@ -4714,4 +4755,4 @@ interface TileMapBuilderOptions {
4714
4755
  */
4715
4756
  declare function tileMap(data: Record<string, number | string | null> | DataRow[], options?: TileMapBuilderOptions): TileMapSpec;
4716
4757
 
4717
- export { 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 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 ChromeThemeOverride, type CircleEncoding, 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 EndpointLabelEntry, type EndpointLabelsConfig, type EndpointLabelsLayout, type FacetChannel, type FacetLayout, type FacetPanelLayout, 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 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, type Margins, type Mark, type MarkAria, type MarkDef, type MarkEvent, type MarkType, type MeasureTextFn, type Metric, NARROW_VIEWPORT_MAX, type NodeOverride, OFFSET_STRATEGIES, type OffsetStrategy, type PaginationState, type Point, type PointEncoding, type PointMark, type RadialGradient, type RangeAnnotation, type Rect, type RectEncoding, type RectMark, type RefLineAnnotation, type RelativeTimeRef, type ResolveConfig, type ResolveMode, type ResolvedAnimation, type ResolvedAnnotation, type ResolvedChrome, type ResolvedChromeElement, type ResolvedColumn, type ResolvedLabel, type ResolvedMetricBar, type ResolvedMetricCell, type ResolvedTheme, type ResponsiveConfig, 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 SeriesStrategy, 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 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 VizSpec, type WindowFieldDef, type WindowOp, type WindowSortField, type WindowTransform, type XAxisExtentInput, X_AXIS_BAND_HEIGHT, X_AXIS_TITLE_BAND, X_AXIS_TITLE_BAND_ROTATED, abbreviateNumber, adaptColorForDarkMode, adaptForLightLineStroke, adaptTheme, areaChart, axisTitleOffset, barChart, buildD3Formatter, buildTemporalFormatter, checkPaletteDistinguishability, columnChart, computeChrome, computeLabelBounds, computeXAxisExtentFromLabels, contrastRatio, dataTable, detectCollision, donutChart, dotChart, editorial, elementRef, essay, estimateTextWidth, findAccessibleColor, formatDate, formatNumber, generateAltText, generateAriaLabels, generateDataTable, getAxisTitleOffset, getBreakpoint, getHeightClass, getLayoutStrategy, getRepresentativeColor, heuristicMeasure, inferFieldType, isBarListSpec, isChartSpec, isConditionalDef, isEncodingChannel, isGradientDef, isGraphSpec, isLayerSpec, isRangeAnnotation, isRefLineAnnotation, isSankeySpec, isTableSpec, isTextAnnotation, isTileMapSpec, lineChart, meetsAA, overlapArea, pickLabelColor, pieChart, resolveCollisions, resolveMarkDef, resolveMarkType, resolveMeasurer, resolveTheme, scatterChart, simulateColorBlindness, textAscent, tileMap, wire, wrapText };
4758
+ export { 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 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 ChromeThemeOverride, type CircleEncoding, 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 EndpointLabelEntry, type EndpointLabelsConfig, type EndpointLabelsLayout, type FacetChannel, type FacetLayout, type FacetPanelLayout, 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 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, type Margins, type Mark, type MarkAria, type MarkDef, type MarkEvent, type MarkType, type MeasureTextFn, type Metric, NARROW_VIEWPORT_MAX, type NodeOverride, OFFSET_STRATEGIES, type OffsetStrategy, type PaginationState, type Point, type PointEncoding, type PointMark, type RadialGradient, type RangeAnnotation, 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 ResolvedLabel, type ResolvedMetricBar, type ResolvedMetricCell, type ResolvedTheme, type ResponsiveConfig, 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 SeriesStrategy, 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 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 VizSpec, type WindowFieldDef, type WindowOp, type WindowSortField, type WindowTransform, type XAxisExtentInput, X_AXIS_BAND_HEIGHT, X_AXIS_TITLE_BAND, X_AXIS_TITLE_BAND_ROTATED, abbreviateNumber, adaptColorForDarkMode, adaptForLightLineStroke, adaptTheme, areaChart, axisTitleOffset, barChart, buildD3Formatter, buildTemporalFormatter, checkPaletteDistinguishability, columnChart, computeChrome, computeLabelBounds, computeXAxisExtentFromLabels, contrastRatio, dataTable, detectCollision, donutChart, dotChart, editorial, elementRef, essay, estimateTextWidth, findAccessibleColor, formatDate, formatNumber, generateAltText, generateAriaLabels, generateDataTable, getAxisTitleOffset, getBreakpoint, getHeightClass, getLayoutStrategy, getRepresentativeColor, heuristicMeasure, inferFieldType, isBarListSpec, isChartSpec, isConditionalDef, isEncodingChannel, isGradientDef, isGraphSpec, isLayerSpec, isRangeAnnotation, isRefLineAnnotation, isSankeySpec, isTableSpec, isTextAnnotation, isTileMapSpec, lineChart, meetsAA, overlapArea, pickLabelColor, pieChart, resolveCollisions, resolveMarkDef, resolveMarkType, resolveMeasurer, resolveTheme, scatterChart, simulateColorBlindness, textAscent, tileMap, wire, wrapText };
package/dist/index.js CHANGED
@@ -1209,8 +1209,11 @@ var HPAD_COMPACT_MIN = 4;
1209
1209
  var TICK_LABEL_OFFSET = 6;
1210
1210
  var AXIS_TITLE_TRAILING_PAD = 4;
1211
1211
  var AXIS_TITLE_GAP = 7;
1212
- function axisTitleOffset(maxTickLabelWidth, titleFontSize, width) {
1212
+ function axisTitleOffset(maxTickLabelWidth, titleFontSize, width, inline = false) {
1213
1213
  const halfTitleGlyph = Math.ceil(titleFontSize / 2);
1214
+ if (inline) {
1215
+ return TICK_LABEL_OFFSET + AXIS_TITLE_GAP + halfTitleGlyph;
1216
+ }
1214
1217
  const dynamic = TICK_LABEL_OFFSET + maxTickLabelWidth + AXIS_TITLE_GAP + halfTitleGlyph;
1215
1218
  return Math.max(dynamic, getAxisTitleOffset(width));
1216
1219
  }