c# - Controlling size of KENDO UI Donut Chart -
i having difficulties controlling size of donut component in kendo-ui (here). here code:
<div class="analytic-block"> <h4>sources</h4> <span class="text-muted">recent activity</span> @(html.kendo() .chart<activitymodel>() .name("donutchart") .legend(legend => legend.position(chartlegendposition.bottom)) .datasource(ds => ds .read(read => read.action("sources", "statistics")) .group(group => group.add(item => item.slicelayer)) .sort(sort => sort.add(item => guid.newguid().tostring()))) .series(series => { series.donut(model => model.share, model => model.label, model => model.color, model => true, mode => true) .border(b => { b.color("white"); b.width(2); }) .startangle(0) .labels(labels => labels.visible(true) .position(chartpielabelsposition.outsideend) .template(" #=dataitem.label #")//.template("<span style=\"color:#=dataitem.color#;\"> #=dataitem.label # </span>") .background("transparent") .border(1, "grey", chartdashtype.solid) .padding(2)) .padding(120); }) .tooltip(tooltip => tooltip .template(" #=dataitem.label # ") .visible(true))) </div>
and here result produces:
i able adjust size of chart changing .padding(120) leaves 2 large spaces above , below chart. not find reference on how manipulate size of area draw chart on.
if suggest solution, appreciated.
you should set width/height div chart element turn chart.
here example.
Comments
Post a Comment