Closed YBerkay closed 3 years ago
Hello Erdi,
How can I change city color by plateNumber. I don't want to change color of the all cities.
Hello,
Maybe City Component Wrapping feature works for you. You can wrap a div and style it based on city data.
Please see more on readme : https://github.com/erdigokce/turkey-map-react#city-component-wrapping
Hi,
I can achieve that by using cityWrapper and customStyle props together. Here is an example:
cityWrapper={(cityComponent, cityData) => (
<g fill={cityData.plateNumber % 2 == 0 ? 'red' : 'blue'}>
{cityComponent}
</g>
)}
customStyle={{
idleColor: 'inherit',
hoverColor: 'purple',
}}
Hello Erdi,
How can I change city color by plateNumber. I don't want to change color of the all cities.