You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: components/chart/overview.md
+56Lines changed: 56 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -90,6 +90,62 @@ To use a Telerik chart for Blazor:
90
90
}
91
91
````
92
92
93
+
## Chart Size
94
+
95
+
To control the chart size, use its `Width` and `Height` properties. You can read more on how they work in the [Dimensions]({%slug common-features/dimensions%}) article.
96
+
97
+
You can also set the chart size in percentage values so it occupies its container. If the parent container size changes, you must call its `Resize()` method after the DOM has been redrawn and the new container dimensions are rendered.
98
+
99
+
>caption Change the 100% chart size dynamically
100
+
101
+
````CSHTML
102
+
@using Telerik.Blazor
103
+
@using Telerik.Blazor.Components.Chart
104
+
@using Telerik.Blazor.Components.Button
105
+
106
+
<TelerikButton OnClick="@ResizeChart">Resize the container and redraw the chart</TelerikButton>
0 commit comments