react-timeseries-charts
react-timeseries-charts copied to clipboard
Style the time in TimeMarker
🌈Feature request
What is this feature? Ability to style the time string in the TimeMarker.
How should the feature work? Just like the line and the info box and its labels, the time string should also be allowed to be styled to maintain a consistent styling.
Do you have examples or an idea of how it can be implemented?
We can pass the style as an embedded object within infoStyle props, just like the others. In src/components/TimeMarker.js, we can pass an infoStyle.time style object:
renderTimeMarker(d) {
const textStyle = {
fontSize: 11,
textAnchor: "left",
fill: "#bdbdbd",
...this.props.infoStyle.time // <-- new embedded prop
};
Additional context
The suggested style using infoStyle.time is based on the following styles used in TimeMarker:
infoStyle.lineinfoStyle.boxinfoStyle.label