Dash AgGrid Scales
Plotly color scales for columns in dash-ag-grid
This package provides three main scales to highlight values in AgGrid columns. For consistency, the names use the same conventions use by the plotly.colors module:
- sequential
- qualitative
- bar
Installation
pip install dash-aggrid-scales
Hello World
import dash_aggrid_scales as das
from dash import Dash, html
from dash_ag_grid import AgGrid
import plotly.express as px
medals = px.data.medals_long().assign(negative=list(range(-5, 4)))
app = Dash()
app.layout = html.Div([
AgGrid(
rowData=medals.to_dict("records"),
columnSize="sizeToFit",
style={"height": 500},
columnDefs=[
{
"field": "nation",
"headerName": "nation (qualitative)",
"cellStyle": {"styleConditions": das.qualitative(medals["nation"])},
},
{
"field": "medal",
"headerName": "medal (qualitative with dict)",
"cellStyle": {"styleConditions": das.qualitative(
medals["medal"],
{"gold": "gold", "silver": "silver", "bronze": "#cd7f32"}
)},
},
{
"field": "count",
"headerName": "count (sequential)",
"cellStyle": {"styleConditions": das.sequential(medals["count"])},
},
{
"field": "count",
"headerName": "count (bar)",
"cellStyle": {"styleConditions": das.bar(medals["count"])},
},
{
"field": "negative",
"headerName": "random +ve & -ve values (bar)",
"cellStyle": {"styleConditions": das.bar(medals["negative"], "teal")},
},
],
)
])
if __name__ == "__main__":
app.run(debug=True)
The resulting app will display an AgGrid as follows:
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dash_aggrid_scales-0.4.0.tar.gz
(342.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dash_aggrid_scales-0.4.0.tar.gz.
File metadata
- Download URL: dash_aggrid_scales-0.4.0.tar.gz
- Upload date:
- Size: 342.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
31870a3c856bdb0c020d1901639b7e9f08f690c5e2d5925b4ed91ed2a029d042
|
|
| MD5 |
c1c8f1b0253e9a40a7b19e865fd8aef5
|
|
| BLAKE2b-256 |
42627254449a4810bf7c67bd0878f95c07e5af5b3e3e3a9cc2354dd2de2d40d6
|
File details
Details for the file dash_aggrid_scales-0.4.0-py3-none-any.whl.
File metadata
- Download URL: dash_aggrid_scales-0.4.0-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
29a91f627b8ef444389cd80d8f62f0a7d70d388aab9f288e52544a3b9d71e35a
|
|
| MD5 |
ed87f7c1e1c1966c1eb9d90202dd4452
|
|
| BLAKE2b-256 |
75505ceb12a0fc96525ac5a41c35875ff1ae11b67bccc358afccb675b326a7ac
|