I would like to create a blinking effect on some sectors of my pie chart that is created using d3js. The animation is incorporated by assigning the following css class to the path that represents the sector.
.blink{
animation: blinking 1s infinite;
}
@keyframes blinking {
0% { fill: red; }
50% { fill: red; }
51% { fill: white; }
100% { fill: white; }
}
This causes the sector to blink, switching between red and white every second. However, this overrides the original colour. I want to instead preserve the colour and have it switching between red and the original colour. How can I achieve that? Note that the original colour depends on the value of my chart, so I do not know what it is beforehand and cannot just replace the colour white with whatever it would be.