4 min read

Through meta, you can configure the data metadata information of the chart globally, and the configuration is carried out by the unit of field. The configuration on 'meta' affects the text information of all components at the same time.

Configuration mode

Pass in a configuration with field name key, MetaOption as value, and set meta information for multiple fields at the same time.

  meta: {
    [field: string]: MetaOption


  meta: {
    sale: {
      min: 0,
      max: 100,

Detail configuration item

MetaOption The configuration is as follows:


string optional

Declare the measurement type:

Measure typeDescription
Classification measurement- cat: Classification measurement
- timeCat: Time classification measurement
Continuous measurement- linear: Linear measurement
- time:Continuous time measurement
- log: Log measurement
- pow: Pow measurement
- quantize:Segmentation measurement, where users can specify non-uniform segments
- quantile: Equal measurement, according to the distribution of data automatically calculate segmentation
Constant measurement- identity: Constant measurement


string optional

Data field display alias, scale is not internal awareness, external injection.


any[] optional

Input field, definition field.


(value: any, index?: number) => any optional

The tick formatting function affects the display of data on Axis, Legend, and Tooltip.


[number, number] optional default: [0, 1]

Output field and value field represent the range available for drawing within the drawing range.


boolean | string optional
  meta: {
      x: { sync: true },
      y: { sync: true },
      x1: { sync: 'x1' },
      x2: { sync: 'x1' },

Synchronous scale. sync: boolean is sync: [key], The above case x: { sync: true } is equivalent to x: { sync: 'x' }y: { sync: true } is equivalent to y: { sync: 'y' },Therefore, with the above configuration, the measurement operation will be synchronized for fields X and Y and fields X1 and X2 respectively.


any optional

Domain minimum value, d3 is the domain, ggplot2 is the limits, not valid under type.


any optional

The maximum value of the domain. Invalid under type.


any optional

The smallest value of the domain in strict mode. Set to force ticks to start at the smallest.


any optional

The maximum value of the domain in strict mode, which forces the ticks to end at the maximum.


number optional

Log is valid. Base.


number optional

Pow valid, exponent.


boolean optional

Automatically adjust min and Max.


any[] optional

Use to specify tick, with the highest priority.


number optional

Tick interval, only for type and time type, takes precedence over tickCount.


number optional

The tick interval is minimal and applies only to linear.


number optional default: 5

The number of tick.


number optional default: 10

Ticks maximum.


string | TickMethod optional

Algorithms for calculating ticks.


boolean optional

Only applies to scale of type: 'cat' and 'time-cat', forcing the last tick to be contained. Attention: if you have been config tickMethod (means customize ticks), will cause showLast not work


string optional

Time measures Time and is valid when TIMECAT. The underlying use [fecha] ( for the date format, so for the mask strings can directly refer to their wording.