-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Stats Location: update geochart to use coordinates for Regions and Cities #99142
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
7979548
Stats: add subdivisions tooltip
myhro 15af789
Update geochart to accept coordinates for Cities view
Initsogar f5d779a
Omit coordinates property when no data exists
Initsogar 4af5a54
Merge remote-tracking branch 'origin/add/stats-subdivisions-tooltip' …
Initsogar 1e843d1
Merge remote-tracking branch 'origin/trunk' into fix/stats-locations-…
Initsogar f333418
Merge remote-tracking branch 'origin/trunk' into fix/stats-locations-…
Initsogar 439027a
Handle region and city mode as markers
Initsogar eef82f5
Filter locations with coordinates
Initsogar 2793c0a
Merge remote-tracking branch 'origin/trunk' into fix/stats-locations-…
Initsogar 5607aae
Remove prop that is not needed for now
Initsogar 232f2a3
Refactor sample locations using coordinates
Initsogar 0856d41
Simplify conditions
Initsogar 0e8c759
Remove unused attribute to sample locations
Initsogar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
64 changes: 64 additions & 0 deletions
64
client/my-sites/stats/features/modules/stats-locations/sample-locations.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
const sampleLocations = [ | ||
{ | ||
label: 'California', | ||
countryCode: 'US', | ||
value: 2000, | ||
coordinates: { latitude: '36.7783', longitude: '-119.4179' }, | ||
}, | ||
{ | ||
label: 'Uttar Pradesh', | ||
countryCode: 'IN', | ||
value: 1500, | ||
coordinates: { latitude: '27.1303', longitude: '80.8590' }, | ||
}, | ||
{ | ||
label: 'England', | ||
countryCode: 'GB', | ||
value: 1200, | ||
coordinates: { latitude: '52.3555', longitude: '-1.1743' }, | ||
}, | ||
{ | ||
label: 'Ontario', | ||
countryCode: 'CA', | ||
value: 1000, | ||
coordinates: { latitude: '51.2538', longitude: '-85.3232' }, | ||
}, | ||
{ | ||
label: 'North Rhine-Westphalia', | ||
countryCode: 'DE', | ||
value: 900, | ||
coordinates: { latitude: '51.4332', longitude: '7.6616' }, | ||
}, | ||
{ | ||
label: 'West Java', | ||
countryCode: 'ID', | ||
value: 800, | ||
coordinates: { latitude: '-6.8897', longitude: '107.6405' }, | ||
}, | ||
{ | ||
label: 'Tokyo', | ||
countryCode: 'JP', | ||
value: 700, | ||
coordinates: { latitude: '35.6895', longitude: '139.6917' }, | ||
}, | ||
{ | ||
label: 'São Paulo', | ||
countryCode: 'BR', | ||
value: 600, | ||
coordinates: { latitude: '-23.5505', longitude: '-46.6333' }, | ||
}, | ||
{ | ||
label: 'North Holland', | ||
countryCode: 'NL', | ||
value: 500, | ||
coordinates: { latitude: '52.5200', longitude: '4.6707' }, | ||
}, | ||
{ | ||
label: 'Andalusia', | ||
countryCode: 'ES', | ||
value: 400, | ||
coordinates: { latitude: '37.5443', longitude: '-4.7278' }, | ||
}, | ||
]; | ||
|
||
export default sampleLocations; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
We needed to add coordinates, and I think it’s too much data to keep in this file, so I preferred to move it to its own sample-locations.js file.