This is a migrated thread and some comments may be shown as answers.

angularjs : How to transform a line chart into a dropTarget?

1 Answer 41 Views
Charts
This is a migrated thread and some comments may be shown as answers.
zhivko.zhelezov
Top achievements
Rank 1
zhivko.zhelezov asked on 12 Oct 2015, 01:18 PM

Hi folks,

I am working on the following scenario. On my page I have two components: kendo line chart and kendo grid. From the grid I am able to select rows and drag them to the chart. The problem I experience is that I can't transform the chart into kendoDropTarget. I have tried the following code, when the chart is rendered. Just bear in mind that I am using controller as syntax. What I am getting as a result is "TypeError: vm.trendChart.kendoDropTarget is not a function"

vm.addDropToChartSeries = function () {
            vm.trendChart.kendoDropTarget({
                dragenter: alert('drag area entered'),
                drop: alert('element dragged!')
            });
        }     

1 Answer, 1 is accepted

Sort by
0
Accepted
T. Tsonev
Telerik team
answered on 14 Oct 2015, 11:38 AM
Hi,

Perhaps the problem is that trendChart is the actual chart instance, not the DOM element.
Try something in the line of:
  vm.trendChart.element.kendoDropTarget({ ... })

I hope this helps.

Regards,
T. Tsonev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Charts
Asked by
zhivko.zhelezov
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Share this question
or