0

I have a kendo chart and i have to binding the chart using model. I have to set the series defaults option.

i got the code how to set the seriesdefualts in javascrit.Can someone help me how to add the same in model view binding.

javascript:

seriesDefaults: { overlay: { gradient: null }

Model view Binding:

 @(Html.Kendo().Chart(Model.ReportDataList)
     .Name("chartProjPer")
     .Title(title => title
         .Text("% by Projects")
         .Position(ChartTitlePosition.Top)
     )
     .Legend(legend => legend
         .Visible(true)
         .Position(ChartLegendPosition.Right)
     )
     .Tooltip(t => t.Visible(true)
         .Template("${ category } (${ value }%)")
     )
     .Series(series => series.Pie(Model.ReportDataList)
         .CategoryField("ReportBy")
         .Field("ProjPercentage")
         .Labels(l => l.Visible(true)
             .Template("${ category } (${ value }%)")
         )
         .StartAngle(180)
     )
 )
Robin Giltner
  • 3,057
  • 2
  • 18
  • 26

1 Answers1

1

Try something like this:

.SeriesDefaults(seriesDefaults =>
    seriesDefaults.Pie().Overlay(ChartPieSeriesOverlay.None)
)

API Doc: http://docs.telerik.com/kendo-ui/api/aspnet-mvc/Kendo.Mvc.UI.Fluent/ChartPieSeriesBuilder#methods-Overlay(Kendo.Mvc.UI.ChartPieSeriesOverlay)

ezanker
  • 24,628
  • 1
  • 20
  • 35
  • Hi Ezanker, If you have any idea on knock out please look into this. http://stackoverflow.com/questions/32651267/knockout-dropdown-with-searchable – Samanth Kolisetty Sep 18 '15 at 11:49
  • Hi Ezankar, please help me with this thread http://stackoverflow.com/questions/38396679/kendo-window-with-minimize-and-maximize – Samanth Kolisetty Jul 15 '16 at 12:55