0

I noticed that the price is not displayed correctly. I set 0.123456 but see on chart just 0.12 Please give me some advices. Thanks

Kien Bui
  • 1
  • 1
  • 1

1 Answers1

3

Copied from https://github.com/tradingview/lightweight-charts/discussions/697#discussioncomment-348803:

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,
    },
});
timocov
  • 1,088
  • 6
  • 16