question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: this.datapoints is undefined

See original GitHub issue

I just selected pie chart and set “Group by” to Terms and “select field” to source and then Grafana crashes and print this stacktrace

TypeError: this.datapoints is undefined

    in t
    in div
    in div
    in r
    in l
    in div
    in div
    in div
    in t
    in t
    in div
    in t
    in t
    in div
    in div
    in t
    in Connect(t)
    in div
    in t
    in div
    in e
    in DraggableCore
    in e
    in div
    in ReactGridLayout
    in Unknown
    in SizeMeReferenceWrapper
    in SizeMeRenderer(Component)
    in SizeMe(Component)
    in e
    in div
    in div
    in div
    in t
    in t
    in div
    in div
    in e
    in Connect(e)
    in Suspense
    in t
    in Unknown
    in d
    in Unknown
    in Unknown
    in t
    in t
    in a

This is stacktrace from comments from #202, which seems that is different issue like motoko89 issue

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:8

github_iconTop GitHub Comments

4reactions
Berbecommented, Nov 11, 2020

System information

  • Grafana v7.2.1 - Also triggered on Grafana v7.3.1 with different stacktrace, see below
  • Pie Chart plugin v1.6.1
  • Elasticsearch 7.0+ datasource

Error

Same error with a different stacktrace in browser console.

TypeError: this.datapoints is undefined
TypeError: this.datapoints is undefined
    value time_series2.ts:359
    e time_series2.ts:134
    seriesHandler piechart_ctrl.ts:103
    onDataReceived piechart_ctrl.ts:97
    emit index.js:181
    value emitter.ts:29
    value QueryEditorRow.tsx:320
    value QueryEditorRow.tsx:120
    React 13
        mc
        unstable_runWithPriority
        Wo
        gc
        ic
        Xo
        unstable_runWithPriority
        Wo
        Xo
        Yo
        ec
        enqueueSetState
        setState
    value QueriesTab.tsx:96
    next QueriesTab.tsx:75
    RxJS 8
        __tryOrUnsub
        next
        _next
        next
        _next
        next
        next
        nextInfiniteTimeWindow
    next PanelQueryRunner.ts:195
    RxJS 21
        __tryOrUnsub
        next
        _next
        next
        notifyNext
        _next
        next
        _next
        next
        next
        _next
        next
        _next
        next
        _next
        next
        _next
        next
        _next
        next
        l
react-dom.production.min.js:196:194
    React 17
    value QueriesTab.tsx:96
    next QueriesTab.tsx:75
    RxJS 8
    next PanelQueryRunner.ts:195
    RxJS 21

Steps to reproduce

  1. Create a Pie Chart visualisation
  2. Use an Elasticsearch source
  3. Change the Metric aggregation from the default Count to Logs

Grafana v7.3.1 - Steps to reproduce

  1. Create a graph visualisation
  2. Use an Elasticsearch source
  3. Change Group by to Terms, select an available term (indexed, to work) and change Order by to Doc Count
  4. Switch the visualisation to Pie Chart
Boom
TypeError: this.datapoints is undefined
    value time_series2.ts:359
    e time_series2.ts:134
    seriesHandler piechart_ctrl.ts:103
    onDataReceived piechart_ctrl.ts:97
    emit index.js:181
    value emitter.ts:29
    value QueryEditorRow.tsx:320
    value QueryEditorRow.tsx:120
    React 13
        mc
        unstable_runWithPriority
        Wo
        gc
        ic
        Xo
        unstable_runWithPriority
        Wo
        Xo
        Yo
        ec
        enqueueSetState
        setState
    value QueriesTab.tsx:96
    next QueriesTab.tsx:75
    RxJS 19
        __tryOrUnsub
        next
        _next
        next
        _next
        next
        notifyNext
        _next
        next
        n
        _trySubscribe
        subscribe
        s
        _innerSub
        _tryNext
        _next
        next
        next
        nextInfiniteTimeWindow
    next PanelQueryRunner.ts:203
    RxJS 21
        __tryOrUnsub
        next
        _next
        next
        notifyNext
        _next
        next
        _next
        next
        next
        _next
        next
        _next
        next
        _next
        next
        _next
        next
        _next
        next
        l
react-dom.production.min.js:196:194
    React 17
        fu
        callback
        Oi
        mi
        mc
        unstable_runWithPriority
        Wo
        gc
        ic
        Xo
        unstable_runWithPriority
        Wo
        Xo
        Yo
        ec
        enqueueSetState
        setState
    value QueriesTab.tsx:96
    next QueriesTab.tsx:75
    RxJS 19
        __tryOrUnsub
        next
        _next
        next
        _next
        next
        notifyNext
        _next
        next
        n
        _trySubscribe
        subscribe
        s
        _innerSub
        _tryNext
        _next
        next
        next
        nextInfiniteTimeWindow
    next PanelQueryRunner.ts:203
    RxJS 21
        __tryOrUnsub
        next
        _next
        next
        notifyNext
        _next
        next
        _next
        next
        next
        _next
        next
        _next
        next
        _next
        next
        _next
        next
        _next
        next
        l
2reactions
bacherolcommented, Apr 22, 2020

Hey.

Try using Group by term + Timestamp. Like this one: Screen Shot 2020-04-22 at 12 31 32

Read more comments on GitHub >

github_iconTop Results From Across the Web

Problem with Worldmap 0.3.3 and Grafana 8.0.2 - Reddit
With Flux I'm running an Data Error: "TypeError: undefined is not an object (evaluating 'this.datapoints.length')".
Read more >
How to display Data on the World Map Plugin - Configuration
But as soon as i enable the query, the map can't be displayed anymore and i get a “TypeError: this.datapoints is undefined”.
Read more >
Can somebody help me TypeError: Cannot read property 'map ...
I guess what you can do to check why it is undefined is by using the Chrome Devtool breakpoint and see Chart component's...
Read more >
empty dataPoints causes error | CanvasJS Charts
TypeError : k.dataPoints[h] is undefined ….axisX.maximum?this._options.axisX.maximum:Infinity;if(k.dataPoints[h].x&&k.data…
Read more >
grafana - Bountysource
TypeError : this.datapoints is undefined $ 0. Created 2 years ago in grafana/piechart-panel with 6 comments. I just selected pie ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found