7

I have craete KendoChart pie with legend. For some reason legend by default is interactive and by clicking on legend items chart enables/disables pieces of the pie.

I didn't find any way to disable this behavior: http://docs.telerik.com/kendo-ui/api/dataviz/chart

enter image description here

Could it be disabled?

Mando
  • 11,414
  • 17
  • 86
  • 167

2 Answers2

9

I needed to do the same thing and after some research found out in the Kendo UI documentation the following solution: - hook to the legendItemClick and legendItemHover events of the chart - in the handler call e.preventDefault();

Here is the code I used (MVVM-style):

In HTML:

data-bind="events: { legendItemClick: disableEvent, legendItemHover: disableEvent } "

In the ViewModel:

disableEvent: function(e) {
    e.preventDefault();
}

Here is the article - http://docs.telerik.com/kendo-ui/api/dataviz/chart

Miroslav Nedyalkov
  • 1,101
  • 1
  • 10
  • 22
6

Use the code Below

legend: {
    position: "bottom",
    visible: false
},
bukart
  • 4,906
  • 2
  • 21
  • 40
Abiola
  • 408
  • 6
  • 6
  • 2
    This will hide the legend, not disable the interactivity – Valuk Apr 28 '15 at 10:52
  • Abiola, can you try answer to my question? I think you will be able to answer. link: http://stackoverflow.com/questions/33889722/kendo-chart-legend-label-at-left-color-at-right – user5260143 Nov 25 '15 at 09:43