Skip to content

setCustomApi(customApi) ​

setCustomApi set some built-in APIs for charts.

Reference ​

typescript
(
  customApi: {
    formatDate?: (timestamp: number, format: string, type: number) => string
    formatBigNumber?: (value: string | number) => string
  }
) => void

Parameters ​

  • customApi Customize some APIs.
    • formatDate Formats a date.
    • formatBigNumber Format big numbers, such as 1000 is converted to 1k, 1000000 is converted to 1M, etc.

Returns ​

setCustomApi returns undefined .

Usage ​

Format date ​

Format big number ​