Skip to content

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

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!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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