-
Hi, The following code allows you to create your own candlestick chart from lightweightcharts using your own financial dataset (csv file): HTML file: " <title>Document</title> <script src="https://unpkg.com/lightweight-charts/dist/lightweight-charts.standalone.production.js"></script> <script src="name_of_corresponding_js_file.js"></script> "JS file: "const getData = async () => { // getData(); const displayChart = async () => { const domElement = document.getElementById('tvchart'); displayChart();" I have used it with my own financial dataset / csv file and it works. However, I have now used it to generate a candlestick chart using non-financial data from a csv file, but it doesn't work. Attached is the format of my financial data (date, high, low). The lightweightcharts code requires data in the format of date, open, high, low, close. I have tried removing open and close from the code so that the chart doesnt require those values, and I have also kept open and close in the code and set them to the high and low values to see if the code does indeed require at least some value for open and close. Both methods generate a chart that is blank (see screenshot attached). I have also attached a screenshot of the dataset; it is a very small dataset - perhaps this is the issue? there aren't enough values to plot? Please help. Thanks PS the data has values between 900 and 1150. The original data is between 0.9 and 1.15 but I multiplied it by 1000 because I thought perhaps the variation in the high and low values were too small to be seen on the chart, which is why the chart displays nothing. but im not sure now why nothing is appearing on the chart. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
it plotted the data when I changed the values to 1000x smaller |
Beta Was this translation helpful? Give feedback.
it plotted the data when I changed the values to 1000x smaller