Hi I have a weird issue with xChat lib(org.knowm.xchart) in java swing.
I am able to create a chart(Candle) when I first time add data to it, but when I add data to it say 5 sec after it is not drawing the candles.
- In Init i used
chart.addSeries("Candle", xData, openData, highData, lowData, closeData, volumeData);
- In Timer 5 sec after(done by using WSS onmessages i.e. the message is recieving after few seconds)
chart.updateOHLCSeries("Candle", xData, openData, highData, lowData, closeData, volumeData);
I am not able to understand why it wors first time and not 2nd time, i suspect it has something to do with the chart.updateOHLCSeries but cannot find a solution for it.
In the image above, the first 5 candles are drawn using the chart.addSeries and last 2 are being addedd in using chart.updateOHLCSeries