9

如何设置以下代码生成的图表的高度?

@(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}"))
 ) 
4

2 回答 2

10

您好,您可以尝试使用 HtmlAttributes 方法来指定具有所需宽度的样式。

例如

@(Html.Kendo().Chart()
   .HtmlAttributes(new {style="width:200px;"})
 //...
于 2012-11-16T00:21:54.717 回答
4

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))
 ) 
于 2015-02-12T11:23:55.023 回答