Skip to content

feat: Switch geodata providers #7393

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

Open
wants to merge 88 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
e8d763d
Add new dev dependencies
camdecoster Mar 20, 2025
7f7b690
Add build scripts
camdecoster Mar 20, 2025
6b596c0
Update some topojson references
camdecoster Mar 20, 2025
353bf94
Add npm build scripts
camdecoster Mar 20, 2025
fc6022f
Add 'usa' config
camdecoster Mar 20, 2025
2910eea
Add clipping bounds for Antarctica
camdecoster Mar 20, 2025
5d66dad
Apply suggestions from code review
camdecoster Mar 20, 2025
3b47c67
Add geodata archive, update get_geodata script paths
camdecoster Mar 21, 2025
b434656
Switch config file to JS
camdecoster Mar 21, 2025
a4d0b21
Switch coastlines layer source
camdecoster Mar 21, 2025
e257b7b
Add Oceania clipping bounds
camdecoster Mar 21, 2025
1154ff1
Switch layer name to 'ocean'
camdecoster Mar 21, 2025
86d5b00
Update test config
camdecoster Mar 26, 2025
86f048c
Switch to UN/NE geodata hybrid
camdecoster Mar 30, 2025
ac61095
Merge remote-tracking branch 'origin/master' into cam/7334/switch-geo…
camdecoster Apr 6, 2025
f4c3d48
Fix zip/unzip of UN geojson
camdecoster Apr 7, 2025
22a8e0a
Fix saving 110m maps
camdecoster Apr 7, 2025
247f925
Update dist with new maps
camdecoster Apr 8, 2025
3cf9730
Update geo tests
camdecoster Apr 8, 2025
24e8558
Update cibuild npm script
camdecoster Apr 8, 2025
b2ae532
Add draftlog
camdecoster Apr 8, 2025
85ad69c
Remove sane-topojson package
camdecoster Apr 15, 2025
b903b9f
Add small fixes
camdecoster Apr 15, 2025
e74c65c
Remove log statements
camdecoster Apr 15, 2025
33a2e00
add some mocks to blacklist
emilykl Apr 22, 2025
4868250
update baselines for new geodata
emilykl Apr 22, 2025
bce8d21
update blacklist in compare_pixels_test
emilykl Apr 22, 2025
da44084
Save UN geodata in build folder
camdecoster Apr 22, 2025
69f104e
make sure slash is added when concatenating topojson path
emilykl Apr 23, 2025
c684b72
use local topojson for image tests
emilykl Apr 23, 2025
362233a
update paths in jasmine geo_test
emilykl Apr 23, 2025
4d37b8c
filter out extra features
emilykl Apr 23, 2025
bb8377b
update image baselines for new geodata
emilykl Apr 23, 2025
6356355
Merge pull request #7406 from plotly/cam/7334/switch-geodata-provider…
emilykl Apr 23, 2025
5482adf
Filter out extra Hawaii feature during processing
camdecoster Apr 24, 2025
2710e7c
Revert "filter out extra features"
camdecoster Apr 24, 2025
b8bfea6
Adjust world rectangle to account for coordinate issues
camdecoster May 6, 2025
d6ea8ab
Fix Anarctica geometry and simplification
camdecoster May 6, 2025
3ec56ab
Fix land layer, clean up comments
camdecoster May 6, 2025
79017d5
Remove unused filter
camdecoster May 6, 2025
0f9049c
Remove turf simplify
camdecoster May 6, 2025
4a6fb9d
Update topojson
camdecoster May 6, 2025
33d3425
Filter Greenland out of Europe
camdecoster May 6, 2025
c74f711
Erase Caspian Sea
camdecoster May 6, 2025
f7cdc5f
Update topojson
camdecoster May 7, 2025
9711ef7
Update country codes for disputed territories at Egypt/Sudan border
camdecoster May 21, 2025
51a596e
Update topojson
camdecoster May 21, 2025
40968da
Merge remote-tracking branch 'origin/master' into cam/7334/switch-geo…
camdecoster Jun 4, 2025
5e7efc8
Attempt to stitch antimeridian crossing polygons
camdecoster Jun 24, 2025
9026b55
Remove rectangle geojson
camdecoster Jun 24, 2025
597ae5c
Remove unneeded library; restore old library version
camdecoster Jun 25, 2025
15dd77a
Correct polygon winding directions
camdecoster Jun 25, 2025
e385014
Update topojson
camdecoster Jun 25, 2025
d3940c6
Merge remote-tracking branch 'origin/master' into cam/7334/switch-geo…
camdecoster Jun 25, 2025
d7d7d0b
Fix merge issues with package-lock
camdecoster Jun 25, 2025
eb1e966
Update required dev dependencies again
camdecoster Jul 2, 2025
60171d7
Split out antimeridian fixes
camdecoster Jul 2, 2025
90554a2
Update topojson
camdecoster Jul 2, 2025
d836db9
Update test baseline images
camdecoster Jul 3, 2025
3ddc6e0
Update geo tests
camdecoster Jul 3, 2025
f952173
Fix comment
camdecoster Jul 3, 2025
75e9f52
Further update geo tests
camdecoster Jul 7, 2025
3a7bd66
Update geo test with values from CircleCI
camdecoster Jul 7, 2025
a6efc84
Fix linting/formatting of new JS files
camdecoster Jul 7, 2025
4f4bbfc
Merge remote-tracking branch 'origin/master' into cam/7334/switch-geo…
camdecoster Jul 7, 2025
434017f
Revert to previous version of 'd3-geo'
camdecoster Jul 7, 2025
9a4a966
Refactor helper function
camdecoster Jul 7, 2025
1f336e1
Update draftlog
camdecoster Jul 8, 2025
1bd2fc2
Update test baselines
camdecoster Jul 8, 2025
6dae5aa
Move topojson build script files
camdecoster Jul 9, 2025
665c892
Update paths
camdecoster Jul 9, 2025
ae3c471
Add topojson package files
camdecoster Jul 9, 2025
a2cce65
Add maps to topojson dist
camdecoster Jul 9, 2025
7112d33
Update library paths
camdecoster Jul 9, 2025
6e25a5f
Restore previous topojson
camdecoster Jul 9, 2025
ecd469f
Remove scripts, dependencies from package.json
camdecoster Jul 9, 2025
50377f8
Add topojson ci build comparison test
camdecoster Jul 10, 2025
601ffc9
Actually run test job in ci
camdecoster Jul 10, 2025
0f3e102
Add npm clean script
camdecoster Jul 10, 2025
9b62be0
Update path; remove comment
camdecoster Jul 10, 2025
0539623
Update package lock file
camdecoster Jul 11, 2025
fc3978c
Add default scopes for Antarctica, Oceania
camdecoster Jul 11, 2025
b050574
Clarify comment
camdecoster Jul 11, 2025
e9c16c8
Add Egypt/Sudan choropleth mock
camdecoster Jul 11, 2025
fcaef12
Add test baseline image
camdecoster Jul 11, 2025
36f5fb5
Update schema
camdecoster Jul 11, 2025
765b549
Rename image/mock to avoid bug
camdecoster Jul 11, 2025
8944398
Rename shadowed variable
camdecoster Jul 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -483,11 +483,32 @@ jobs:
name: Bundle bundle-stackgl/index.js
command: cd stackgl_modules && cp index.js INDEX.js && npm run bundle-stackgl
- run:
name: Test stackgl_modules/index.js diff - If failed please remember this file in auto generated and you should not modify it directly until a dependeny change. To suggest changes please submit pull request to the relevant dependency.
name: Test stackgl_modules/index.js diff - If failed please remember this file in auto generated and you should not modify it directly until a dependency change. To suggest changes please submit pull request to the relevant dependency.
command: diff --unified --color stackgl_modules/INDEX.js stackgl_modules/index.js
- store_artifacts:
path: stackgl_modules/index.js
destination: stackgl_modules/index.js

test-topojson-build:
docker:
- image: cimg/node:18.20.4
working_directory: ~/plotly.js
steps:
- checkout
- run:
name: Set up build environment
command: cd topojson && npm ci
- run:
name: Build topojson
command: cd topojson && mv dist dist_backup && npm run build
- run:
name: Compare existing files with newly built files. Any difference is a failure. A failure might mean that the source data changed.
command: diff -qr topojson/dist topojson/dist_backup
- run:
name: Compress artifacts
command: tar -cvzf topojson.tar topojson/dist
- store_artifacts:
path: topojson.tar

workflows:
version: 2
Expand Down Expand Up @@ -560,3 +581,5 @@ workflows:
- publish-dist-node-v22

- test-stackgl-bundle

- test-topojson-build
4 changes: 1 addition & 3 deletions devtools/test_dashboard/devtools.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ var Tabs = {
Plotly.setPlotConfig({

// use local topojson files
topojsonURL: '../../node_modules/sane-topojson/dist/',

topojsonURL: "../../topojson/dist",
// register mapbox access token
// run `npm run preset` if you haven't yet
mapboxAccessToken: credentials.MAPBOX_ACCESS_TOKEN,
Expand Down Expand Up @@ -268,4 +267,3 @@ function handleOnLoad() {
Tabs.setPlotConfig();
plotFromHash();
}

1 change: 1 addition & 0 deletions draftlogs/7393_change.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Switch to United Nations (coastlines, countries, land, ocean) + Natural Earth (lakes, rivers, subunits) geodata for building topojson used in geo plot
36 changes: 15 additions & 21 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
"@plotly/d3-sankey": "0.7.2",
"@plotly/d3-sankey-circular": "0.33.1",
"@plotly/mapbox-gl": "1.13.4",
"@plotly/regl": "^2.1.2",
"@turf/area": "^7.1.0",
"@turf/bbox": "^7.1.0",
"@turf/centroid": "^7.1.0",
Expand Down Expand Up @@ -105,7 +106,6 @@
"point-in-polygon": "^1.1.0",
"polybooljs": "^1.2.2",
"probe-image-size": "^7.2.3",
"@plotly/regl": "^2.1.2",
"regl-error2d": "^2.0.12",
"regl-line2d": "^3.1.3",
"regl-scatter2d": "^3.3.1",
Expand All @@ -121,6 +121,8 @@
},
"devDependencies": {
"@biomejs/biome": "1.8.3",
"@plotly/mathjax-v2": "npm:[email protected]",
"@plotly/mathjax-v3": "npm:mathjax@^3.2.2",
"amdefine": "^1.0.1",
"assert": "^2.1.0",
"browserify-transform-tools": "^1.7.0",
Expand Down Expand Up @@ -160,8 +162,6 @@
"karma-viewport": "1.0.2",
"lodash": "^4.17.21",
"madge": "^8.0.0",
"@plotly/mathjax-v2": "npm:[email protected]",
"@plotly/mathjax-v3": "npm:mathjax@^3.2.2",
"minify-stream": "^2.1.0",
"npm-link-check": "^5.0.1",
"open": "^8.4.2",
Expand All @@ -171,7 +171,6 @@
"raw-loader": "^4.0.2",
"read-last-lines": "^1.8.0",
"run-series": "^1.1.9",
"sane-topojson": "^4.0.0",
"sass": "^1.78.0",
"stream-browserify": "^3.0.0",
"style-loader": "^4.0.0",
Expand Down
29 changes: 24 additions & 5 deletions src/assets/geo_assets.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,27 @@
'use strict';

var saneTopojson = require('sane-topojson');
const topojson = {
africa_110m: require('../../dist/topojson/africa_110m.json'),
antarctica_110m: require('../../dist/topojson/antarctica_110m.json'),
asia_110m: require('../../dist/topojson/asia_110m.json'),
europe_110m: require('../../dist/topojson/europe_110m.json'),
'north-america_110m': require('../../dist/topojson/north-america_110m.json'),
oceania_110m: require('../../dist/topojson/oceania_110m.json'),
'south-america_110m': require('../../dist/topojson/south-america_110m.json'),
usa_110m: require('../../dist/topojson/usa_110m.json'),
world_110m: require('../../dist/topojson/world_110m.json'),
africa_50m: require('../../dist/topojson/africa_50m.json'),
antarctica_50m: require('../../dist/topojson/antarctica_50m.json'),
asia_50m: require('../../dist/topojson/asia_50m.json'),
europe_50m: require('../../dist/topojson/europe_50m.json'),
'north-america_50m': require('../../dist/topojson/north-america_50m.json'),
oceania_50m: require('../../dist/topojson/oceania_50m.json'),
'south-america_50m': require('../../dist/topojson/south-america_50m.json'),
usa_50m: require('../../dist/topojson/usa_50m.json'),
world_50m: require('../../dist/topojson/world_50m.json'),
}


exports.version = require('../version').version;

exports.topojson = saneTopojson;
module.exports = {
topojson,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be

Suggested change
topojson,
topojson: topojson,

?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As of ES6, you can do this if the key and value variable have the same name (MDN source).

version: require('../version').version
}
4 changes: 3 additions & 1 deletion src/lib/topojson_utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ topojsonUtils.getTopojsonName = function(geoLayout) {
};

topojsonUtils.getTopojsonPath = function(topojsonURL, topojsonName) {
return topojsonURL + topojsonName + '.json';
topojsonURL += topojsonURL.endsWith('/') ? '' : '/';

return `${topojsonURL}${topojsonName}.json`;
};

topojsonUtils.getTopojsonFeatures = function(trace, topojson) {
Expand Down
14 changes: 13 additions & 1 deletion src/plots/geo/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,19 @@ exports.scopeDefaults = {
lataxisRange: [-60, 15],
projType: 'mercator',
projRotate: [0, 0, 0]
}
},
antarctica: {
lonaxisRange: [-180, 180],
lataxisRange: [-90, -60],
projType: 'equirectangular',
projRotate: [0, 0, 0]
},
oceania: {
lonaxisRange: [-180, 180],
lataxisRange: [-50, 25],
projType: 'equirectangular',
projRotate: [0, 0, 0]
},
};

// angular pad to avoid rounding error around clip angles
Expand Down
1 change: 0 additions & 1 deletion tasks/preprocess.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ function writeLibFiles(obj) {
}
}

// copy topojson files from sane-topojson to dist/
function copyTopojsonFiles() {
fs.copy(
constants.pathToTopojsonSrc,
Expand Down
15 changes: 1 addition & 14 deletions tasks/util/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,7 @@ var strictIndex = fs.readFileSync(pathToPlotlyStrict, 'utf-8');
var allTraces = fs.readdirSync(path.join(pathToSrc, 'traces'))
.filter(startsWithLowerCase);

var pathToTopojsonSrc;
try {
pathToTopojsonSrc = path.join(path.dirname(require.resolve('sane-topojson')), 'dist/');
} catch(e) {
console.log([
'',
'WARN: Cannot resolve path to *sane-topojson* package.',
' This can happen when one `npm link sane-topojson`',
' and runs a command in a Docker container.',
' There is nothing to worry, if you see this warning while running',
' `npm run test-image`, `npm run test-export` or `npm run baseline` ;)',
''
].join('\n'));
}
var pathToTopojsonSrc = path.join(pathToRoot, 'topojson/dist');

var partialBundleNames = [
'basic', 'cartesian', 'geo', 'gl3d', 'gl2d', 'mapbox', 'finance', 'strict'
Expand Down
Binary file modified test/image/baselines/canada_geo_projections.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/distance_satellite.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/geo_across-antimeridian.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/geo_africa-insets.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/geo_aitoff-sinusoidal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/geo_bg-color.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/geo_big-frame.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/geo_bubbles-colorscales.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/geo_bubbles-sizeref.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/geo_canadian-cities.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/geo_centering.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/geo_choropleth-legend.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/geo_choropleth-text.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/geo_choropleth-usa.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/geo_choropleth-usa_legend.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/geo_conic-conformal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/geo_connectgaps.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/geo_country-names-text-chart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/geo_country-names.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/geo_custom-colorscale.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/geo_custom-geojson.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/geo_europe-bubbles.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/geo_fill.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/geo_first.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/geo_fitbounds-geojson.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/geo_fitbounds-locations.png
Binary file modified test/image/baselines/geo_fitbounds-scopes.png
Binary file modified test/image/baselines/geo_kavrayskiy7.png
Binary file modified test/image/baselines/geo_lakes-and-rivers.png
Binary file modified test/image/baselines/geo_legendonly.png
Binary file modified test/image/baselines/geo_miterlimit-base-layers.png
Binary file modified test/image/baselines/geo_multi-geos.png
Binary file modified test/image/baselines/geo_multiple-usa-choropleths.png
Binary file modified test/image/baselines/geo_orthographic.png
Binary file modified test/image/baselines/geo_point-selection.png
Binary file modified test/image/baselines/geo_scattergeo-locations.png
Binary file modified test/image/baselines/geo_scattergeo-out-of-usa.png
Binary file modified test/image/baselines/geo_second.png
Binary file modified test/image/baselines/geo_stereographic.png
Binary file modified test/image/baselines/geo_text_chart_arrays.png
Binary file modified test/image/baselines/geo_tick0.png
Binary file modified test/image/baselines/geo_usa-states-on-world-scope.png
Binary file modified test/image/baselines/geo_usa-states.png
Binary file modified test/image/baselines/geo_visible_false_override_template.png
Binary file modified test/image/baselines/geo_winkel-tripel.png
Binary file modified test/image/baselines/grid_subplot_types.png
Binary file modified test/image/baselines/h-colorbar_geo_multiple-usa-choropleths.png
Binary file modified test/image/baselines/marker-standoff.png
Binary file modified test/image/baselines/marker-standoff_auto-backoff.png
Binary file modified test/image/baselines/marker-standoff_auto-backoff2.png
Binary file modified test/image/baselines/plot_types.png
Binary file modified test/image/baselines/plot_types_grid_dash.png
Binary file modified test/image/baselines/texttemplate_scatter.png
Binary file modified test/image/baselines/various_geo_projections.png
4 changes: 4 additions & 0 deletions test/image/compare_pixels_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ argv._.forEach(function(pattern) {
var blacklist = [
'map_angles',
'map_stamen-style',
'map_predefined-styles2',
'map_scattercluster',
'map_fonts-supported-open-sans',
'map_fonts-supported-open-sans-weight',
];

if(virtualWebgl) {
Expand Down
5 changes: 5 additions & 0 deletions test/image/make_baseline.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
plotlyjs = plotlyjs_with_virtual_webgl

pio.kaleido.scope.plotlyjs = plotlyjs
pio.kaleido.scope.topojson = "file://" + os.path.join(root, 'topojson', 'dist')
pio.templates.default = 'none'

ALL_MOCKS = [os.path.splitext(a)[0] for a in os.listdir(dirIn) if a.endswith('.json')]
Expand All @@ -66,6 +67,10 @@
# unable to generate baselines for the following mocks
blacklist = [
'map_stamen-style',
'map_predefined-styles2',
'map_scattercluster',
'map_fonts-supported-open-sans',
'map_fonts-supported-open-sans-weight',
]
allNames = [a for a in allNames if a not in blacklist]

Expand Down
35 changes: 35 additions & 0 deletions test/image/mocks/zz-geo_choropleth-egypt-sudan.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"data": [
{
"type": "choropleth",
"name": "Egypt",
"locations": ["EGY"],
"z": [1],
"colorscale": [[0, "orange"], [1, "orange"]],
"showscale": false,
"showlegend": true
},
{
"type": "choropleth",
"name": "Sudan",
"locations": ["SDN"],
"z": [1],
"colorscale": [[0, "blue"], [1, "blue"]],
"showscale": false,
"showlegend": true
}
],
"layout": {
"geo": {
"projection": {
"rotation": {
"lon": 30,
"lat": 20
},
"scale": 7
}
},
"width": 800,
"height": 600
}
}
5 changes: 2 additions & 3 deletions test/jasmine/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ if(isFullSuite) {
}

var pathToCustomMatchers = path.join(__dirname, 'assets', 'custom_matchers.js');
var pathToSaneTopojsonDist = path.join(__dirname, '..', '..', 'node_modules', 'sane-topojson', 'dist');
var pathToTopojsonDist = path.join(__dirname, '..', '..', 'topojson', 'dist');
var pathToMathJax2 = path.join(__dirname, '..', '..', 'node_modules', '@plotly/mathjax-v2');
var pathToMathJax3 = path.join(__dirname, '..', '..', 'node_modules', '@plotly/mathjax-v3');
var pathToVirtualWebgl = path.join(__dirname, '..', '..', 'node_modules', 'virtual-webgl', 'src', 'virtual-webgl.js');
Expand Down Expand Up @@ -196,8 +196,7 @@ func.defaultConfig = {
// more info: http://karma-runner.github.io/3.0/config/files.html
{pattern: pathToMathJax2 + '/**', included: false, watched: false, served: true},
{pattern: pathToMathJax3 + '/**', included: false, watched: false, served: true},
// available to fetch from /base/node_modules/sane-topojson/dist/
{pattern: pathToSaneTopojsonDist + '/**', included: false, watched: false, served: true}
{pattern: pathToTopojsonDist + '/**', included: false, watched: false, served: true}
],

// list of files / pattern to exclude
Expand Down
Loading