-
hi, Here is a candlestick chart I created using the lightweightcharts library from trading view: as you can see, when you hover over a candlestick, the y-axis illuminates with the value of that candlestick. if you look at the image below, I have hovered over a different candlestick, and the illuminated value on the y-axis has changed to reflect the value of the new candlestick. However, when I plot my own (non-financial) data using lightweight charts, the candlesticks don't seem to illuminate the values on the y-axis -- the y axis value remains at "0" no matter which candlestick I hover over (see images below. The candles are quite big but I need to format it to make them look smaller): Please help Here is the code, written in Visual Studio Code on Mac: HTML file: <title>Document</title> <script src="https://unpkg.com/lightweight-charts/dist/lightweight-charts.standalone.production.js"></script> <script src="Pioneer_CSV_STATIC.js"></script>JS file: const getData = async () => { const displayChart = async () => { const domElement = document.getElementById('tvchart'); // Calculate the time range of the data // Set the visible time range to include a buffer on both ends of the data range displayChart(); And here is my small dataset, formatted from left to right as data, high value, low value: 11-Apr-23,1.0395,0.9405,,,,,, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
SOLUTION: I removed "open" and "close" from the following line of code: const [time1, open, high, low, close] = row.split(','); because I don't have open and close values. just high and low. this fixed it and the y-axis now illuminates with different values depending on the candle you are hovering over |
Beta Was this translation helpful? Give feedback.
SOLUTION: I removed "open" and "close" from the following line of code:
const [time1, open, high, low, close] = row.split(',');
because I don't have open and close values. just high and low. this fixed it and the y-axis now illuminates with different values depending on the candle you are hovering over