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:
Metadata
Release files for dash-aggrid-scales 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dash_aggrid_scales-0.4.0.tar.gz | 342.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dash_aggrid_scales-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 350.4 kB
Release files / dash_aggrid_scales-0.4.0.tar.gz
| Download URL | dash_aggrid_scales-0.4.0.tar.gz |
|---|---|
| Size | 342.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
31870a3c856bdb0c020d1901639b7e9f08f690c5e2d5925b4ed91ed2a029d042
|
|
BLAKE2b-256 checksum How to use checksums |
42627254449a4810bf7c67bd0878f95c07e5af5b3e3e3a9cc2354dd2de2d40d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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}
|
Release files / dash_aggrid_scales-0.4.0-py3-none-any.whl
| Download URL | dash_aggrid_scales-0.4.0-py3-none-any.whl |
|---|---|
| Size | 8.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
29a91f627b8ef444389cd80d8f62f0a7d70d388aab9f288e52544a3b9d71e35a
|
|
BLAKE2b-256 checksum How to use checksums |
75505ceb12a0fc96525ac5a41c35875ff1ae11b67bccc358afccb675b326a7ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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}
|