esnet / react-timeseries-charts

Declarative and modular timeseries charting components for React
http://software.es.net/react-timeseries-charts
Other
859 stars 283 forks source link

linechart with timeseries constructed from events #439

Closed hp8wvvvgnj6asjm7 closed 4 years ago

hp8wvvvgnj6asjm7 commented 4 years ago

From the pondjs documentation Alternatively, you can construct a TimeSeries with a list of events. These may be TimeEvents, TimeRangeEvents or IndexedEvents. Here's an example of that:

I did that and tried to plot a linechart with it. It seems like nothing is being drawn.

To make sure it's not my fault, I need to ask if this is intentional?

The examples show all timeseries made from collections. Because of the simplicity of my data, i tried to just use events.

When i try to loop trough the events() i get this:

{"time":1585057019999000,"data":{"value":6719.95}}

This is the chart setup

<Resizable>
<ChartContainer timeRange={_timerange}>
<ChartRow height='300'>
<Charts>
<LineChart axis='y' cloums={['value']} style={styles} series={_timeseries['somename]} interpolation='curveLinear' />
</Charts>
<YAxis id='y' label='Y' format=',.0f' />
</ChartRow>
</ChartContainer>
</Resizable>