I'm trying to get data in realtime using sockets. But the line chart only displays the first two data even though all the data is coming in perfectly.
I had the same issue, but this was solved by providing an array of labels in the data object. This will populate the X-axes. Let me know if it works for you:
<Line data={{
labels: this.state.labels,
datasets: [
{
label: 'values',
data: this.state.values,
}
]
}}
/>
Can you answer me one thing? Does the chart animate the values? It does not for me.
See #375
Most helpful comment
I had the same issue, but this was solved by providing an array of
labelsin thedataobject. This will populate the X-axes. Let me know if it works for you:Can you answer me one thing? Does the chart animate the values? It does not for me.