You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
functiongenerateBar(i,target){varstep=(i%20)/1000;varbase=i/5;target.open=base*(1-step);target.high=base*(1+2*step);target.low=base*(1-2*step);target.close=base*(1+step);}functiongenerateData(){varres=[];vartime=newDate(Date.UTC(2018,0,1,0,0,0,0));for(vari=0;i<500;++i){varitem={time: time.getTime()/1000,};time.setUTCDate(time.getUTCDate()+1);generateBar(i,item);res.push(item);}returnres;}// eslint-disable-next-line no-unused-varsfunctionrunTestCase(container){varchart=LightweightCharts.createChart(container);varmainSeries=chart.addCandlestickSeries();mainSeries.setData(generateData());chart.applyOptions({leftPriceScale: {visible: true},rightPriceScale: {visible: true},timeScale: {},// this cause an error});}
Actual behavior:
A ton of errors like the following:
lightweight-charts.standalone.development.js:136 Uncaught Error: Value is null
at ensureNotNull (lightweight-charts.standalone.development.js:136)
at ChartWidget._private__adjustSizeImpl (lightweight-charts.standalone.development.js:10164)
at ChartWidget.adjustSize (lightweight-charts.standalone.development.js:10059)
at Object.callback (lightweight-charts.standalone.development.js:9989)
at lightweight-charts.standalone.development.js:1560
at Array.forEach (<anonymous>)
at Delegate.fire (lightweight-charts.standalone.development.js:1560)
at TimeScale.applyOptions (lightweight-charts.standalone.development.js:5881)
at ChartModel.applyOptions (lightweight-charts.standalone.development.js:7237)
at ChartWidget.applyOptions (lightweight-charts.standalone.development.js:10063)
Expected behavior:
No errors, both left and right price scales are visible.
Lightweight Charts Version: dev version
Steps/code to reproduce:
A test case for applying options:
Actual behavior:
A ton of errors like the following:
Expected behavior:
No errors, both left and right price scales are visible.
The issue caused by #290.
The text was updated successfully, but these errors were encountered: