Comments (2)
Hi @vooba,
the min and max functions are supposed to work with numbers. I don't think they have ever worked with dates or Moment. Plus all Moment functionality is deprecated and will be removed to prevent bundle bloat.
You should be able to achieve it using:
const minItem: Item | null = dataset
.stream()
.min((date: Date): number => +date);
const maxItem: Item | null = dataset
.stream()
.max((date: Date): number => +date);
In similar fashion you can create Moment version or universal one for all kinds of dates.
from vis-data.
Hi Thomaash,
thank you for the fast answer.
The old "visjs"-dataset worked with dates too, but I will update my code to use the stream method.
from vis-data.
Related Issues (20)
- Vis-data failing on newest typescript
- updateOnly method doesn't work properly when using Date object
- update method is not reactive
- ES5 not supported
- uglify-js.minify failure in vis-data\peer\umd 7.1.9
- Typescript compile error in data-interface.ts HOT 2
- Unmet Peer Dependency HOT 3
- The automated release is failing 🚨
- Remove props from items in data sets HOT 1
- [BUG] Update inside forEach not working HOT 6
- [BUG] updateOnly will delete arrows HOT 2
- #private declaration in dts messes up es5 builds HOT 1
- Release 7.1.1 breaks Storybook / Webpack 4 HOT 5
- Action Required: Fix Renovate Configuration
- Dependency Dashboard
- Feature request: Add a destroy method to the dataset
- issue removing values using update()
- Compile error in data-interface.d.ts HOT 10
- Update dependency uuid to version 9 HOT 2
- Object prototype is lost on call to `updateOnly` HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vis-data.