grafana / grafana-polystat-panel

D3-Based hexagon layout multi-stat panel
Apache License 2.0
93 stars 29 forks source link

Won't show large number of polygons #53

Closed crawforde closed 5 years ago

crawforde commented 5 years ago

I'm trying to show 43 polygons to display the AWS monthly budget breakdown using the cloudwatch billing api. Each polygon shows the price paid for a specific AWS service. My target list looks like the following (aliases are numbers for debugging purposes):

[
    {
      "alias": "1",
      "dimensions": {
        "Currency": "USD",
        "ServiceName": "AWSBudgets"
      },
      "expression": "",
      "highResolution": false,
      "id": "",
      "metricName": "EstimatedCharges",
      "namespace": "AWS/Billing",
      "period": "1M",
      "refId": "A",
      "region": "us-east-1",
      "returnData": false,
      "statistics": [
        "Maximum"
      ]
    },
    {
      "alias": "2",
      "dimensions": {
        "Currency": "USD",
        "ServiceName": "AWSCloudTrail"
      },
      "expression": "",
      "highResolution": false,
      "id": "",
      "metricName": "EstimatedCharges",
      "namespace": "AWS/Billing",
      "period": "1M",
      "refId": "B",
      "region": "us-east-1",
      "returnData": false,
      "statistics": [
        "Maximum"
      ]
    },

    ...

    {
      "alias": "43",
      "dimensions": {
        "Currency": "USD",
        "ServiceName": "datapipeline"
      },
      "expression": "",
      "highResolution": false,
      "id": "",
      "metricName": "EstimatedCharges",
      "namespace": "AWS/Billing",
      "period": "1M",
      "region": "us-east-1",
      "returnData": false,
      "statistics": [
        "Maximum"
      ]
    }
  ]

My max polygon number is set to 43, but unfortunately, only 26 polygons are shown. I've tried recreating the panel in multiple ways (directly through the Grafana UI, by pasting JSON, etc.). Still can't get all the polygons to show up, and which ones are hidden on a given attempt seems to be non-deterministic.

briangann commented 5 years ago

Let me try to reproduce this. The layout doesn't use all of the space it could, and may be hiding polygons.

Can you share the complete dashboard/panel json (with any private info removed)?

crawforde commented 5 years ago

I was just prepping the JSON blob to send when I realized that the hidden targets were all missing the "refId" field. Opening up the JSON editor and filling in these fields completely fixed the problem. This seems to be a bug with the Grafana UI since it stops assigning refIds to targets after 'A' through 'Z' are used.

crawforde commented 5 years ago

Seems like this is an open issue already: https://github.com/grafana/grafana/issues/4978. I'll go ahead and close this since it's not an issue with the polystat plugin.