Skip to content

[Metric] It's not possible to format non-numeric value #2206

Open

Description

Describe the issue

  1. Go here: https://codesandbox.io/s/long-legend-sizing-forked-h83q6s?file=/src/App.tsx:127-134 and analyze the code, specifically the passed valueFormatter.
  2. It will never run if the value is not a number
  3. If you change it to number, the valueFormatter runs

Specifically, here's my usecase: I am working on adding other types of data to be supported by visualization ('string', 'boolean', 'number', 'ip', 'date') to match the legacy metric.

Screenshot 2023-10-18 at 14 00 14

While strings, booleans and ip don't need extra format to be passed, we need it for dates as we get them as strings. Not sure if there's another way to handle that. Let me know if that's not a bug and there is another way!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    :metricRelated to Metric chartbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions