Skip to content

[Enhancement]: Chart tooltip with single data point should not show group line #2047

@brandones

Description

@brandones

Application/Team

OpenMRS (not IBM)

Summary

The ruler tooltip in the LineChart looks sensible when there are multiple data points—it highlights the value rows in their respective line colors and does not show the "Group" row. However, the tooltip for a single data point does not highlight the value rows, but instead shows another row called "Group" and highlights that, which does not seem useful.

Bad:
Image

Good:
Image

Justification

For a single data point, in the use cases I am concerned with, the group is simply the data label.

Desired UX and success metrics

When only one data point is shown in the tooltip, the data row should be highlighted and no Group row should show.

"Must have" functionality

As above. Having this be a configurable option would be fine, assuming the inclusion of the "Group" row for single data point tooltips was intentional.

Specific timeline issues / requests

No timeline.

Available extra resources

I would be happy to make the change if given some indication that it would be accepted. The code in question is here:

items.push({
label: get(options, 'locale.translations.group') || get(options, 'tooltip.groupLabel'),
value: datum[groupMapsTo],
color: this.model.getFillColor(datum[groupMapsTo]),
class: this.model.getColorClassName({
classNameTypes: [ColorClassNameTypes.TOOLTIP],
dataGroupName: datum[groupMapsTo]
})
.

I request suggestions about what the new configuration option(s) should be called. Since I don't understand why the "Group" row is there in the first place, I don't really know what the semantics should be. tooltip: { showGroup: false } would be my suggestion.

What priority level would this issue be in your opinion?

P2

Sorry, I don't know what IBM's priority levels signify.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions