Comments (5)
This is something I could possibly take on.
Any thoughts @hkang1 on how to approach?
from hermes.
What is the desired API?
setFilters(Hermes.Filter[])
.
addFilters(Hermes.Filter[])
.
resetFilters()
Do merge and update like from user interactions?
Do we want to apply regardless of whether it's below the threshold required for user-interaction-supplied filters? Or does that cause problems, and we should require threshold?
from hermes.
What is the desired API?
setFilters(Hermes.Filter[])
.
addFilters(Hermes.Filter[])
.
resetFilters()
Yeah those three actions sound reasonable. Maybe Hermes.Filters as an input instead so we also know which dimension to apply the filters.
One additional way to add might be to take Filters during Hermes initialization, which would be useful if the dev wanted to build a chart with filters pre applied in one go.
Do merge and update like from user interactions?
Yeah. There is an update routine that "cleans up" filters. Specifically it removes 0-sized filters and also merges overlapping filters within the same dimension. But mimicking user interactions makes sense to me.
Do we want to apply regardless of whether it's below the threshold required for user-interaction-supplied filters? Or does that cause problems, and we should require threshold?
Good question... my initial reaction is that it's probably best to mimick the user interactions, which translates to following the threshold rules.
from hermes.
removeFilters()
could be a useful one too, but referencing the exact filter to remove could be a bit tricky. Would need the dimension key and the index of the filter. e.g. removeFilter('accuracy', 1) would remove the 2nd filter from the accuracy
dimension.
from hermes.
Resolved partially with PR 114.
The config can take initial filters, but no dynamic functions to modify filters on the fly. Will hold off until there are actual use cases to add that capability.
from hermes.
Related Issues (20)
- improve categorical scale filtering UX
- blurry rendering when devicePixelRatio > 1 HOT 4
- disable axis hover from showing edge axis ticks when there's only one data series
- throttled dimension dragging causes issue with reordering HOT 1
- add netlify process to auto deploy demos
- add support for disabling and enabling chart interactions
- add all primary examples to demos
- complete config documentation in README
- fix issue of adding chart to an element with undefined size
- Expose utility function `deepMerge` for config merging
- NiceScale is unable to handle the case of a single negative data point to create range.
- filter out series with NaN, Infinity and -Infinity values
- Log scale ticks don't show with single order of magnitude data HOT 1
- tick formatting for logBase != 10 HOT 1
- add support for charting Infinity, -Infinity and NaN HOT 2
- add support for series specific style override HOT 2
- Update filter hooks to return new filter object references to properly trigger reactive frameworks HOT 1
- In horizontal mode, +Infinity and -Infinity are reversed.
- possible idea of isolating interaction enable/disable
- Add support for converting data to string (NaN, +Inf, and -Inf) and reverse
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 hermes.