Warning: Failed prop type: Invalid prop `info` supplied to `EventMarker`.
Hey, I was wondering if anybody could help with this issue I'm having. I have a Linechart with this EventMarker code, and on the page everything is functioning okay, but I get this warning the first time my chart component is mounted.
Warning: Failed prop type: Invalid prop info supplied to EventMarker.
Any idea why? I did various null checks to make sure it wasn't passing info something that was null (like state not being initialized), but that still led to the warning.
return (
<EventMarker
axis="axis"
event={this.state.trackerEvent}
column="value"
info={[
{ label: "Reason For Change", value: this.state.trackerStoryReason},
{ label: "Sprint Name", value: this.state.trackerStoryName},
{ label: "Change", value: this.state.trackerValue},
]}
infoTimeFormat="%b %e, %I:%M %p"
infoWidth={225}
infoHeight={80}
markerRadius={3}
markerStyle={{ fill : "red" }}
/>
);
Is one of the things you're passing in as value (this.state.trackerValue for example) not a string? Both label and value need to be strings and that's enforced in the prop types.
Yup! That was it! Thank you!