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

Add prop to style the date in 'infoTime' in eventMarker

Open Rossidges opened this issue 7 years ago • 7 comments

Firstly, brilliant library - thank you.

As far as i can tell you cannot change the style on this element of the EventMarker. It would be good if you could override this style as you can with markerStyle or infoStyle props.

It can sometimes be difficult to see the date on a busy chart.

I had a look at the code and added an extra prop - infoTimeStyle to override the default if present. If this is something you would be interesting in adding let me know and i can submit a pull request.

Thanks

Rossidges avatar Nov 09 '18 12:11 Rossidges

Sure you can submit this as a PR (sorry for the delayed response). We're trying to clean up the styling stuff so eventually the whole thing can be controlled with a theme, but priority is low right now.

pjm17971 avatar Dec 06 '18 18:12 pjm17971

Will do, understand it does not have a massive use case. Thanks

Rossidges avatar Dec 11 '18 21:12 Rossidges

@Rossidges Is there a client-side workaround for this that you can suggest?

gajus avatar Apr 02 '19 15:04 gajus

Sorry, have not found time to finalise and submit a PR. @gajus Could not see a way around it other than changing the library itself.

Rossidges avatar Apr 02 '19 15:04 Rossidges

Looks like it is just hard-coded with no way that I can see to modify externally.

https://github.com/esnet/react-timeseries-charts/blob/645d00563a0f00cca970b5a0c6ee8f3aa988112b/src/components/EventMarker.js#L22

gajus avatar Apr 02 '19 16:04 gajus

+1 for a feature where you can pass styles to the event marker. Hard to see the time in some cases Example ⬇ image

andrestrei avatar May 08 '19 14:05 andrestrei

@pjm17971 Any chance of this being addressed?

gajus avatar Jun 10 '19 09:06 gajus