Skip to content
Main Navigation Guide
Chart API
Instance API
ProPreviewCustomizeSponsor
9.x Docs
8.x Docs

🇬🇧 English

🇨🇳 简体中文

🇬🇧 English

🇨🇳 简体中文

Appearance

Sidebar Navigation

getDom

getSize

setStyles

getStyles

setFormatter

getFormatter

setLocale

getLocale

setTimezone

getTimezone

setThousandsSeparator

getThousandsSeparator

setDecimalFold

getDecimalFold

setOffsetRightDistance

getOffsetRightDistance

setMaxOffsetLeftDistance

setMaxOffsetRightDistance

setLeftMinVisibleBarCount

setRightMinVisibleBarCount

setBarSpace

getBarSpace

setSymbol

getSymbol

setPeriod

getPeriod

setDataLoader

resetData

getDataList

getVisibleRange

createIndicator

overrideIndicator

getIndicators

removeIndicator

createOverlay

overrideOverlay

getOverlays

removeOverlay

setPaneOptions

getPaneOptions

setZoomEnabled

isZoomEnabled

setScrollEnabled

isScrollEnabled

scrollByDistance

scrollToRealTime

scrollToDataIndex

scrollToTimestamp

zoomAtCoordinate

zoomAtDataIndex

zoomAtTimestamp

convertToPixel

convertFromPixel

executeAction

subscribeAction

unsubscribeAction

getConvertPictureUrl

resize

On this page

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 ​

Edit this page on GitHub

Last updated:

Pager
Previous pagezoomAtTimestamp
Next pageconvertFromPixel

Released under the Apache License V2.

Copyright © 2018-2025 liihuu