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

Uncaught TypeError

1 Answer 377 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Torben
Top achievements
Rank 1
Torben asked on 24 Mar 2018, 10:46 AM

I'm getting an Uncaught TypeError: Cannot read property 'width' of undefined

When moving the mouse over the dashed line. I doesn't seem to be fatal though...

 

interface Model {
    interval: string;
    count: number;
    color: string;
}
@Component({
    selector: 'app-chart6',
    template: `
    <kendo-chart>
        <kendo-chart-axis-defaults [majorGridLines]="{ visible: false }"></kendo-chart-axis-defaults>   
        <kendo-chart-series>
            <kendo-chart-series-item type="column" [data]="seriesData" [color]="color" field="count" categoryField="interval"></kendo-chart-series-item>
            <kendo-chart-series-item type="line" [data]="lineData" dashType="longDash" markers="{ visible: false }" color="#000000"></kendo-chart-series-item>
        </kendo-chart-series>
    </kendo-chart>
    `
})
export class Chart6Component {
    public lineData: number[] = [150, 150, 150];
    public seriesData: Model[] = [{
        interval: "10",
        count: 200,
        color: "#00FF00"
    }, {
        interval: "11",
        count: 250,
        color: "#0000FF"
    }, {
        interval: "12",
        count: 150,
        color: "#00FFFF"
    }];
}

 

 

Uncaught TypeError: Cannot read property 'width' of undefined
    at LinePoint.createHighlight (line-point.js:196)
    at LinePoint.toggleHighlight (chart-element.js:270)
    at Highlight.togglePointHighlight (highlight.js:51)
    at Highlight.show (highlight.js:27)
    at Chart._startHover (chart.js:1039)
    at Chart._mouseover (chart.js:1052)
    at Surface.trigger (observable.js:94)
    at HTMLDivElement.eval (surface.js:135)
    at ZoneDelegate.invokeTask (zone.js:421)
    at Zone.runTask (zone.js:188)

 

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 27 Mar 2018, 07:07 AM
Hello,

The markers input should be set via property binding - example. Otherwise the value will be set as string.

Regards,
Daniel
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
General Discussions
Asked by
Torben
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or