You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@echarts.apache.org by nicke <ni...@bliq.se> on 2021/11/06 20:36:02 UTC
How do I get the Y-value in a formatter function?
I am using markPoint to show the min & max -values. Time is on the
x-axis so the param sent to the formatter is the Date. I also want to
show the categorical Y-value? Is there a way to access it?
Code is something like:
series: [
{
type: 'line',
markPoint: {
data: [
{ type: 'max'},
{ type: 'min'}
],
label: {
formatter: (p) => {
console.info(p)
return Number( new Date(p.value)) // also want the
Y-value here
}
}
}
}
Thanks
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@echarts.apache.org
For additional commands, e-mail: dev-help@echarts.apache.org