Uncaught Error: Value is null
See original GitHub issueLightweight Charts Version: 3.1.3
I am using your chart for the cryptocurrency trade application in Vue project but no matter what I get this error below is a sample code
There is no duplicated or null data.
import {createChart} from "lightweight-charts";
export default {
data() {
return {
chartProperties: {
width: 700,
height: 300,
timeScale: {
timeVisible: true,
secondsVisible: false
},
layout: {
//backgroundColor: '#262C49', //Dark Theme
//textColor: '#80859E',
fontSize: 12,
fontFamily: 'irsans ,Calibri'
}
},
chartData: [],
candleSeries: null,
}
}
mounted() {
let cdata = [
{
close: 22750.76
high: 22759.53
low: 22750.25
open: 22752.8
time: 1608635340
},
....
];
this.chartElement = document.getElementById('chart');
this.chartProperties.width = this.chartElement.offsetWidth;
this.chart = createChart(this.chartElement, this.chartProperties);
this.candleSeries = this.chart.addCandlestickSeries();
this.candleSeries.setData(cdata);
Actual behavior:
The chart is drawn with no candlestick
and repeated error of Uncaught Error: Value is null
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Uncaught TypeError: Cannot read property 'value' of null
It has no problem when I execute this codes, but when I'm on other part of my codes this error occurs. Uncaught TypeError:...
Read more >Uncaught TypeError: Cannot read property of null - iDiallo
This error occurs when you read a property or call a method on a null object . That's because the DOM API returns...
Read more >Uncaught Error: value is null · Issue #859 - GitHub
Uncaught Error: value is null #859 ... No candles displayed and error displayed in console. Expected behavior: Candles to be displayed.
Read more >How to Fix TypeError: Null is Not an Object in JavaScript
The JavaScript error TypeError: null is not an object occurs when a property is accessed or a method is called on a null...
Read more >TypeError: Cannot read property 'value' of Null in JS
To solve the "Cannot read property 'value' of null" error, make sure that the JS script tag is placed at the bottom of...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
https://api.huobi.pro/market/history/kline?period=1min&symbol=btcusdt
data should be ordered by time in asc order, not in desc.
@miladganjali thanks, I have solve it.
const sortedData = data.sort((a, b) => a.time - b.time);