You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@echarts.apache.org by Ole Ersoy <ol...@gmail.com> on 2022/12/02 04:42:25 UTC

Getting the params data point value for the tooltip callback function in echarts?

Hi,
0
<https://stackoverflow.com/posts/74650968/timeline>

I'm trying to get the value for this Apache EChart
<https://echarts.apache.org/examples/en/editor.html?c=bar-animation-delay>
within
the callback of the tooltip formatter.  I've also asked this question on
Stackoverflow here.

https://stackoverflow.com/questions/74650968/getting-the-params-data-point-value-for-the-tooltip-callback-function-in-echarts

How do we access the value for the series?

Cheers,

Ole

Re: Getting the params data point value for the tooltip callback function in echarts?

Posted by Ole Ersoy <ol...@gmail.com>.
Hi Ovilia,

Oh very cool.  Thank you for pointing out the share feature.  I went ahead
and updated the Stackoverflow answer.  Someone answered it earlier, but it
looks like a moderator deleted the answer.

This works:
formatter: (params:any) => `$ ${Math.round(parseInt(params[0].value, 10))}`,


Cheers,
Ole



On Tue, Dec 6, 2022 at 4:54 AM Ovilia <ov...@gmail.com> wrote:

> Please provide an online link for your formatter case.
> You can click the "Share" button after editing in
> https://echarts.apache.org/examples/en/editor.html?c=bar-animation-delay
> to generate.
>
> Thanks
>
> *Ovilia*
>
>
> On Sat, Dec 3, 2022 at 12:31 AM Ole Ersoy <ol...@gmail.com> wrote:
>
>> Hi,
>> 0
>> <https://stackoverflow.com/posts/74650968/timeline>
>>
>> I'm trying to get the value for this Apache EChart
>> <https://echarts.apache.org/examples/en/editor.html?c=bar-animation-delay
>> >
>> within
>> the callback of the tooltip formatter.  I've also asked this question on
>> Stackoverflow here.
>>
>>
>> https://stackoverflow.com/questions/74650968/getting-the-params-data-point-value-for-the-tooltip-callback-function-in-echarts
>>
>> How do we access the value for the series?
>>
>> Cheers,
>>
>> Ole
>>
>

Re: Getting the params data point value for the tooltip callback function in echarts?

Posted by Ovilia <ov...@gmail.com>.
Please provide an online link for your formatter case.
You can click the "Share" button after editing in
https://echarts.apache.org/examples/en/editor.html?c=bar-animation-delay to
generate.

Thanks

*Ovilia*


On Sat, Dec 3, 2022 at 12:31 AM Ole Ersoy <ol...@gmail.com> wrote:

> Hi,
> 0
> <https://stackoverflow.com/posts/74650968/timeline>
>
> I'm trying to get the value for this Apache EChart
> <https://echarts.apache.org/examples/en/editor.html?c=bar-animation-delay>
> within
> the callback of the tooltip formatter.  I've also asked this question on
> Stackoverflow here.
>
>
> https://stackoverflow.com/questions/74650968/getting-the-params-data-point-value-for-the-tooltip-callback-function-in-echarts
>
> How do we access the value for the series?
>
> Cheers,
>
> Ole
>