2 Answers, 1 is accepted
0
Hello Thierry,
The size of the Chart can be set initially either in the configuration or by specifying the size on the parent element. For example:
If you wish to change the size dynamically, you should also repaint the Chart by using the refresh or redraw methods after the change.
All the best,
Daniel
the Telerik team
The size of the Chart can be set initially either in the configuration or by specifying the size on the parent element. For example:
$(
"#chart"
).kendoChart({
chartArea: {
width: 200,
height: 200
},
....
All the best,
Daniel
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Thierry
commented on 06 Feb 2012, 02:24 PM
Top achievements
Rank 1
Thank you Daniel.
last week, i'd finally use the styles for the div, and it works. My precedent try was with the width and height attributes on the div, which are not valid for a div.. I learn ;-)
I will use your solution, this is more clean.
last week, i'd finally use the styles for the div, and it works. My precedent try was with the width and height attributes on the div, which are not valid for a div.. I learn ;-)
I will use your solution, this is more clean.
Alexander
commented on 27 Nov 2012, 02:31 PM
Top achievements
Rank 1
Hello, is it possible to do the same with ASP.NET MVC Kendo UI control?
Alexander
commented on 27 Nov 2012, 02:59 PM
Top achievements
Rank 1
Hello, is it possible to do the same with ASP.NET MVC Kendo UI control?
Alexander
commented on 27 Nov 2012, 03:13 PM
Top achievements
Rank 1
Found it.
It can be done with css styles.
It can be done with css styles.
<style> .k-chart { height: 280px; width: 390px; } </style>
Laura
commented on 17 Jan 2013, 08:15 PM
Top achievements
Rank 1
Is it possible to set the width of the chart as a %?
I'm trying to display three charts in a row to fill the screen no matter what size the window is.
Any suggestions?
Thanks,
Laura
I'm trying to display three charts in a row to fill the screen no matter what size the window is.
Any suggestions?
Thanks,
Laura
0
Hello Laura,
Daniel
the Telerik team
It is possible to set the width in percentages on the parent or on the wrapper element but the Chart does not resize automatically. You could use the window resize event and redraw the charts using the redraw method.
Regards,Daniel
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Ming
commented on 18 Mar 2015, 10:37 PM
Top achievements
Rank 1
Hi, when I use the chartarea to define the size of the box, the legend of the chart doesn't show fully (only half). Do you encounter the same issue? Thanks.
Daniel
commented on 23 Mar 2015, 10:58 AM
Telerik team
Hello Ming,
The entire legend will not be shown if the size set with the configuration is not sufficient. If the size is sufficient be the legend is incorrectly positioned when using the chartArea configuration then please provide a runnable sample so I can investigate further.
Regards,
Daniel
Telerik
The entire legend will not be shown if the size set with the configuration is not sufficient. If the size is sufficient be the legend is incorrectly positioned when using the chartArea configuration then please provide a runnable sample so I can investigate further.
Regards,
Daniel
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!