Open mtrsklnkvMM opened 5 years ago
@sartaj10 This looks like an enhancement, rather than a question. I don't see such capability being documented. I wasn't able to check time color or label value given current configuration options.
Just in case, this is where it is hard-coded:
I was just looking how to do this. Looks like it's not possible yet.
In case if someone needs a solution, you can pass a infoTimeFormat
property. Stylize it whatever you like.
e.g.
<BarChart
style={style}
series={series}
columns={columns}
info={this.state.infoValues}
// --------- magic goes here
infoTimeFormat={() => (<tspan style={{ fill: '#f00' }}>I AM RED</tspan>)}
/>)
Yet, that light-grey color is still hard-coded, you can inject SVG attributes all-over the places where formatting callbacks are supported.
You need to pass in infoStyle
instead of markerInfoStyle
and it should be of the following form:
<EventMarker
type="flag"
info={'this is my label'}
infoWidth={100}
infoStyle={{
label: {
fontWeight: 500,
fontSize: 14,
font: '"Goudy Bookletter 1911", sans-serif"',
fill: 'white',
},
box: {
fill: 'blue',
stroke: 'red',
},
}}
markerRadius={4}
markerStyle={{fill: 'white'}}
/>
I think documentation needs to be fixed to reflect infoStyle schema http://software.es.net/react-timeseries-charts/#/api/charts/EventMarker
Hello.
markerLabelStyle does not seem to work at all for when the type of the EventMarker is "flag". (it works ok when it's a point)
What I am trying to do is change the color of the label, but it stays grey.
My code: