Bug with chart rendering. It also occurs on your site:
https://www.scichart.com/documentation/js/current/The%20Candlestick%20Series%20type.html.
Problem description: after zooming using the scroll wheel or slider, if we change the chart type from candlestick to OHLC or vice versa, the new chart is only drawn after moving the mouse over it, and initially, only part of it is displayed.
Another related issue: after loading the chart on, for example, a daily interval (candlestick), when I change the chart to a different interval, which is by default a line chart, I get the following error: scichart2d.wasm:0x80b0f Error from chart in div userchart-15: Error: Index must be an integer. Even though we are using the same candleDataSeries, candleDataSeries is not empty and I can console log the values, there is an issue with drawing the line.
const candleDataSeries = new OhlcDataSeries(wasmContext, {
dataSeriesName: USER_CHART.DS_CANDLES,
containsNaN: false,
isSorted: true });
const candlestickSeries = new FastCandlestickRenderableSeries(wasmContext, {
strokeThickness: 1,
dataSeries: candleDataSeries,
dataPointWidth: 0.7,
id: CHART_SERIES.CANDLE,
isVisible: false, });
const lineSeries = new FastLineRenderableSeries(wasmContext, {
strokeThickness: 2,
stroke: this.theme.lineChartColor,
dataSeries: candleDataSeries,
id: CHART_SERIES.LINE,
isVisible: false, });
Is it possible to get additional information about https://www.scichart.com/questions/js/double-labels-for-line-annotations?
- Dmytro Smirnov asked 2 weeks ago
- last edited 2 weeks ago
- You must login to post comments
Hi
Thanks for reporting this. I’ve fixed the ranging issue in dev, but am still working on the series switching issue.
Can you share a bit more code regarding the error you are getting when switching to a line series? Ideally a codesandbox that reproduces the problem. Are you just switching to a different series type the same way the example switches between candlestick and ohlc, or are are you also changing the visible range?
We will take another look at the labels question and get back to you there.
Regards
David
- David Burleigh answered 2 weeks ago
- You must login to post comments
Hi,
FYI I checked if this error was occurring on the version we previously used: 3.4.672 and there everything worked correctly.
Are you just switching to a different series type the same way the example switches between candlestick and ohlc
– Yes, we have the same logic. We use OhlcDataSeries for FastCandlestickRenderableSeries, FastOhlcRenderableSeries and FastLineRenderableSeries.
On codesandbox, unfortunately, I am not able to upload the chart along with the intervals.
The logic is as follows: load data -> display 1D, OHLC chart (about 6.4k candles) -> change interval -> download data -> clear chart, dataSeries.clear() -> dataSeries.appendRange ([] of length about 300) -> display line chart, getLineSeries().isVisible -> error occurrence.
The data is in candlestickSeries before the chart is loaded.
The problem disappears if I switch to a line chart on the 1D chart before changing the interval (move the mouse to make it load). Then, when changing the interval, the graph changes correctly. I attach a file with some code snippets.”
Let me know if you need more information.
Regards,
Kamil
- Kamil Macura answered 2 weeks ago
- You must login to post comments
We just released v3.5.721 which should hopefully fix these issues. The changelog is at https://www.scichart.com/changelog/scichart-js/
Regards
David
- David Burleigh answered 9 minutes ago
- You must login to post comments
Please login first to submit.