Interface MetricWorldMapProps

Hierarchy

  • Omit<WorldMapProps, "getRegionUrl" | "getTooltip">
    • MetricWorldMapProps

Properties

getFillColor?: ((regionId: string) => string)

Type declaration

    • (regionId: string): string
    • Function that returns the fill color for a region's shape, given the region's regionId.

      Returns

      Fill color for the region.

      Parameters

      • regionId: string

        RegionId of the region for which to get the fill color.

      Returns string

getFillOpacity?: ((geoId: string) => number)

Type declaration

    • (geoId: string): number
    • Function that returns the fill opacity for a region's shape, given the region's geoId.

      Default

      1

      Returns

      Fill opacity for the region.

      Parameters

      • geoId: string

        GeoId of the region for which to get the fill opacity.

      Returns number

getTooltip?: ((region: Region) => ReactNode)

Type declaration

    • (region: Region): ReactNode
    • Function that returns tooltip content for a given region.

      Returns

      Tooltip content for the region.

      Parameters

      • region: Region

        Region for which to get tooltip content.

      Returns ReactNode

metric: string | Metric

Metric represented by the map's coloring.

regionDB: RegionDB

Region DB instance. Used for generating region links, coloring the map, etc.

width?: number

Width of the SVG containing the map.

Generated using TypeDoc