From 4b092a33ce419108ac04c97a35e3ba5bf672e051 Mon Sep 17 00:00:00 2001 From: Dominik Moritz Date: Tue, 22 Feb 2022 10:47:49 -0800 Subject: [PATCH] docs: describe how to update layout when data changes (#7971) --- build/vega-lite-schema.json | 2 +- src/data.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/build/vega-lite-schema.json b/build/vega-lite-schema.json index cedaa872a6..b05d9e7f1d 100644 --- a/build/vega-lite-schema.json +++ b/build/vega-lite-schema.json @@ -17346,7 +17346,7 @@ "description": "An object that specifies the format for parsing the data." }, "name": { - "description": "Provide a placeholder name and bind data at runtime.", + "description": "Provide a placeholder name and bind data at runtime.\n\nNew data may change the layout but Vega does not always resize the chart. To update the layout when the data updates, set [autosize](https://vega.github.io/vega-lite/docs/size.html#autosize) or explicitly use [view.resize](https://vega.github.io/vega/docs/api/view/#view_resize).", "type": "string" } }, diff --git a/src/data.ts b/src/data.ts index e0628ef19d..c8fff6fd56 100644 --- a/src/data.ts +++ b/src/data.ts @@ -116,6 +116,8 @@ export interface InlineData extends DataBase { export interface NamedData extends DataBase { /** * Provide a placeholder name and bind data at runtime. + * + * New data may change the layout but Vega does not always resize the chart. To update the layout when the data updates, set [autosize](https://vega.github.io/vega-lite/docs/size.html#autosize) or explicitly use [view.resize](https://vega.github.io/vega/docs/api/view/#view_resize). */ name: string; }