GitHub user dosubot[bot] added a comment to the discussion: Geojson file for map chart
<!-- Answer --> To check the mapping between country names and geojson files, look at the file [`superset-frontend/plugins/legacy-plugin-chart-country-map/src/countries.ts`](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/plugins/legacy-plugin-chart-country-map/src/countries.ts). This file imports each geojson file and assigns it to a country name in a JavaScript object. The frontend uses this mapping to load the correct geojson for each map chart. To add a new map with a new name, place your new geojson file in the same `countries` directory, import it in `countries.ts`, and add it to the exported `countries` object. If you want a custom display name in the chart dropdown, update the `countryOptions` array in the same file. After making these changes, rebuild the frontend assets so Superset recognizes your new map. No backend changes are needed—this is all handled in the frontend plugin code. [Reference](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/plugins/legacy-plugin-chart-country-map/src/countries.ts) <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/4faf9cbe-bd07-42d5-9282-5c320d2a023b?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/4faf9cbe-bd07-42d5-9282-5c320d2a023b?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/4faf9cbe-bd07-42d5-9282-5c320d2a023b?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/4faf9cbe-bd07-42d5-9282-5c320d2a023b?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/4faf9cbe-bd07-42d5-9282-5c320d2a023b?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/4faf9cbe-bd07-42d5-9282-5c320d2a023b?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/4faf9cbe-bd07-42d5-9282-5c320d2a023b?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)& nbsp;[](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/35914) GitHub link: https://github.com/apache/superset/discussions/35914#discussioncomment-14835627 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
