Change paint fill element of a Symbol factory

I am trying to animate a motor symbol so that the content of an element changes dynamically, so that the animated green part is constantly displayed when the motor is on.


As you can see, I can change the color of the element I want, but I can't find a way to make it animated, I want that green part of the motor to change from a dark green to a lighter green successively.
I have created a custom and animated style that if I apply it to any background of another component it works correctly but I have no idea how to apply it to the required fill of the engine I am working on


Here I leave you an example of how the style I created works, but obviously it changes the background of the symbol.

Any ideas to apply this animated style that creates the required Fill of the symbol motor? another option?

You'll need to:

  1. Remove the fill prop from that element
  2. Add a style object in its place
  3. Add a classes value to the new style object.
  4. Set it to your p style

Also, your p style will need to set the shape fill colour (toward the bottom in the style ui), not the backgroundColour

1 Like

Thanks you, it works. I did exactly this and it worked...