esnet / esnet/pond

Displaying a specific column from TS

Open
#184 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
211
Forks
42
PR merge metrics
No merged PRs in 30d

Description

I am working on something that is able to call a column from the Time Series I created and display it on a table. I have the function ready to do that but its just the column calling.

Here is an example:

(Assume the points were created and data are from a local file/Storage)

```
const series1 = new TimeSeries ({
name: 'Fruit Delivery',
columns: ['time', 'price', 'fruit'], //assume time is the day of delivery
points: points_fruitd
});

const series2 = new TimeSeries ({
name: 'Fruit Inventory',
columns: ['time', 'fruit', 'unit'], //assume time is the date it was arrived from delivery (basically items placed in inventory)
points: points_fruitd
});
```

When I call in for a table:
```

{this.state.selections.map((tr, i) => {
return (
{`${series1.crop(tr)}`} {`${series1.crop(tr)}`} >

);
})}


this.setState({ selected: i })}
style={{ color: 'black', fontSize: 9.5, fontWeight: 500, maxWidth: 100, overflowX: "hidden", paddingLeft: 7 }}

>



```

It will display the time in ms (which I want to be in date format) and the columns name.
Example:

{"name":"Fruit Delivery","utc":true,"columns":["time"],"points":[[1121504241, 5.23, (*) ]]} and etc...

2 questions:
1. How would I aoid that specific output and have one of the ts function call the column per say:
.columns('price') -> it will display the price based on the time seires for that date or time.

Example of output: 5.23, 1.25, 3.00, 2.50, etc...

2. I want to display a string based on the price, since fruit time and price are in sync I want to be able ti display the fruit as well, How would I do that since i tried that and it threw either null or error.

Thanks!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.