mirror of
https://github.com/gradio-app/gradio.git
synced 2025-04-06 12:30:29 +08:00
Fix resizer on altair (#8603)
* changes * add changeset * add changeset * changes --------- Co-authored-by: Ali Abid <aliabid94@gmail.com> Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
This commit is contained in:
parent
8aad678a63
commit
affce4cbd9
6
.changeset/few-camels-swim.md
Normal file
6
.changeset/few-camels-swim.md
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
"@gradio/plot": patch
|
||||
"gradio": patch
|
||||
---
|
||||
|
||||
feat:Fix resizer on altair
|
@ -28,7 +28,11 @@
|
||||
spec = set_config(spec, computed_style, value.chart as string, colors);
|
||||
}
|
||||
$: fit_width_to_parent =
|
||||
spec.encoding?.column?.field || spec.encoding?.row?.field ? false : true; // vega seems to glitch with width when orientation is set
|
||||
spec.encoding?.column?.field ||
|
||||
spec.encoding?.row?.field ||
|
||||
value.chart === undefined
|
||||
? false
|
||||
: true; // vega seems to glitch with width when orientation is set
|
||||
|
||||
const renderPlot = (): void => {
|
||||
if (fit_width_to_parent) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user