Skip to content

valueText="0" is treated as falsy #35

@doug-a-brunner

Description

@doug-a-brunner

It seems that if, using the JS API (options object), you set valueText to anything that can be parsed as a number, it will be parsed as such and treated as falsy by the underlying canvas-gauges. This can result in some confusing glitches. I found that canvas-gauges on its own suffers from the same problem, but only if you use its HTML attribute API (data-value-text="0" appears falsy, which is really a limitation of the API's design). If you provide it an option object with valueText: "0", it is correctly treated as truthy and rendered.

ng-canvas-gauges should provide its values to canvas-gauges using the JS API to avoid this problem.

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