New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to 5.1: b.a.valueFormats[e] is not a function #11743

Closed
simonszu opened this Issue Apr 26, 2018 · 5 comments

Comments

Projects
None yet
3 participants
@simonszu

simonszu commented Apr 26, 2018

What Grafana version are you using?

Grafana v5.1.0 (844bdc5) (via Docker)

What datasource are you using?

InfluxDB

What OS are you running grafana on?

Debian, via Docker

What did you do?

Upgraded the Docker Container to 5.1.0

What was the expected result?

All Dashboards running fine and showing me my graphs

What happened instead?

All Dashboards run fine, except one. It is empty, and shows the error from the issue title.

If related to metric query / data viz:

SELECT distinct("value") FROM "ppm" WHERE ("entity_id" = 'feinstaub_pm10') AND $timeFilter GROUP BY time($__interval) fill(null)

Include raw network request & response: get by opening Chrome Dev Tools (F12, Ctrl+Shift+I on windows, Cmd+Opt+I on Mac), go the network tab.

flotcharts error TypeError: b.a.valueFormats[e] is not a function
   at Object.F.t.tickFormatter (graph.ts:708)
   at Object.C.t.isFunction.e.tickFormatter (jquery.flot.js:1819)
   at T (jquery.flot.js:1886)
   at Object.<anonymous> (jquery.flot.js:1630)
   at Function.each (jquery.js:362)
   at k (jquery.flot.js:1627)
   at new n (jquery.flot.js:716)
   at Function.t.plot (jquery.flot.js:3196)
   at p (graph.ts:346)
   at l (0.a84ed15….js:26463)

in graph.ts:353

@daniellee daniellee added this to the 5.1.1 milestone Apr 26, 2018

@daniellee

This comment has been minimized.

Show comment
Hide comment
@daniellee

daniellee Apr 26, 2018

Member

Thanks for reporting this - we will investigate this and include it an patch release.

Member

daniellee commented Apr 26, 2018

Thanks for reporting this - we will investigate this and include it an patch release.

@marefr marefr self-assigned this Apr 27, 2018

@marefr

This comment has been minimized.

Show comment
Hide comment
@marefr

marefr Apr 27, 2018

Member

@simonszu could you please provide the panel json of the panel that's failing to render? I'm having issues reproducing this.

Member

marefr commented Apr 27, 2018

@simonszu could you please provide the panel json of the panel that's failing to render? I'm having issues reproducing this.

@simonszu

This comment has been minimized.

Show comment
Hide comment
@simonszu

simonszu Apr 27, 2018

Sure. Here you are:

{
  "aliasColors": {},
  "bars": false,
  "dashLength": 10,
  "dashes": false,
  "datasource": "Home Assistant",
  "fill": 1,
  "gridPos": {
    "h": 8,
    "w": 6,
    "x": 12,
    "y": 29
  },
  "id": 13,
  "legend": {
    "avg": false,
    "current": false,
    "max": false,
    "min": false,
    "show": true,
    "total": false,
    "values": false
  },
  "lines": true,
  "linewidth": 1,
  "links": [],
  "nullPointMode": "null",
  "percentage": false,
  "pointradius": 5,
  "points": false,
  "renderer": "flot",
  "seriesOverrides": [],
  "spaceLength": 10,
  "stack": false,
  "steppedLine": false,
  "targets": [
    {
      "alias": "PM 10",
      "dsType": "influxdb",
      "groupBy": [
        {
          "params": [
            "$__interval"
          ],
          "type": "time"
        },
        {
          "params": [
            "null"
          ],
          "type": "fill"
        }
      ],
      "measurement": "ppm",
      "orderByTime": "ASC",
      "policy": "default",
      "refId": "A",
      "resultFormat": "time_series",
      "select": [
        [
          {
            "params": [
              "value"
            ],
            "type": "field"
          },
          {
            "params": [],
            "type": "distinct"
          }
        ]
      ],
      "tags": [
        {
          "key": "entity_id",
          "operator": "=",
          "value": "feinstaub_pm10"
        }
      ]
    },
    {
      "alias": "PM 2.5",
      "dsType": "influxdb",
      "groupBy": [
        {
          "params": [
            "$__interval"
          ],
          "type": "time"
        },
        {
          "params": [
            "null"
          ],
          "type": "fill"
        }
      ],
      "measurement": "ppm",
      "orderByTime": "ASC",
      "policy": "default",
      "refId": "B",
      "resultFormat": "time_series",
      "select": [
        [
          {
            "params": [
              "value"
            ],
            "type": "field"
          },
          {
            "params": [],
            "type": "distinct"
          }
        ]
      ],
      "tags": [
        {
          "key": "entity_id",
          "operator": "=",
          "value": "feinstaub_pm25"
        }
      ]
    }
  ],
  "thresholds": [],
  "timeFrom": null,
  "timeShift": null,
  "title": "Feinstaubbelastung",
  "tooltip": {
    "shared": true,
    "sort": 0,
    "value_type": "individual"
  },
  "type": "graph",
  "xaxis": {
    "buckets": null,
    "mode": "time",
    "name": null,
    "show": true,
    "values": []
  },
  "yaxes": [
    {
      "format": "ppm",
      "label": null,
      "logBase": 10,
      "max": null,
      "min": null,
      "show": true
    },
    {
      "format": "short",
      "label": null,
      "logBase": 10,
      "max": null,
      "min": null,
      "show": true
    }
  ],
  "yaxis": {
    "align": false,
    "alignLevel": null
  }
}

simonszu commented Apr 27, 2018

Sure. Here you are:

{
  "aliasColors": {},
  "bars": false,
  "dashLength": 10,
  "dashes": false,
  "datasource": "Home Assistant",
  "fill": 1,
  "gridPos": {
    "h": 8,
    "w": 6,
    "x": 12,
    "y": 29
  },
  "id": 13,
  "legend": {
    "avg": false,
    "current": false,
    "max": false,
    "min": false,
    "show": true,
    "total": false,
    "values": false
  },
  "lines": true,
  "linewidth": 1,
  "links": [],
  "nullPointMode": "null",
  "percentage": false,
  "pointradius": 5,
  "points": false,
  "renderer": "flot",
  "seriesOverrides": [],
  "spaceLength": 10,
  "stack": false,
  "steppedLine": false,
  "targets": [
    {
      "alias": "PM 10",
      "dsType": "influxdb",
      "groupBy": [
        {
          "params": [
            "$__interval"
          ],
          "type": "time"
        },
        {
          "params": [
            "null"
          ],
          "type": "fill"
        }
      ],
      "measurement": "ppm",
      "orderByTime": "ASC",
      "policy": "default",
      "refId": "A",
      "resultFormat": "time_series",
      "select": [
        [
          {
            "params": [
              "value"
            ],
            "type": "field"
          },
          {
            "params": [],
            "type": "distinct"
          }
        ]
      ],
      "tags": [
        {
          "key": "entity_id",
          "operator": "=",
          "value": "feinstaub_pm10"
        }
      ]
    },
    {
      "alias": "PM 2.5",
      "dsType": "influxdb",
      "groupBy": [
        {
          "params": [
            "$__interval"
          ],
          "type": "time"
        },
        {
          "params": [
            "null"
          ],
          "type": "fill"
        }
      ],
      "measurement": "ppm",
      "orderByTime": "ASC",
      "policy": "default",
      "refId": "B",
      "resultFormat": "time_series",
      "select": [
        [
          {
            "params": [
              "value"
            ],
            "type": "field"
          },
          {
            "params": [],
            "type": "distinct"
          }
        ]
      ],
      "tags": [
        {
          "key": "entity_id",
          "operator": "=",
          "value": "feinstaub_pm25"
        }
      ]
    }
  ],
  "thresholds": [],
  "timeFrom": null,
  "timeShift": null,
  "title": "Feinstaubbelastung",
  "tooltip": {
    "shared": true,
    "sort": 0,
    "value_type": "individual"
  },
  "type": "graph",
  "xaxis": {
    "buckets": null,
    "mode": "time",
    "name": null,
    "show": true,
    "values": []
  },
  "yaxes": [
    {
      "format": "ppm",
      "label": null,
      "logBase": 10,
      "max": null,
      "min": null,
      "show": true
    },
    {
      "format": "short",
      "label": null,
      "logBase": 10,
      "max": null,
      "min": null,
      "show": true
    }
  ],
  "yaxis": {
    "align": false,
    "alignLevel": null
  }
}
@marefr

This comment has been minimized.

Show comment
Hide comment
@marefr

marefr Apr 27, 2018

Member

@simonszu you're having problem due to that the unit ppm have been renamed to parts-per-million (ppm). This change is something that we usually not allow, but unfortunately we missed it. Will re-open this issue aiming at reverting the name change.

As a workaround please update the unit manually for the left Y-Axis.

Thanks for reporting

Member

marefr commented Apr 27, 2018

@simonszu you're having problem due to that the unit ppm have been renamed to parts-per-million (ppm). This change is something that we usually not allow, but unfortunately we missed it. Will re-open this issue aiming at reverting the name change.

As a workaround please update the unit manually for the left Y-Axis.

Thanks for reporting

@marefr marefr closed this Apr 27, 2018

@marefr marefr reopened this Apr 27, 2018

@simonszu

This comment has been minimized.

Show comment
Hide comment
@simonszu

simonszu Apr 27, 2018

Okay, renaming the unit for the Y-Axis fixed it for me. I wouldn't have commented this, but after you re-opened this issue, i suppose there will be other guys coming here and seeking for help. The measurements i try to display are from a DIY fine-dust sensor, which is currently quite popular to build among german hackerspaces. Maybe there are others who display the measurements in their Grafana.

simonszu commented Apr 27, 2018

Okay, renaming the unit for the Y-Axis fixed it for me. I wouldn't have commented this, but after you re-opened this issue, i suppose there will be other guys coming here and seeking for help. The measurements i try to display are from a DIY fine-dust sensor, which is currently quite popular to build among german hackerspaces. Maybe there are others who display the measurements in their Grafana.

marefr added a commit that referenced this issue Apr 27, 2018

revert renaming of unit key ppm
#11211 removed the unit key ppm in favor of conppm. A change which is not forward compatible.
This commit revert the unit key back to ppm.
Also adds some better error description if trying to use a unit which don't exists.
Fixes #11743

@marefr marefr closed this in #11753 Apr 27, 2018

marefr added a commit that referenced this issue May 7, 2018

revert renaming of unit key ppm
#11211 removed the unit key ppm in favor of conppm. A change which is not forward compatible.
This commit revert the unit key back to ppm.
Also adds some better error description if trying to use a unit which don't exists.
Fixes #11743

(cherry picked from commit 138c8c3)

marefr added a commit that referenced this issue May 7, 2018

changelog: 5.1.1 update
add notes about closing #11743 and add release data for 5.1.1
[skip ci]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment