Skip to content

Support ternaries in marker labels #5818

@carverdamien

Description

@carverdamien

This issue relates to https://bugzilla.mozilla.org/show_bug.cgi?id=2014999

parseLabel() only supports accessing fields in the marker, if we could process the fields with operators such as the ternary, we would be able to remove fields from the recorded data that can be deduced from other fields.

For example, the TimerMarker uses a prefix string field to display a ❌ when the timer is canceled. A better solution would be to use a ternary in the label string, like this

schema.SetChartLabel("{marker.data.canceled ? \"❌\" : \"\"} {marker.data.delay}");

┆Issue is synchronized with this Jira Task

Metadata

Metadata

Assignees

Labels

markersAnything to do with marker data structures, marker chart, or the marker tablepolishSmall features or changes that do not require planning to work on. These help out our end users.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions