API Reference
Exports
import {
TurkeyMap,
CityMap,
type ITurkeyMap,
type ICityMap,
} from 'react-nvs-turkey-map';
Turkey Map
Props
TurkeyMap props are based on the internal IMap type, plus heatMapData.
| Prop | Type | Required | Default |
|---|---|---|---|
strokeColor | string | No | "white" |
strokeWidth | string | No | "0.08" |
hoverColor | string | No | "#43a047" |
defaultColor | string | No | "#444" |
maxWidth | string | No | — |
heatMapColors | { min?: string; max?: string } | No | { min: "#e3f2fd", max: "#c62828" } |
heatMapData | Partial<Record<keyof typeof City, number>> | Partial<Record<City, number>> | No | — |
tooltipComponent | React.FC<{ name: string; plateNumber: number }> | No | — |
onClick | (item: { name: string; plateNumber: number }) => void | No | — |
City Map
Props
| Prop | Type | Required | Default |
|---|---|---|---|
city | string | Yes | — |
strokeColor | string | No | "white" |
strokeWidth | string | No | "0.08" |
hoverColor | string | No | "#43a047" |
defaultColor | string | No | "#444" |
maxWidth | string | No | — |
heatMapColors | { min?: string; max?: string } | No | { min: "#e3f2fd", max: "#c62828" } |
heatMapData | Record<string, number> | No | — |
tooltipComponent | React.FC<{ name: string }> | No | — |
onClick | (item: { name: string }) => void | No | — |