Coder Social home page Coder Social logo

Comments (5)

trentwatt avatar trentwatt commented on July 19, 2024

This is something I could possibly take on.

Any thoughts @hkang1 on how to approach?

from hermes.

trentwatt avatar trentwatt commented on July 19, 2024

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.

hkang1 avatar hkang1 commented on July 19, 2024

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.

hkang1 avatar hkang1 commented on July 19, 2024

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.

hkang1 avatar hkang1 commented on July 19, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.