Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add priceFormat? #18

Open
DiMiTriFrog opened this issue Aug 24, 2022 · 1 comment
Open

How to add priceFormat? #18

DiMiTriFrog opened this issue Aug 24, 2022 · 1 comment

Comments

@DiMiTriFrog
Copy link

I dont know how to add priceFormat in wrappet, in js library is ->

const candleSeries = chart.addCandlestickSeries({
  priceFormat: {
    type: "price",
    minMove: Math.pow(10, -precision),
    precision: precision,
  },
});
@axdra
Copy link

axdra commented Aug 26, 2022

This should be possible when initializing the candlestick series, example below.

  const candlestickSeries =  [{
        data: [
          { time: '2018-10-19', open: 180.34, high: 180.99, low: 178.57, close: 179.85 },
          { time: '2018-10-22', open: 180.82, high: 181.40, low: 177.56, close: 178.75 },
          { time: '2018-10-23', open: 175.77, high: 179.49, low: 175.44, close: 178.53 },
          { time: '2018-10-24', open: 178.58, high: 182.37, low: 176.31, close: 176.97 },
          { time: '2018-10-25', open: 177.52, high: 180.50, low: 176.83, close: 179.07 },
          { time: '2018-10-26', open: 176.88, high: 177.34, low: 170.91, close: 172.23 },
          { time: '2018-10-29', open: 173.74, high: 175.99, low: 170.95, close: 173.20 },
          { time: '2018-10-30', open: 173.16, high: 176.43, low: 172.64, close: 176.24 },
          { time: '2018-10-31', open: 177.98, high: 178.85, low: 175.59, close: 175.88 },
          { time: '2018-11-01', open: 176.84, high: 180.86, low: 175.90, close: 180.46 },
          { time: '2018-11-02', open: 182.47, high: 183.01, low: 177.39, close: 179.93 },
          { time: '2018-11-05', open: 181.02, high: 182.41, low: 179.30, close: 182.19 }
        ],
        priceFormat: {
            type: "price",
            minMove: Math.pow(10, -precision),
            precision: precision,
        }
      }]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants