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/11/19 15:07:30 UTC

Apache ECharts bar animation?

Hi,

I'm trying to animate the bars in one of the demos when the browser changes
size.  I asked the question on Stackoverflow, but no love so far.  Any
ideas?

https://stackoverflow.com/questions/74498704/apache-echarts-bar-animation

TIA,
Ole

Re: Apache ECharts bar animation?

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

AWESOME!!  It works now!  Thank you so much!!

Ole

On Sun, Nov 20, 2022 at 1:21 AM Zhongxiang Wang <wa...@apache.org> wrote:

> Hi Ole,
>
> It looks like you have passed the wrong parameter. The `opts` level is not
> expected.
> It should be like this,
>
>
> *this.echartsIntance.resize({    animation: {*
> *        duration: 500,*
> *        easing: 'elasticOut' *
>
> *    }});*
>
> And you need to add *[autoResize]="false"* into `*hello.component.html*`
> to disable the automatic resize from the `ngx-echarts` library.
>
> On Sun, Nov 20, 2022 at 1:58 PM Ole Ersoy <ol...@gmail.com> wrote:
>
>> Hi Zhongxiang,
>>
>> I tried adding the animation parameters like this:
>>
>> https://stackblitz.com/edit/angular-ivy-ms8aq3?file=src%2Fapp%2Fhello.component.ts
>>
>> this.echartsIntance.resize({
>> opts: {
>> animation: {
>> duration: 500,
>> easing: 'elasticOut',
>> },
>> },
>> });
>>
>> However still no love.  Do you see anything else I might be missing?
>> Thank you so much for your help.
>>
>> Cheers,
>> Ole
>>
>>
>>
>> On Sat, Nov 19, 2022 at 10:48 PM Zhongxiang Wang <wa...@apache.org>
>> wrote:
>>
>>> Hi Ole,
>>>
>>> The resize animation is disabled by default. To enable it, you can pass
>>> the `animation` parameter to the `resize` function. [1]
>>>
>>> [1] https://echarts.apache.org/api.html#echartsInstance.resize
>>>
>>> Regards.
>>>
>>>
>>> On Sun, Nov 20, 2022 at 1:05 AM Ole Ersoy <ol...@gmail.com> wrote:
>>>
>>>> Hi,
>>>>
>>>> I'm trying to animate the bars in one of the demos when the browser
>>>> changes
>>>> size.  I asked the question on Stackoverflow, but no love so far.  Any
>>>> ideas?
>>>>
>>>>
>>>> https://stackoverflow.com/questions/74498704/apache-echarts-bar-animation
>>>>
>>>> TIA,
>>>> Ole
>>>>
>>>

Re: Apache ECharts bar animation?

Posted by Zhongxiang Wang <wa...@apache.org>.
Hi Ole,

It looks like you have passed the wrong parameter. The `opts` level is not
expected.
It should be like this,


*this.echartsIntance.resize({    animation: {*
*        duration: 500,*
*        easing: 'elasticOut' *

*    }});*

And you need to add *[autoResize]="false"* into `*hello.component.html*` to
disable the automatic resize from the `ngx-echarts` library.

On Sun, Nov 20, 2022 at 1:58 PM Ole Ersoy <ol...@gmail.com> wrote:

> Hi Zhongxiang,
>
> I tried adding the animation parameters like this:
>
> https://stackblitz.com/edit/angular-ivy-ms8aq3?file=src%2Fapp%2Fhello.component.ts
>
> this.echartsIntance.resize({
> opts: {
> animation: {
> duration: 500,
> easing: 'elasticOut',
> },
> },
> });
>
> However still no love.  Do you see anything else I might be missing?
> Thank you so much for your help.
>
> Cheers,
> Ole
>
>
>
> On Sat, Nov 19, 2022 at 10:48 PM Zhongxiang Wang <wa...@apache.org>
> wrote:
>
>> Hi Ole,
>>
>> The resize animation is disabled by default. To enable it, you can pass
>> the `animation` parameter to the `resize` function. [1]
>>
>> [1] https://echarts.apache.org/api.html#echartsInstance.resize
>>
>> Regards.
>>
>>
>> On Sun, Nov 20, 2022 at 1:05 AM Ole Ersoy <ol...@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> I'm trying to animate the bars in one of the demos when the browser
>>> changes
>>> size.  I asked the question on Stackoverflow, but no love so far.  Any
>>> ideas?
>>>
>>> https://stackoverflow.com/questions/74498704/apache-echarts-bar-animation
>>>
>>> TIA,
>>> Ole
>>>
>>

Re: Apache ECharts bar animation?

Posted by Zhongxiang Wang <wa...@apache.org>.
Hi Ole,

The resize animation is disabled by default. To enable it, you can pass the
`animation` parameter to the `resize` function. [1]

[1] https://echarts.apache.org/api.html#echartsInstance.resize

Regards.


On Sun, Nov 20, 2022 at 1:05 AM Ole Ersoy <ol...@gmail.com> wrote:

> Hi,
>
> I'm trying to animate the bars in one of the demos when the browser changes
> size.  I asked the question on Stackoverflow, but no love so far.  Any
> ideas?
>
> https://stackoverflow.com/questions/74498704/apache-echarts-bar-animation
>
> TIA,
> Ole
>