I'm from WebDriver+Java background and new to Protractor, WebDriverJS and Jasmine. I have a page object and there I'm trying to define a function that will hover over a pie chart on a given X Y coordinates and get the tool tip value and return it back to the calling function. But so far no luck. Can anyone please help me to find a better solution for this?

```
this.getDisCount = function() {
    var dis = element(by
            .css('#piecontainer .highcharts-series>path[fill="#434348"]'));
    return dis.getSize().then(function(size) {
        return (size['height'] / 2).then(function(value) {
            return browser.actions().mouseMove(dis, {
                x : value,
                y : 0
            }).perform().then(function() {
                return element(by.css('#piecontainer g.highcharts-tooltip tspan:nth-of-type(6)')).getText().then(function(text) {
                    return text;
                });
            });
        });
    });
} 

```

Getting the following exception with the above code.

* Failed: (size.height / 2).then is not a function
 at D:\workspace\eclipse\IotTester\page\UseCase1\HomePage.js:85:32
 at D:\workspace\eclipse\IotTester\node\_modules\protractor\built\element.js
:697:28