File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
packages/oraidex-common-ui
src/components/TVChartContainer Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @oraichain/oraidex-common-ui" ,
3- "version" : " 1.0.31 " ,
3+ "version" : " 1.0.32 " ,
44 "files" : [
55 " dist/"
66 ],
Original file line number Diff line number Diff line change @@ -55,6 +55,9 @@ export type TVChartContainerProsp = {
5555 } > ;
5656 customExchangeName ?: string ;
5757 customOverrideChartProps ?: Overrides ;
58+ customFormatters ?: {
59+ priceFormatterFactory ?: ( symbolInfo : any , minTick : any ) => any ;
60+ } ;
5861} ;
5962
6063export default function TVChartContainer ( {
@@ -70,7 +73,8 @@ export default function TVChartContainer({
7073 customPeriodConfig,
7174 customTimeFrames,
7275 customExchangeName,
73- customOverrideChartProps
76+ customOverrideChartProps,
77+ customFormatters
7478} : TVChartContainerProsp ) {
7579 const chartContainerRef = useRef < HTMLDivElement | null > ( null ) ;
7680 const tvWidgetRef = useRef < IChartingLibraryWidget | null > ( null ) ;
@@ -150,6 +154,9 @@ export default function TVChartContainer({
150154 ...defaultChartProps . overrides ,
151155 ...( customOverrideChartProps || { } )
152156 } ,
157+ custom_formatters : {
158+ ...( customFormatters || { } )
159+ } ,
153160 debug : true ,
154161 timezone : getTradingViewTimeZone ( ) ,
155162 symbol : symbolRef . current , // Using ref to avoid unnecessary re-renders on symbol change and still have access to the latest symbol
You can’t perform that action at this time.
0 commit comments