Skip to content

Is there any sample to show how to use the data attribute as function ? #185

Open
@chabrof

Description

@chabrof

Is there any sample to show how to use the data attribute as function ?

Are we expected to use instance of the Vega View in this particular function in order to make some "insert" or "remove" ? If yes, we can unfortunately not access the Vega main instance to use the advanced "Changeset" features (in order to modify one datum for example).

var barData = {
  table: function(dataset){
    vegaView.remove('table', dataset) // remove all
    vegaView.insert('table', otherDataset) // set a new dataset
    // no modify function on vegaView... no access to Vega main instance
    // no need to return anything
    vegaView.run()
  }
};

Thank you very much

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions