Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table filter interactions #119

Merged
merged 143 commits into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from 122 commits
Commits
Show all changes
143 commits
Select commit Hold shift + click to select a range
642ec46
Bring over changes from old repo
huong-li-nguyen Sep 28, 2023
a300631
Add notes
huong-li-nguyen Oct 10, 2023
3c45787
Add comments which code sections are plotly specific
huong-li-nguyen Oct 10, 2023
16516f7
Add more thoughts
huong-li-nguyen Oct 11, 2023
6ad33ca
Update scratch.py
huong-li-nguyen Oct 11, 2023
3bd9e48
Clean up
huong-li-nguyen Oct 11, 2023
c494fcb
Comment out d3 changes
huong-li-nguyen Oct 11, 2023
caf154a
Merge branch 'main' into feature/table_component_MS
maxschulz-COL Oct 12, 2023
5aa22b0
Revert table CSS (for now)
maxschulz-COL Oct 13, 2023
e3a08b6
Update refactoring places
maxschulz-COL Oct 13, 2023
53e3124
UPdate example
maxschulz-COL Oct 13, 2023
447f9af
Abstracting several plotly dependent methods
maxschulz-COL Oct 16, 2023
ad363b7
Improvement to abstraction level
maxschulz-COL Oct 16, 2023
bc16ba5
Further abstraction
maxschulz-COL Oct 16, 2023
e84fcb7
implement hasattr logic more
maxschulz-COL Oct 16, 2023
f2376ed
Individually comment out CSS
maxschulz-COL Oct 16, 2023
6fc5c78
further abstraction of update theme
maxschulz-COL Oct 16, 2023
b6c4709
Very first version
petar-qb Oct 16, 2023
6c795b3
Conflicts solved
petar-qb Oct 16, 2023
b83ec59
Simplify update layout even further
maxschulz-COL Oct 16, 2023
b2b2b29
Fix table CSS
maxschulz-COL Oct 17, 2023
b38b8b4
Avoid jumping
maxschulz-COL Oct 17, 2023
fc87121
interaction example
maxschulz-COL Oct 17, 2023
6ad35de
Private attributes for input properties
maxschulz-COL Oct 17, 2023
8ff80c7
Take out hover behaviour on dark
maxschulz-COL Oct 17, 2023
5a7ffe9
Table CSS
maxschulz-COL Oct 17, 2023
51bcd91
reminder
maxschulz-COL Oct 17, 2023
5d080c3
Try out AGGrid
maxschulz-COL Oct 17, 2023
ac58e28
Delete unnecessary files
maxschulz-COL Oct 17, 2023
381514b
Enable proper capture decorator
maxschulz-COL Oct 17, 2023
05f19c6
remove scratch
maxschulz-COL Oct 17, 2023
5168a6f
Clean up comments
maxschulz-COL Oct 17, 2023
edd0386
Mypy lint including ModelID
maxschulz-COL Oct 18, 2023
77719b7
General lint
maxschulz-COL Oct 18, 2023
652ab17
Clean up table
maxschulz-COL Oct 18, 2023
322202b
Docstring
maxschulz-COL Oct 18, 2023
2db779d
Enable datatable properly
maxschulz-COL Oct 18, 2023
6cc33be
Schema
maxschulz-COL Oct 18, 2023
e5c6f03
Filter interaction for tables PoC
petar-qb Oct 18, 2023
178559e
Demo callable Card.text
antonymilne Oct 19, 2023
4493fd4
Filter interaction branch code adjusted with the base branch
petar-qb Oct 19, 2023
81879eb
Revert "Demo callable Card.text"
antonymilne Oct 19, 2023
0f931fb
Improve table build
maxschulz-COL Oct 19, 2023
a4648cc
Merge branch 'feature/table_component_MS' of github.com:mckinsey/vizr…
maxschulz-COL Oct 19, 2023
96741c1
Showcase bound_arguments interference with kwargs
maxschulz-COL Oct 19, 2023
b4b4e6b
Warning to table fix
maxschulz-COL Oct 19, 2023
2a5db2b
Explanation for kwargs behaviour
maxschulz-COL Oct 19, 2023
997bed4
Fixing decorator again
maxschulz-COL Oct 19, 2023
7b6dadc
Delete metadata
maxschulz-COL Oct 19, 2023
4ca792a
add unit test for erronous binding behaviour
maxschulz-COL Oct 19, 2023
809a883
Add callable component private attribute
maxschulz-COL Oct 20, 2023
95e4d16
Add reusable validator
maxschulz-COL Oct 20, 2023
846b346
Add unit test to check on arguments
maxschulz-COL Oct 20, 2023
f2d4db4
Move theme switch back to page
maxschulz-COL Oct 20, 2023
459f037
lint
maxschulz-COL Oct 20, 2023
8d89d30
remove input property from graph
maxschulz-COL Oct 20, 2023
1da2585
Change _callable_component to string + add to page
maxschulz-COL Oct 20, 2023
3aefc06
Lint
maxschulz-COL Oct 20, 2023
fda85b0
Cleanup
maxschulz-COL Oct 23, 2023
95448f7
Move table to correct import path
maxschulz-COL Oct 23, 2023
4bf294e
Fix docs
maxschulz-COL Oct 23, 2023
60f3963
Add import path
maxschulz-COL Oct 23, 2023
fa055a5
Remove callable_component and add figure to table
maxschulz-COL Oct 23, 2023
5548fa2
Add unit tests
maxschulz-COL Oct 23, 2023
3329484
Lint
maxschulz-COL Oct 23, 2023
9131a25
Merge branch 'main' into feature/table_component_MS
maxschulz-COL Oct 23, 2023
ebc1d18
Fix tests
maxschulz-COL Oct 23, 2023
60c456d
Add documentation
maxschulz-COL Oct 23, 2023
c8cbdf7
Cleanup
maxschulz-COL Oct 23, 2023
7670eab
dropdown css bugfix
nadijagraca Oct 24, 2023
546dc4f
Fixing example
petar-qb Oct 24, 2023
205b759
First round of PR comments
maxschulz-COL Oct 25, 2023
d0d472a
Changing format of filter_interaction
petar-qb Oct 25, 2023
ab5d738
Table styling and default setting
maxschulz-COL Oct 25, 2023
cc4adb5
Conflicts solved
petar-qb Oct 25, 2023
ff3f9ff
Update docs and remove comments
maxschulz-COL Oct 25, 2023
e73f3c6
Minor app change
petar-qb Oct 25, 2023
7632ea7
adjusting tests to keep up with code change
maxschulz-COL Oct 25, 2023
369d63f
Lint
maxschulz-COL Oct 25, 2023
6ce1015
Fix overflow of table
huong-li-nguyen Oct 25, 2023
bc494e5
Merge branch 'feature/table_component_MS' of https://github.com/mckin…
huong-li-nguyen Oct 25, 2023
d45a729
Merge latest changes
petar-qb Oct 25, 2023
f79a8e6
Merge branch 'feature/table_component_MS' of https://github.com/mckin…
petar-qb Oct 25, 2023
5f4c46b
PR comments
maxschulz-COL Oct 25, 2023
22c85c9
Merge branch 'main' into feature/table_component_MS
maxschulz-COL Oct 25, 2023
b75d2bf
Improve table docs
maxschulz-COL Oct 25, 2023
167b506
Merge branch 'main' into feature/table_component_MS
maxschulz-COL Oct 25, 2023
30aa168
Change test
maxschulz-COL Oct 25, 2023
5a6d6a8
Merge branch 'feature/table_component_MS' of github.com:mckinsey/vizr…
maxschulz-COL Oct 25, 2023
16b3a1c
Merge branch 'feature/table_component_MS' of https://github.com/mckin…
petar-qb Oct 26, 2023
4257a49
Adjusting with the latest base branch changes
petar-qb Oct 26, 2023
438525e
Documentation and changelog file
petar-qb Oct 26, 2023
5669c12
Update vizro-core/src/vizro/models/_components/table.py
maxschulz-COL Oct 26, 2023
2b7d936
Update vizro-core/src/vizro/static/css/dropdown.css
maxschulz-COL Oct 26, 2023
7aa773e
Update vizro-core/src/vizro/static/css/table.css
maxschulz-COL Oct 26, 2023
c1c442f
Update vizro-core/src/vizro/static/css/dropdown.css
maxschulz-COL Oct 26, 2023
e2c346e
Update vizro-core/src/vizro/static/css/dropdown.css
maxschulz-COL Oct 26, 2023
1548913
Minor comments and table.build method fixes
petar-qb Oct 26, 2023
5fe5989
Removing TODOs
petar-qb Oct 26, 2023
4eb5174
Add helper functions return type
petar-qb Oct 26, 2023
8c69f99
Merge branch 'feature/table_component_MS' of https://github.com/mckin…
petar-qb Oct 26, 2023
8d3566c
Merge base branch
petar-qb Oct 26, 2023
0e32f42
Adjusted export_data tests (they include table filter interaction now)
petar-qb Oct 26, 2023
4f7e175
Minor changes
petar-qb Oct 26, 2023
4faa43e
Export data and filter interaction action tests updated
petar-qb Oct 27, 2023
f44bd18
Table tests
petar-qb Oct 27, 2023
bd21f02
Adding more tests
petar-qb Oct 27, 2023
0383f02
Replacing chart/-s with figure/-s where necessary.
petar-qb Oct 27, 2023
9051156
dash_with_id fixture refactored + building datatable in pre_build Tab…
petar-qb Oct 27, 2023
bdc827e
Merge main into working branch
petar-qb Oct 31, 2023
9ce9a2e
Merge branch 'main' of https://github.com/mckinsey/vizro into feat/ta…
petar-qb Oct 31, 2023
c6cf9ab
Add vizro favicon.ico
huong-li-nguyen Oct 31, 2023
0b68969
Merge branch 'feat/table_filter_interaction' of https://github.com/mc…
petar-qb Oct 31, 2023
e0fbf97
Replacing table._underlying_table_id with table._callable_object_id
petar-qb Oct 31, 2023
ed09d14
Removing isinstance Table checking where needed
petar-qb Oct 31, 2023
2e37166
CallbackTriggerDict and mock_callback_context docstrings.
petar-qb Oct 31, 2023
c9870b0
Getting rid of 'Table' reference in _actions_utils.py file
petar-qb Oct 31, 2023
438839f
Small changes
petar-qb Nov 1, 2023
d0937d0
_validate_selector_value_NONE -> _validate_selector_value_none
petar-qb Nov 1, 2023
45c4c87
Merge branch 'main' of https://github.com/mckinsey/vizro into feat/ta…
petar-qb Nov 1, 2023
93ba706
schema updated
petar-qb Nov 1, 2023
4c41873
Uncomment dash_ag_grid
petar-qb Nov 1, 2023
0fe42f1
Table filter interaction example added
petar-qb Nov 1, 2023
ba236d2
reverting app.py
petar-qb Nov 1, 2023
cdf7727
Minor changes
petar-qb Nov 1, 2023
d375272
get_action_callback_mapping test fixed
petar-qb Nov 1, 2023
bab2884
Small change in the tests
petar-qb Nov 1, 2023
b5cf8fc
Merge branch 'main' of https://github.com/mckinsey/vizro into feat/ta…
petar-qb Nov 1, 2023
e8ac518
Revert example/from_yaml changes
petar-qb Nov 1, 2023
8773a62
Main merged into working branch - conflicts solved
petar-qb Nov 2, 2023
4a4f987
Test adjusted
petar-qb Nov 2, 2023
51966c6
Add table example in default app.py
petar-qb Nov 2, 2023
f3fd4ab
Reverting 'figure' -> 'chart' in actions.md
petar-qb Nov 2, 2023
989142e
Small changes
petar-qb Nov 2, 2023
1f94af6
Reverting figure -> chart in docstrings
petar-qb Nov 2, 2023
d5fd415
Minor
petar-qb Nov 2, 2023
ca6d378
Fix a bug with incorrect dropdown text color caused by table
petar-qb Nov 2, 2023
0b4a2cb
Linting + renaming unit tests
petar-qb Nov 2, 2023
74e7555
Old changelog file replacet with the new empty one.
petar-qb Nov 2, 2023
557e674
Merge branch 'main' of https://github.com/mckinsey/vizro into feat/ta…
petar-qb Nov 2, 2023
4c6167c
Added dict, json and yaml examples
petar-qb Nov 2, 2023
a487dc3
Merge branch 'main' of https://github.com/mckinsey/vizro into feat/ta…
petar-qb Nov 2, 2023
eb79c2d
Minor changes
petar-qb Nov 2, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<!--
A new scriv changelog fragment.

