Skip to content

array filter feature in dc.js, how to handle when the .dimensions function takes multiple dimensions? #1866

@lipingyang-geoai

Description

@lipingyang-geoai

Hello dc.js community, @gordonwoodhull, I have one question about the array filter (https://github.com/crossfilter/crossfilter/wiki/API-Reference#dimension_with_arrays), it is pretty straightforward to use it when the value is one variable/column in the function, "crossfilter.dimension(value [, isArray])", but how should I handle if I would like to use the array filter, when the value is an array of dimensions?

for example, normally we use this when we would like to use array filter feature.
var myDim_singleColumn = crossfilter.dimension(function(d) {
Return d[“oneColumn_in_csv”]
}, true);

when not suing array filter feature, this the following works,
var myDim_MultipleColumn = crossfilter.dimension(function(d) {
Return d[“oneColumn_in_csv”, “AnotherColumn_in_csv”,]

});

But when I would like to use array filter feature, it throws an error.
var myDim_MultipleColumn = crossfilter.dimension(function(d) {
Return d[“oneColumn_in_csv”, “AnotherColumn_in_csv”,]

}, true);

Any suggestions? Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy