Skip to content

convertToPixel(value, finder?) ​

convertToPixel convert values ​​to coordinates.

Reference ​

typescript
(
  value: {
    dataIndex?: number
    timestamp?: number
    value?: number
  } | Array<{
    dataIndex?: number
    timestamp?: number
    value?: number
  }>,
  finder?: {
    paneId?: string
    absolute?: boolean
  }
) => { x: number?, y?: number } | Array<{ x?: number, y?: number }>

Parameters ​

  • value The value to be converted can be an object or an array.
    • dataIndex Data index. If both dataIndex and timestamp exist, the conversion is based on the index.
    • timestamp Timestamp.
    • value The corresponding y-axis value.
  • finder Filter conditions.
    • paneId Pane id.
    • absolute Whether it is an absolute coordinate, only applies to the y-axis.

返回值 ​

convertToPixel returns { x?: number, y?: number } or Array<{ x?: number, y?: number }> .

Usage ​

Basic usage ​