-
By default lightweight-charts displays only 2 digit for any price, even if the price has more precision. How to change that so I can show more or less numbers after a comma? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
Yes, it's possible. To change format of your series' data you need to override price format for your series by changing/applying options. For example, if you'd like to show 6 digits after a comma you can use the following options: series.applyOptions({
priceFormat: {
type: 'price',
precision: 6,
minMove: 0.000001,
},
}); Also, you can look at this test case for more complete example. |
Beta Was this translation helpful? Give feedback.
-
Hi. How to set zero decimal places correctly? If I use "precision: 0" this shows one decimal place. |
Beta Was this translation helpful? Give feedback.
-
this.tvWidget.applyOverrides({ |
Beta Was this translation helpful? Give feedback.
Yes, it's possible. To change format of your series' data you need to override price format for your series by changing/applying options.
For example, if you'd like to show 6 digits after a comma you can use the following options:
Also, you can look at this test case for more complete example.