question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How can I use the animation "collections"?

See original GitHub issue

I’m going to use the collections at animation level. Reading the documentation, it seems that you can assign a name to an object into animation options and this object should contain multiple properties, identified by properties array.

Therefore I’m trying to add to chart options the following animation configuration:

animation: {
      mycolors : {
	      properties: ['backgroundColor'],
	      type: 'color',
	      from: 'black',
	      duration: 5000,
	      loop: true
      },
},

but my animation configuration is ignored.

Instead, using the same configuration, setting colors as collection name, it works.

animation: {
      colors : {
	      properties: ['backgroundColor'],
	      type: 'color',
	      from: 'black',
	      duration: 5000,
	      loop: true
      },
},

Then I have the doubt if the collection name must be colors or numbers (therefore are fixed) or if I can use different names. And if I can use different names, how is the animation engine aware about which collection should be used?

Here is CodePen https://codepen.io/stockinail/pen/YzwdObe

Chart.js: dist/master

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
stockiNailcommented, Jul 22, 2020

Documentation is probably the issue. Maybe you could take a look at it now that you know how it works? 😃

Yes, but let me finish the implementation on the lib (I’m completing the work with the new 3.0.0 features) and then I’ll propose some updates (by PR related to this issue that I’ll reopen) on the doc. Ok?

1reaction
kurklecommented, Jul 22, 2020

But now, having a look to the same sample, where you are not resetting the colors.properties, it does not work.

Sorry, did not mean to save that one. Added colors: false (which works also) to the pen.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Step-by-step guide to Animated NFT Collections in After Effects
How to structure your animated NFTs? Control traits and layers with expressions and dropdown menus. Download a script to generate a collection of...
Read more >
3 Essential Lottie Animation Collections UI Designers Need
In this post, we will take a deep dive into 3 animated collections that will help you set your designs apart from the...
Read more >
What winning animation in... - MobilityWare Solitaire Games
What winning animation in our Solitaire games is your favorite? Tell us in the comments below! What is the point of the animation...
Read more >
Transforming collections with animation nodes
So I am just curious if I could use animation nodes to move my collections around ? animation-nodes · collections · Share.
Read more >
Adding animation to collection list items - Forum | Webflow
So all the cms is doing is populating your divs (.image-11) with images. It looks like you are using X2 interactions - which...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found