Skip to content

Commit affce4c

Browse files
aliabid94Ali Abidgradio-pr-bot
authored
Fix resizer on altair (#8603)
* changes * add changeset * add changeset * changes --------- Co-authored-by: Ali Abid <[email protected]> Co-authored-by: gradio-pr-bot <[email protected]>
1 parent 8aad678 commit affce4c

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.changeset/few-camels-swim.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@gradio/plot": patch
3+
"gradio": patch
4+
---
5+
6+
feat:Fix resizer on altair

js/plot/shared/plot_types/AltairPlot.svelte

+5-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@
2828
spec = set_config(spec, computed_style, value.chart as string, colors);
2929
}
3030
$: fit_width_to_parent =
31-
spec.encoding?.column?.field || spec.encoding?.row?.field ? false : true; // vega seems to glitch with width when orientation is set
31+
spec.encoding?.column?.field ||
32+
spec.encoding?.row?.field ||
33+
value.chart === undefined
34+
? false
35+
: true; // vega seems to glitch with width when orientation is set
3236
3337
const renderPlot = (): void => {
3438
if (fit_width_to_parent) {

0 commit comments

Comments
 (0)