Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I set the height of a Kendo Chart with the Server Side Wrappers for MVC?

Tags:

kendo-ui

How can I set the height of the chart generated by the following code?

@(Html.Kendo().Chart()
.Name("Chart")
.Title("Wear")
.Series(series => { series.Column(new[]
                            {
                                measure1, measure2, measure3, measure4, measure5
                            }).Color("#585858"); })
.Tooltip(tooltip => tooltip.Visible(true).Format("{0}"))
 ) 
like image 551
PlTaylor Avatar asked Nov 15 '12 22:11

PlTaylor


People also ask

How do I change the row height in kendo grid?

To adjust the size of the rows in both the body and the header, use CSS and specify the height and padding properties for the th elements inside the thead and tr , and the td elements inside the tbody of the Grid.

How do you adjust the width of a Kendo grid?

To control the width of the Grid, set the CSS width properties to the Grid itself or to some of its ancestors. If you use hierarchy and unless the detail template is scrollable, the detail template has to be narrower than the sum of the widths of all master columns.


2 Answers

You can try the following;

@(Html.Kendo().Chart()
   .Name("Chart")
   .Title("Wear")
   .Series(series => { series.Column(new[]
                      {
                       measure1, measure2, measure3, measure4, measure5
                      }).Color("#585858"); })
   .Tooltip(tooltip => tooltip.Visible(true).Format("{0}"))

   .ChartArea(x => x.Height(350))
 ) 
like image 172
Mahib Avatar answered Sep 21 '22 15:09

Mahib


Hello you can try to use the HtmlAttributes method to specify a style with the needed width.

e.g.

@(Html.Kendo().Chart()
   .HtmlAttributes(new {style="width:200px;"})
 //...
like image 40
Petur Subev Avatar answered Sep 24 '22 15:09

Petur Subev