Questions tagged [lightweight-charts]

Lightweight Charts is a JavaScript library created by TradingView for displaying financial charts.

Lightweight Charts is a JavaScript library created by TradingView for displaying financial charts.

126 questions
8
votes
1 answer

Getting SyntaxError when using lightweight-charts in NextJS

I'm trying to use the lightweight-charts package in my nextjs project, however when i try to call the createChart function I get this error in my nodejs console. ...\lightweight-charts\dist\lightweight-charts.esm.development.js:7 import {…
5
votes
2 answers

How to set a custom time zone for Lightweight Charts?

I've got a lightweight chart setup that looks like this. I want to add some kind of configuration so that the chart can show me the local time as opposed to the universal time being passed by a Unix timestamp, which is a couple hours offset from…
5
votes
1 answer

TradingView Lightweight Chart price seems to not scale correctly

I just added the real time data of bitcoin to my chart. There has been a peak that is so high even tradingview can't handle it... At least, on my chart. This is how it looks like: As you can see at the second of june bitcoin went up so high that it…
Allart
  • 830
  • 11
  • 33
5
votes
4 answers

How to create responsive Tradingview Lightweight Chart?

I am new to Tradingview charting library and I want to create like responsive chart. The problem is, trading view charting library requires to specify width and height. Here is the code. const chart = LightweightCharts.createChart(e, { width:…
dkregen
  • 448
  • 2
  • 6
  • 16
4
votes
1 answer

Updating lightweight-charts candlestick series results in Uncaught TypeError: Cannot read properties of undefined (reading 'year')

When running update on candlestick series I'm getting Uncaught TypeError: Cannot read properties of undefined (reading 'year'). Data is prepared the same way it was for setData and look like this: [{time: 1649068320, open: '0.15721000', high:…
Edmund Sulzanok
  • 1,883
  • 3
  • 20
  • 39
4
votes
2 answers

lightweight-charts Uncaught Error: Value is null

Lightweight Charts Version: 3.1.3 I am using your chart for the cryptocurrency trade application in Vue project but no matter what I get this error below is a sample code There is no duplicated or null data. import {createChart} from…
Milad
  • 719
  • 1
  • 10
  • 28
3
votes
3 answers

Unable to test Lightweight-Charts in React app

In my Create React App when importing the lightweight-chars like so everything's working: import { createChart } from 'lightweight-charts'; However, when running tests with: yarn test --all this error is shown: ● Test suite failed to…
valk
  • 9,363
  • 12
  • 59
  • 79
3
votes
1 answer

React-DOM: Unable to append Trading-view canvas from 'lightweight-charts' to body

Trading-view for react comes with document.body and I want to impend the canvas within the parent div. But it gets append to the end of the body. Tried quite a few possible solutions, but nothing has worked. Elements The Graph code is as…
2
votes
0 answers

Tradingview lightweight charts

Fetch is ok, incoming data granted. Problem is - put data in library. Please help. Here is the pen. https://codepen.io/disapology/pen/xxWomzB fetch( …
Alexey
  • 21
  • 2
2
votes
3 answers

How to use hourly and minute timeframes in Lightweight charts TradingView?

In the examples Lightweight charts TradingView show plotting on a daily timeframe, but I can't figure out how to correctly pass data to setData in order to use hourly and minute timeframes. Please tell me. import { createChart } from…
Sice60
  • 41
  • 1
  • 4
2
votes
1 answer

Trading veiw Lightweight graph set timescale at one hour

I am currently using lightweight chart for my candlestick graph but i am facing an issue . How can i set my data in candle stick. My data. "data": [ { "open": "1.18384", "high": "1.1845", "low": "1.18368", "close": "1.18429", …
2
votes
1 answer

how to get get price value from lightweight-charts?

I want to get the value of the point where I click on the chart. function handleClick(param) { document.getElementById('y_value').value = param.point.y; } But this returns the on-screen y-axis coordinates, not the price…
Simon
  • 61
  • 5
2
votes
1 answer

(Tradingview lightweight) Crooked line graph when switch data arrays

I'am trying to display 2 different graphs on the same canvas upon click of an onclick function. My page defaults to the 1 Min line graph and a volume(histogram) graph at the bottom. The lightweight charts can draw the line and volume graphs without…
2
votes
2 answers

Fetching the data in React

I am trying to draw a chart fetching data from a Web Api. I can see some data is getting through but I still can not get the chart drawn. Pls let me know if I am doing something wrong. import React, { Component } from 'react'; import…
John John
  • 1,305
  • 2
  • 16
  • 37
2
votes
1 answer

Can't display markers. setMarkers() function returns TypeError: t.map is not a function

I've looked at the documentation on github but I couldn't find more on markers. Here's the example they give: https://github.com/tradingview/lightweight-charts/blob/ef8cfa40cb51ee1f9a5c11bd099bc510c022b010/docs/series-basics.md#setmarkers I seem to…
Zamo
  • 33
  • 1
  • 5
1
2 3
8 9