Skip to main content

Settings Spec

Defines all chart settings.

info

Only a single Settings spec can be defined, if more than one is provided, only the last one will be used.

Compatible Specs

Settings spec is compatible with all specs but some options may not apply to all chart types.

Overrides

  • id -> '__global__settings___'
  • chartType -> ChartType.Global
  • specType -> SpecType.Settings

Props

All props can be found via SettingsProps type.

Spec Props

Inherits Spec props

LegendSpec Props

Inherits LegendSpec props

theme

  • Type: theme?: PartialTheme | PartialTheme[]

Partial theme to be merged with base or Array of partial themes to be merged with base index 0 being the highest priority (i.e. [primary, secondary, tertiary])

baseTheme

  • Type: baseTheme?: Theme
  • Default: LIGHT_THEME

Full default theme to use as base

rendering

  • Type: rendering: Rendering

rotation

  • Type: rotation: Rotation
  • Default: 0

animateData

  • Type: animateData: boolean
  • Default: true

externalPointerEvents

  • Type: externalPointerEvents: ExternalPointerEventsSettings
  • Tag: @alpha

Settings for handling external events

debug

  • Type: debug: boolean
  • Default: false

Show debug shadow elements on chart

debugState

  • Type: debugState?: boolean
  • Tag: @alpha

Show debug render state on ChartStatus component

onProjectionClick

  • Type: onProjectionClick?: ProjectionClickListener

Attach a listener for click on the projection area. The listener will be called with the current x value snapped to the closest X axis point, and an array of Y values for every groupId used in the chart.

onElementClick

  • Type: onElementClick?: ElementClickListener

onElementOver

  • Type: onElementOver?: ElementOverListener

onElementOut

  • Type: onElementOut?: BasicListener

onBrushEnd

  • Type: onBrushEnd?: BrushEndListener

onPointerUpdate

  • Type: onPointerUpdate?: PointerUpdateListener

onResize

  • Type: onResize?: ResizeListener
  • Tag: @alpha

onRenderChange

  • Type: onRenderChange?: RenderChangeListener

onWillRender

  • Type: onWillRender?: WillRenderListener

onProjectionAreaChange

  • Type: onProjectionAreaChange?: ProjectionAreaChangeListener

pointBuffer

  • Type: pointBuffer: MarkBuffer
  • Default: 10

The min distance from the rendered point circumference to highlight a cartesian data point in line/area/bubble charts.

xDomain

  • Type: xDomain?: CustomXDomain

onAnnotationClick

  • Type: onAnnotationClick?: AnnotationClickListener

allows user to set a click handler to the annotations

resizeDebounce

  • Type: resizeDebounce?: number
  • Default: DEFAULT_RESIZE_DEBOUNCE

The debounce delay used for resizing chart

pointerUpdateDebounce

  • Type: pointerUpdateDebounce?: number

debounce delay used for onPointerUpdate listener

pointerUpdateTrigger

  • Type: pointerUpdateTrigger: PointerUpdateTrigger
  • Default: PointerUpdateTrigger.X

The trigger for onPointerUpdate listener.

  • 'x' - only triggers lister when x value changes
  • 'y' - only triggers lister when y values change
  • 'both' - triggers lister when x or y values change

brushAxis

  • Type: brushAxis?: BrushAxis
  • Default: BrushAxis.X

Defines which axes are able to be brushed.

minBrushDelta

  • Type: minBrushDelta?: number
  • Default: 2

The minimum number of pixel to consider for a valid brush event (in both axis if brushAxis prop is BrushAxis.Both). For example: a min value of 2 means that the brush area needs to be at least 2 pixel wide and 2 pixel tall.

roundHistogramBrushValues

  • Type: roundHistogramBrushValues?: boolean
  • Default: false

Boolean to round brushed values to nearest step bounds.

For example a brush selection range of [1.23, 3.6] with a domain of [1, 2, 3, 4].

  • when true returns [1, 3]
  • when false returns [1.23, 3.6]

allowBrushingLastHistogramBin

  • Type: allowBrushingLastHistogramBin: boolean
  • Default: true

Boolean to allow brushing on last bucket even when outside domain or limit to end of domain.

For example a brush selection range of [1.23, 3.6] with a domain of [1, 2, 3]

  • when true returns [1.23, 3.6]
  • when false returns [1.23, 3]
info

Only applies to histogram charts

orderOrdinalBinsBy

  • Type: orderOrdinalBinsBy?: OrderBy

Orders ordinal x values

noResults

  • Type: noResults?: ComponentType | ReactChild

Render component for no results UI

ariaLabelHeadingLevel

  • Type: ariaLabelHeadingLevel: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p'
  • Default: 'p'

User can specify the heading level for the label

ariaLabel

  • Type: ariaLabel?: string

A text to label the chart

ariaLabelledBy

  • Type: ariaLabelledBy?: string

A DOM element ID for the chart label. If provided, it will override the ariaLabel prop.

ariaDescription

  • Type: ariaDescription?: string

A description about the chart.

ariaDescribedBy

  • Type: ariaDescribedBy?: string

An DOM element ID for the chart description. If provided, it will override the ariaDescription prop.

ariaUseDefaultSummary

  • Type: ariaUseDefaultSummary: boolean
  • Default: true

Renders an autogenerated summary of the chart

ariaTableCaption

  • Type: ariaTableCaption?: string

User can provide a table description of the data

locale

  • Type: locale: string
  • Default: 'en-US'

Unicode Locale Identifier