Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 2k
feat: Replace country-regex with country-iso-search#7856
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
d6ee07c734ce031555cb50a8f7f648cc7b8File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| - Replace `country-regex` with `country-iso-search` to search for country names in choropleth, scattergeo traces [[#7856](https://github.com/plotly/plotly.js/pull/7856)] |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| import type { CountryRecord } from 'country-iso-search'; | ||
| /** | ||
| * Plotly-specific country records for disputed and unrecognized territories | ||
| * that are not part of ISO 3166-1. Each entry uses an ISO3-like code in the | ||
| * `X` range (reserved by ISO 3166-1 for user-assigned codes) so these regions | ||
| * can be looked up alongside standard countries from `country-iso-search`. | ||
| */ | ||
| export const COUNTRIES_X: ReadonlyArray<CountryRecord> = [ | ||
| { | ||
| iso3: 'XAC', | ||
| iso2: '', | ||
| m49: '', | ||
| name: 'Aksai Chin', | ||
| aliases: [] | ||
| }, | ||
| { | ||
| iso3: 'XAP', | ||
| iso2: '', | ||
| m49: '', | ||
| name: 'Arunachal Pradesh', | ||
| aliases: [] | ||
| }, | ||
| { | ||
| iso3: 'XBT', | ||
| iso2: '', | ||
| m49: '', | ||
| name: 'Bir Tawil', | ||
| aliases: [] | ||
| }, | ||
| { | ||
| iso3: 'XHT', | ||
| iso2: '', | ||
| m49: '', | ||
| name: 'Halaib Triangle', | ||
| aliases: [] | ||
| }, | ||
| { | ||
| iso3: 'XJK', | ||
| iso2: '', | ||
| m49: '', | ||
| name: 'Jammu and Kashmir', | ||
| aliases: [] | ||
| } | ||
| ]; |
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@camdecoster Can you add a comment explaining why these custom codes are needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that's a good idea.