plotly / react-pivottable

React-based drag'n'drop pivot table with Plotly.js charts
https://react-pivottable.js.org/
MIT License
997 stars 254 forks source link

Customize filters #18

Open oScape opened 6 years ago

oScape commented 6 years ago

Hi,

I am implementing your project in my react application but I don't find the way to limit the filters available for my users. For example I don't want them to use Table Heatmap, only Table, and the same for Sum and Sum over Sum. Have you any tips I could use to resolve my problem?

By the way, it's an awesome project, congrats! Regards

nicolaskruchten commented 6 years ago

Glad you like it!

You can pass in whatever you like for the aggregator and renderer menus via the aggregators and renderers props. They take a name as a key and a function as a value. The built-in functions are available via import {aggregators, renderers} from 'react-pivottable/Utilities'; I believe.

jeffersonshibuya commented 5 years ago

Glad you like it!

You can pass in whatever you like for the aggregator and renderer menus via the aggregators and renderers props. They take a name as a key and a function as a value. The built-in functions are available via import {aggregators, renderers} from 'react-pivottable/Utilities'; I believe.

Hi @nicolaskruchten, could you give me an example. I didn't get how I can select just some aggregators instead all default one.

This project is simply perfect. congrats!

sevgibson commented 4 years ago

Hey @nicolaskruchten , I don't think it's possible to pass in custom aggregators -- here is where the renderers can be passed in

sevgibson commented 4 years ago

It's possible that adding aggregators here in this prop list will all the defaults to be overridden. I may submit a PR if I can get it to work (fairly green for react though).