esnet / esnet/react-timeseries-charts
Style the time in TimeMarker
- Dominant language
- JavaScript
- Stars
- 876
- Forks
- 279
- PR merge metrics
- No merged PRs in 30d
Description
# 🌈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.line`
* `infoStyle.box`
* `infoStyle.label`
Contributor guide
Assessment
This issue has not been assessed yet.