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

[Solved] Getting TypeError: undefined is not a function in scatterplot

3 Answers 195 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Casper
Top achievements
Rank 1
Casper asked on 23 Sep 2014, 11:25 AM
I've setup a scatterplot as in the documentation and I'm getting the above error when hovering in the chart area after having clicked one of the graph points.

Controller contains this:
​$scope.onSeriesHover = function (e) {
}

function getDataForGraph() {
    graphDataService.getData('issuer.sector', $scope.selectedSector).then(function (result) {
        $scope.data = result;
});
}
and the view this:
<div kendo-chart
k-series-defaults="{type: 'scatter'}"
k-series="[{xField:'duration', yField:'cost'}]"
k-x-axis="{
labels: { format: '{0}' },
title: { text: 'Duration' }
}"
k-y-axis="{
labels: { format: '{0}' },
title: { text: 'Cost }
}"
k-data-source="data"
k-series-click="onSeriesClick"
k-series-hover="onSeriesHover"></div>

After the controller is initialized the getDataForGraph method is called.
It displays data perfectly but I get this TypeError all the time after the first click on the graph.

I've attached a screenshot from the chrome dev tools if this could help. As I'm on the trial version I do not have access to the full code.

3 Answers, 1 is accepted

Sort by
0
Casper
Top achievements
Rank 1
answered on 23 Sep 2014, 11:44 AM
It appears doing the below stops this error:

​$scope.onSeriesHover = function (e) {
    e.preventDefault();
}

but this should hardly be necessary?
0
Casper
Top achievements
Rank 1
answered on 23 Sep 2014, 06:17 PM
It also happens on the demo site, see attached.
0
Iliana Dyankova
Telerik team
answered on 24 Sep 2014, 11:06 AM
Hi Casper,
 
This is a known issue, however it has been already addressed - the fix is available in our latest internal build. I would suggest to open a support ticket where we will send you one (as we cannot send internal builds in public forums).

Regards,
Iliana Nikolova
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
Casper
Top achievements
Rank 1
Answers by
Casper
Top achievements
Rank 1
Iliana Dyankova
Telerik team
Share this question
or