Skip to content

domkss/session-world-map

Repository files navigation

Session World Map React Component

This component allows you to integrate interactive maps into your React applications easily, enabling you to display session, click, event data effectively on admin dashboards.

Preview Image

Features

  • Display sessions on an interactive map.
  • Customize coloring of the countries
  • Zoom and pan functionalities for easy navigation.

Missing features

  • Currently the zoom, pan and country select function is only supported on desktop devices with mouse input

Installation

To use the Session Map React Component in your React project, follow these steps:

  1. Install the package using npm or yarn:
npm install session-country-map

Example:

import { SessionMap, CountryCodeType } from "session-country-map";


<div className="flex basis-2/3 flex-col justify-center">
<SessionMap
 valueTytle="Sessions"
 valueByCountryMap={
    new Map ([
        ["US", {value:1000, className:"fill-sky-200"}],
        ["DE", {value:2000, className:"fill-sky-300"}],
        ["FR", {value:4000, className:"fill-sky-400"}],
    ])
 }
/>
</div>

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request on the GitHub repository.

License

This project is licensed under the MIT License.

Acknowledgements

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages