react-svg-worldmap
Version:
A pure react component to draw a map of world countries. Simple. Free.
31 lines (30 loc) • 796 B
TypeScript
import React from "react";
interface IData {
country: string;
value: number;
}
interface ICountryContext {
country: string;
countryValue: number;
color: string;
minValue: number;
maxValue: number;
}
interface IProps {
data: IData[];
title?: string;
valuePrefix?: string;
valueSuffix?: string;
color?: string;
tooltipBgColor?: string;
tooltipTextColor?: string;
size?: string;
frame?: boolean;
frameColor?: string;
type?: string;
styleFunction?: (context: ICountryContext) => {};
tooltipTextFunction?: (countryName: string, isoCode: string, value: string, prefix: string, suffix: string) => string;
borderColor?: string;
}
export declare const WorldMap: React.FC<IProps>;
export {};