Commit e7ac088
feat: AG Grid Plugin basic implementation (#1141)
- Basic AG Grid implementation. This is a launching point for a
`deephaven-plugin-aggrid`, and an example of hooking up a Deephaven
table with AG Grid
- We'll add more functionality as we progress
- An example of both a Server-Side Datasource and a Viewport Datasource
- We'll probably end up sticking with the Server-Side Datasource
- Server-Side Datasource has two subscriptions: one for getRows, and one
for the users current viewport
- Listens for updates, and then updates the data within AG Grid
- Tested by including `ag-grid` as a flag on the
`tools/plugin_builder.py` command, then running a snippet to display
some tables in AG Grid:
```python
from deephaven import empty_table, new_table
from deephaven.column import string_col, double_col
from deephaven.ag_grid import AgGrid
from deephaven.plot import express as dx
_result = new_table(
[
double_col("Doubles", [3.1, 5.45, -1.0]),
string_col("Strings", ["Creating", "New", "Tables"]),
]
)
_stocks = dx.data.stocks()
ag_result = AgGrid(_result)
ag_stocks = AgGrid(_stocks)
ag_stocks_tail = AgGrid(_stocks.tail(5))
ag_huge_table = AgGrid(empty_table(100_000_000).update_view(["x=i", "y=Math.sin(x)"]))
```
Grids appeared correctly.
- Next steps: Wire up unit tests, then look more into the data sources
(server side row data source vs. viewport row data source) to see which
is more powerful/achieves what we want. Viewport was easy to wire up but
I think SSR seems to have more methods/options available
---------
Co-authored-by: Matthew Runyon <matthewrunyon@deephaven.io>1 parent 5e651d1 commit e7ac088
31 files changed
Lines changed: 1532 additions & 0 deletions
File tree
- plugins
- ag-grid
- src
- deephaven/ag_grid
- js
- src
- datasources
- test
- deephaven
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
0 commit comments