First of all, thank you for building this library. Development seems to be moving fast, and I really appreciate the work — I’ve been enjoying streamlit-pivot a lot.
I’d like to suggest a small enhancement to color_scale:
Could it support an optional numeric mid_value (for example 0)?
My main use case is a PnL column where I want a continuous diverging scale like in Excel:
- more negative values = darker red
0 = white
- more positive values = darker blue
What I’m looking for is not a threshold/banded rule, but a smooth gradient anchored at a meaningful midpoint.
Example:
rule = {
"type": "color_scale",
"apply_to": ["pnl"],
"min_color": "#ff0000",
"mid_color": "#ffffff",
"max_color": "#0000ff",
"mid_value": 0,
}
First of all, thank you for building this library. Development seems to be moving fast, and I really appreciate the work — I’ve been enjoying
streamlit-pivota lot.I’d like to suggest a small enhancement to
color_scale:Could it support an optional numeric
mid_value(for example0)?My main use case is a PnL column where I want a continuous diverging scale like in Excel:
0= whiteWhat I’m looking for is not a threshold/banded rule, but a smooth gradient anchored at a meaningful midpoint.
Example: