Skip to content

Calculation for labelswith minValue not working as expected #22

@Gunjer

Description

@Gunjer

While including a minValue, the calculateLabelFromValue function was not working as expected.
Current Formula: value / maxValue - minValue - src/utils/calculate-label-fromvalue.js
Example Testdata:
value = 4.4
maxValue = 5.0
minValue = 1.0
value / (maxValue - minValue) > 1

Suggested revision: (value - minValue) / (maxValue - minValue)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions