formatHoverText: Format hover text for use in plotly interactive plots. The...

View source: R/miscellaneous.R

formatHoverTextR Documentation

Format hover text for use in plotly interactive plots. The labels are wrapped to multiple lines if exceed the width of the plotly hover box, e.g. in case labels for points with same x/y coordinates overlap, and corresponding labels are truncated.

Description

Format hover text for use in plotly interactive plots. The labels are wrapped to multiple lines if exceed the width of the plotly hover box, e.g. in case labels for points with same x/y coordinates overlap, and corresponding labels are truncated.

Usage

formatHoverText(x, label, width = 50)

Arguments

x

Vector with hover text information.

label

Label for the variable

width

Integer, number of characters at which the hover text should be cut at to multiple lines.

Value

String with formatted hover label.

Author(s)

Laure Cougnaud


clinDataReview documentation built on March 7, 2023, 5:13 p.m.