UNPKG

@adaptabletools/adaptable

Version:

Powerful AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements

85 lines (84 loc) 2.81 kB
/** * Marker primitives shared by bar-chart-style Styled Columns — * Bullet Chart target markers and Range Bar value / reference markers. */ /** * Visual style of a marker drawn on a bar-chart-style track or bar — used by * Bullet Chart target markers and Range Bar value / reference markers. */ export interface BarStyleMarker { /** * Marker shape. */ Shape?: 'Line' | 'Triangle' | 'Dot' | 'Diamond'; /** * Marker colour. Defaults to the current text colour. * * @defaultValue 'var(--ab-color-text)' */ Color?: string; /** * Line thickness (for `Shape: 'Line'`) or shape size in px. */ Size?: number; } /** * Per-value cell-text overlay layout shared by Percent Bar, Bullet Chart * and Range Bar styles. Each token (`CellValue`, `PercentValue`) can be * independently placed on a 3 × 3 grid (Above/Below/Merged × Left/Center/Right). */ /** * Horizontal alignment for cell text (Cell or Percent) in Percent, Range Bar & Bullet styles (Left, Center, Right) */ export type BarStyleCellTextHorizontalAlignment = 'Left' | 'Center' | 'Right'; /** * Vertical alignment for cell text value relative to bar/chart (Above, Below, Merged) */ export type BarStyleCellTextVerticalAlignment = 'Above' | 'Below' | 'Merged'; /** * Placement of cell text value (Cell or Percent) around the bar/chart * * @defaultValue `{ Horizontal: 'Left', Vertical: 'Below' }` */ export interface BarStyleCellTextPlacement { /** * Horizontal alignment within its vertical band. * * @defaultValue 'Left' */ Horizontal?: BarStyleCellTextHorizontalAlignment; /** * Vertical position relative to the bar/chart. * * @defaultValue 'Below' */ Vertical?: BarStyleCellTextVerticalAlignment; } /** * Per-value cell-text layout: each value (Cell Value, Percent Value) can be * independently placed on the 3 × 3 grid (Above/Below/Merged × Left/Center/Right). * * A value is shown only when its key is present. When both values land on the * same horizontal slot at the same vertical position they are concatenated with * a single space (Cell Value first, then Percent Value). */ export interface BarStyleCellTextLayout { /** * Placement of the formatted cell value. */ CellValue?: BarStyleCellTextPlacement; /** * Placement of the percent value (the cell value's position along the bar's * `[min, max]` scale as a 0–100% reading). */ PercentValue?: BarStyleCellTextPlacement; } /** * Cell-text overlay configuration shared by Percent Bar, Range Bar and Bullet Chart. */ export interface BarStyleCellTextProperties { /** * Per-value placement on the 3 × 3 grid around / on the bar/chart. */ CellTextLayout?: BarStyleCellTextLayout; }