Uncomment the section that is right (remove the HTML comment wrapper).
-->

<!--
### Removed

- A bullet item for the Removed category.

-->

### Added
petar-qb marked this conversation as resolved.
Show resolved Hide resolved

- Enable `filter_interaction` action when the source figure is a `vm.Table` component ([#119](https://github.com/mckinsey/vizro/pull/119))
huong-li-nguyen marked this conversation as resolved.
Show resolved Hide resolved

<!--
### Changed

- A bullet item for the Changed category.

-->
<!--
### Deprecated

- A bullet item for the Deprecated category.

-->
<!--
### Fixed

- A bullet item for the Fixed category.

-->
<!--
### Security

- A bullet item for the Security category.

-->
10 changes: 5 additions & 5 deletions vizro-core/docs/pages/user_guides/actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,17 +103,17 @@ a result, when a dashboard user now clicks the button, all data on the page will

[Graph]: ../../assets/user_guides/actions/actions_export.png

### Filter data by clicking on chart
### Filter data by clicking on figure
petar-qb marked this conversation as resolved.
Show resolved Hide resolved

To enable filtering when clicking on data in a (source) chart, you can add the [`filter_interaction`][vizro.actions.filter_interaction] action function to the [`Graph`][vizro.models.Graph] component. The [`filter_interaction`][vizro.actions.filter_interaction] is currently configured to be triggered on click only.
To enable filtering when clicking on data in a (source) figure, you can add the [`filter_interaction`][vizro.actions.filter_interaction] action function to the [`Graph`][vizro.models.Graph] or [`Table`][vizro.models.Table] component. The [`filter_interaction`][vizro.actions.filter_interaction] is currently configured to be triggered on click only.

To configure this chart interaction follow the steps below:
To configure this figure interaction follow the steps below:

1. Add the action function to the source [`Graph`][vizro.models.Graph] and a list of IDs of the target charts into `targets`
1. Add the action function to the source [`Graph`][vizro.models.Graph] or [`Table`][vizro.models.Table] component and a list of IDs of the target charts into `targets`.
```py
actions=[vm.Action(function=filter_interaction(targets=["scatter_relation_2007"]))]
```
2. Enter the filter columns in the `custom_data` argument of the underlying source chart `function`
2. If the source figure is [`Graph`][vizro.models.Graph], enter the filter columns in the `custom_data` argument of the underlying source chart `function`.
maxschulz-COL marked this conversation as resolved.
Show resolved Hide resolved
```py
Graph(figure=px.scatter(..., custom_data=["continent"]))
```
Expand Down
Binary file added vizro-core/examples/assets/favicon.ico
Binary file not shown.
Loading
Loading