Skip to content
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

[Lens] Problem with custom Y axis extend #107622

Closed
sorenlouv opened this issue Aug 4, 2021 · 5 comments
Closed

[Lens] Problem with custom Y axis extend #107622

sorenlouv opened this issue Aug 4, 2021 · 5 comments
Labels
bug Fixes for quality problems that affect the customer experience Feature:Lens impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@sorenlouv
Copy link
Member

sorenlouv commented Aug 4, 2021

Kibana: 7.14.0

In #99203 it became possible to specify a custom extend for the y axis. However, there seems to be a bug.

In the following example I have 5 dimensions (called indices in the data - not to be confused with ES indices!!) which can have a value between 0 and 5. The dimension "humidity" (blue horizontal line) is y=1. Yet it is located somewhere around y=1.5

Another problem I notice is that the distance between 0 and 1 on the y axis is smaller than the distance between 1 and 2.

image

Click to view dataset to reproduce bug

Mappings:

{
  ".ds-awair-2021.08.03-000001" : {
    "mappings" : {
      "dynamic" : "false",
      "_data_stream_timestamp" : {
        "enabled" : true
      },
      "properties" : {
        "@timestamp" : {
          "type" : "date"
        },
        "indices" : {
          "properties" : {
            "co2" : {
              "type" : "float"
            },
            "humid" : {
              "type" : "float"
            },
            "pm25" : {
              "type" : "float"
            },
            "temp" : {
              "type" : "float"
            },
            "voc" : {
              "type" : "float"
            }
          }
        },
        "score" : {
          "type" : "float"
        },
        "sensors" : {
          "properties" : {
            "co2" : {
              "type" : "float"
            },
            "humid" : {
              "type" : "float"
            },
            "pm25" : {
              "type" : "float"
            },
            "temp" : {
              "type" : "float"
            },
            "voc" : {
              "type" : "float"
            }
          }
        },
        "timestamp" : {
          "type" : "date"
        }
      }
    }
  }
}

Documents

{
  "took" : 189,
  "timed_out" : false,
  "_shards" : {
    "total" : 1,
    "successful" : 1,
    "skipped" : 0,
    "failed" : 0
  },
  "hits" : {
    "total" : {
      "value" : 19,
      "relation" : "eq"
    },
    "max_score" : 1.0,
    "hits" : [
      {
        "_index" : ".ds-awair-2021.08.03-000001",
        "_type" : "_doc",
        "_id" : "mhs-EHsBUweF4hid45Qm",
        "_score" : 1.0,
        "_source" : {
          "@timestamp" : "2021-08-04T08:19:17.000Z",
          "score" : 90,
          "sensors" : {
            "humid" : 54.56999969482422,
            "temp" : 22.350000381469727,
            "co2" : 750,
            "voc" : 211,
            "pm25" : 4
          },
          "indices" : {
            "voc" : 0,
            "humid" : 1,
            "co2" : 1,
            "temp" : 0,
            "pm25" : 0
          }
        }
      },
      {
        "_index" : ".ds-awair-2021.08.03-000001",
        "_type" : "_doc",
        "_id" : "iBtDEHsBUweF4hidd5cg",
        "_score" : 1.0,
        "_source" : {
          "@timestamp" : "2021-08-04T08:24:18.000Z",
          "score" : 89,
          "sensors" : {
            "temp" : 22.329999923706055,
            "pm25" : 4,
            "voc" : 203,
            "co2" : 781,
            "humid" : 54.83000183105469
          },
          "indices" : {
            "humid" : 1,
            "pm25" : 0,
            "co2" : 1,
            "voc" : 0,
            "temp" : 0
          }
        }
      },
      {
        "_index" : ".ds-awair-2021.08.03-000001",
        "_type" : "_doc",
        "_id" : "aRtIEHsBUweF4hidC5r8",
        "_score" : 1.0,
        "_source" : {
          "@timestamp" : "2021-08-04T08:29:19.000Z",
          "score" : 89,
          "sensors" : {
            "humid" : 54.630001068115234,
            "co2" : 813,
            "voc" : 216,
            "temp" : 22.389999389648438,
            "pm25" : 3
          },
          "indices" : {
            "temp" : 0,
            "co2" : 1,
            "humid" : 1,
            "pm25" : 0,
            "voc" : 0
          }
        }
      },
      {
        "_index" : ".ds-awair-2021.08.03-000001",
        "_type" : "_doc",
        "_id" : "KRtMEHsBUweF4hidn50e",
        "_score" : 1.0,
        "_source" : {
          "@timestamp" : "2021-08-04T08:34:20.000Z",
          "score" : 89,
          "sensors" : {
            "co2" : 818,
            "pm25" : 4,
            "voc" : 209,
            "temp" : 22.3700008392334,
            "humid" : 54.400001525878906
          },
          "indices" : {
            "voc" : 0,
            "co2" : 1,
            "pm25" : 0,
            "temp" : 0,
            "humid" : 1
          }
        }
      },
      {
        "_index" : ".ds-awair-2021.08.03-000001",
        "_type" : "_doc",
        "_id" : "RxQ5EHsBMwNSdHuoWw1E",
        "_score" : 1.0,
        "_source" : {
          "@timestamp" : "2021-08-04T08:13:15.000Z",
          "score" : 90,
          "sensors" : {
            "temp" : 22.219999313354492,
            "co2" : 700,
            "pm25" : 2,
            "humid" : 55.029998779296875,
            "voc" : 241
          },
          "indices" : {
            "voc" : 0,
            "pm25" : 0,
            "temp" : 0,
            "humid" : 1,
            "co2" : 1
          }
        }
      },
      {
        "_index" : ".ds-awair-2021.08.03-000001",
        "_type" : "_doc",
        "_id" : "YRs6EHsBUweF4hidTo4G",
        "_score" : 1.0,
        "_source" : {
          "@timestamp" : "2021-08-04T08:14:15.000Z",
          "score" : 90,
          "sensors" : {
            "voc" : 242,
            "pm25" : 4,
            "humid" : 55.439998626708984,
            "co2" : 715,
            "temp" : 22.100000381469727
          },
          "indices" : {
            "co2" : 1,
            "pm25" : 0,
            "voc" : 0,
            "temp" : 0,
            "humid" : 1
          }
        }
      },
      {
        "_index" : ".ds-awair-2021.08.03-000001",
        "_type" : "_doc",
        "_id" : "8htxEHsBUweF4hidP6sD",
        "_score" : 1.0,
        "_source" : {
          "@timestamp" : "2021-08-04T09:14:21.000Z",
          "score" : 91,
          "sensors" : {
            "pm25" : 3,
            "temp" : 22.56999969482422,
            "co2" : 762,
            "humid" : 52.810001373291016,
            "voc" : 181
          },
          "indices" : {
            "co2" : 1,
            "voc" : 0,
            "temp" : 0,
            "pm25" : 0,
            "humid" : 1
          }
        }
      },
      {
        "_index" : ".ds-awair-2021.08.03-000001",
        "_type" : "_doc",
        "_id" : "jpN6EHsB_34J8BfQZoHK",
        "_score" : 1.0,
        "_source" : {
          "@timestamp" : "2021-08-04T09:24:13.000Z",
          "score" : 93,
          "sensors" : {
            "co2" : 680,
            "humid" : 52.15999984741211,
            "pm25" : 2,
            "voc" : 161,
            "temp" : 22.389999389648438
          },
          "indices" : {
            "temp" : 0,
            "voc" : 0,
            "co2" : 1,
            "pm25" : 0,
            "humid" : 1
          }
        }
      },
      {
        "_index" : ".ds-awair-2021.08.03-000001",
        "_type" : "_doc",
        "_id" : "hpN1EHsB_34J8BfQ0n_n",
        "_score" : 1.0,
        "_source" : {
          "@timestamp" : "2021-08-04T09:19:12.000Z",
          "score" : 92,
          "sensors" : {
            "voc" : 171,
            "co2" : 716,
            "humid" : 52.2599983215332,
            "temp" : 22.459999084472656,
            "pm25" : 3
          },
          "indices" : {
            "voc" : 0,
            "temp" : 0,
            "pm25" : 0,
            "humid" : 1,
            "co2" : 1
          }
        }
      },
      {
        "_index" : ".ds-awair-2021.08.03-000001",
        "_type" : "_doc",
        "_id" : "qhtVEHsBUweF4hidxqD4",
        "_score" : 1.0,
        "_source" : {
          "@timestamp" : "2021-08-04T08:44:13.000Z",
          "score" : 90,
          "sensors" : {
            "humid" : 54.029998779296875,
            "co2" : 798,
            "voc" : 184,
            "temp" : 22.530000686645508,
            "pm25" : 3
          },
          "indices" : {
            "temp" : 0,
            "pm25" : 0,
            "humid" : 1,
            "co2" : 1,
            "voc" : 0
          }
        }
      }
    ]
  }
}
@sorenlouv sorenlouv added the bug Fixes for quality problems that affect the customer experience label Aug 4, 2021
@botelastic botelastic bot added the needs-team Issues missing a team label label Aug 4, 2021
@sorenlouv sorenlouv added Feature:Lens Team:Visualizations Visualization editors, elastic-charts and infrastructure labels Aug 4, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Aug 4, 2021
@sorenlouv sorenlouv assigned sorenlouv and unassigned sorenlouv Aug 4, 2021
@sorenlouv
Copy link
Member Author

sorenlouv commented Aug 4, 2021

I just realize that the type for the indices fields is float. Could this be the problem (probably should be byte or another floating-point number type since the values are integers between 0 and 5). Still, I don't think the viz should behave the way it does.

@sorenlouv
Copy link
Member Author

sorenlouv commented Aug 4, 2021

Oh, there's definitely something going on with formatting of floating point numbers.

If I format the value with 1 decimal it displays correctly:
image

If I format the value with 0 decimals it displays incorrectly:
image

@ghudgins ghudgins added the impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. label Aug 4, 2021
@ghudgins
Copy link
Contributor

ghudgins commented Aug 4, 2021

Another problem I notice is that the distance between 0 and 1 on the y axis is smaller than the distance between 1 and 2.

another case of #97100

@stratoula
Copy link
Contributor

I looked a bit into it. This will be solved when #97100 will be addressed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Lens impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

No branches or pull requests

4 participants