react-timeseries-charts icon indicating copy to clipboard operation
react-timeseries-charts copied to clipboard

Box styling on TimeMarker doesn't work

Open pbatleyGH opened this issue 6 years ago • 1 comments

🐛Bug report

Styling the box using infoStyles = {..., box: ...} does not do anything on a TimeMarker component.

I believe that this is because:

line 73 of TimeMarker.js unpacks the box property style: this.props.infoStyle.box,

then renders a label component which attempts to again unpack the box property style.box

function mergeStyles(style, isCentered) {
    return {
        boxStyle: merge(true, defaultBoxStyle, style.box ? style.box : {}),
        labelStyle: merge(
            true,
            isCentered ? defaultTextStyleCentered : defaultTextStyle,
            style.label ? style.label : {}
        )
    };
}

(to anyone needing a workaround, use: infoStyles = {..., box: { box: {...} }})

pbatleyGH avatar Jul 03 '19 10:07 pbatleyGH

i believe this was fixed in #403

brandly avatar Aug 24 '19 16:08 brandly