Skip to content
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

Avoid function constructor in d3 #5359

Merged
merged 1 commit into from
Jan 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion devtools/image_viewer/viewer.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
var fs = require('fs');
var path = require('path');

var d3 = require('d3');
var d3 = require('@plotly/d3');

var $plotlist = document.getElementById('plot-list');
var $toggles = document.getElementById('plot-toggles');
Expand Down
10 changes: 5 additions & 5 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
]
},
"dependencies": {
"@plotly/d3": "^3.5.18",
"@plotly/d3-sankey": "0.7.2",
"@plotly/d3-sankey-circular": "0.33.1",
"@plotly/point-cluster": "^3.1.9",
Expand All @@ -70,7 +71,6 @@
"color-rgba": "2.1.1",
"convex-hull": "^1.0.3",
"country-regex": "^1.1.0",
"d3": "^3.5.17",
"d3-force": "^1.2.1",
"d3-hierarchy": "^1.1.9",
"d3-interpolate": "^1.4.0",
Expand Down
2 changes: 1 addition & 1 deletion src/components/annotations/draw.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

'use strict';

var d3 = require('d3');
var d3 = require('@plotly/d3');

var Registry = require('../../registry');
var Plots = require('../../plots/plots');
Expand Down
2 changes: 1 addition & 1 deletion src/components/annotations/draw_arrow_head.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

'use strict';

var d3 = require('d3');
var d3 = require('@plotly/d3');

var Color = require('../color');

Expand Down
2 changes: 1 addition & 1 deletion src/components/colorbar/draw.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

'use strict';

var d3 = require('d3');
var d3 = require('@plotly/d3');
var tinycolor = require('tinycolor2');

var Plots = require('../../plots/plots');
Expand Down
2 changes: 1 addition & 1 deletion src/components/colorscale/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

'use strict';

var d3 = require('d3');
var d3 = require('@plotly/d3');
var tinycolor = require('tinycolor2');
var isNumeric = require('fast-isnumeric');

Expand Down
2 changes: 1 addition & 1 deletion src/components/drawing/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

'use strict';

var d3 = require('d3');
var d3 = require('@plotly/d3');
var isNumeric = require('fast-isnumeric');
var tinycolor = require('tinycolor2');

Expand Down
2 changes: 1 addition & 1 deletion src/components/drawing/symbol_defs.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

'use strict';

var d3 = require('d3');
var d3 = require('@plotly/d3');

/** Marker symbol definitions
* users can specify markers either by number or name
Expand Down
2 changes: 1 addition & 1 deletion src/components/errorbars/plot.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

'use strict';

var d3 = require('d3');
var d3 = require('@plotly/d3');
var isNumeric = require('fast-isnumeric');

var Drawing = require('../drawing');
Expand Down
2 changes: 1 addition & 1 deletion src/components/errorbars/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

'use strict';

var d3 = require('d3');
var d3 = require('@plotly/d3');

var Color = require('../color');

Expand Down
2 changes: 1 addition & 1 deletion src/components/fx/hover.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

'use strict';

var d3 = require('d3');
var d3 = require('@plotly/d3');
var isNumeric = require('fast-isnumeric');
var tinycolor = require('tinycolor2');

Expand Down
2 changes: 1 addition & 1 deletion src/components/fx/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

'use strict';

var d3 = require('d3');
var d3 = require('@plotly/d3');
var Lib = require('../../lib');
var dragElement = require('../dragelement');
var helpers = require('./helpers');
Expand Down
2 changes: 1 addition & 1 deletion src/components/images/draw.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

'use strict';

var d3 = require('d3');
var d3 = require('@plotly/d3');
var Drawing = require('../drawing');
var Axes = require('../../plots/cartesian/axes');
var axisIds = require('../../plots/cartesian/axis_ids');
Expand Down
2 changes: 1 addition & 1 deletion src/components/legend/draw.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

'use strict';

var d3 = require('d3');
var d3 = require('@plotly/d3');

var Lib = require('../../lib');
var Plots = require('../../plots/plots');
Expand Down
2 changes: 1 addition & 1 deletion src/components/legend/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

'use strict';

var d3 = require('d3');
var d3 = require('@plotly/d3');

var Registry = require('../../registry');
var Lib = require('../../lib');
Expand Down
2 changes: 1 addition & 1 deletion src/components/modebar/modebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

'use strict';

var d3 = require('d3');
var d3 = require('@plotly/d3');
var isNumeric = require('fast-isnumeric');

var Lib = require('../../lib');
Expand Down
2 changes: 1 addition & 1 deletion src/components/rangeselector/draw.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

'use strict';

var d3 = require('d3');
var d3 = require('@plotly/d3');

var Registry = require('../../registry');
var Plots = require('../../plots/plots');
Expand Down
2 changes: 1 addition & 1 deletion src/components/rangeselector/get_update_object.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

'use strict';

var d3 = require('d3');
var d3 = require('@plotly/d3');

module.exports = function getUpdateObject(axisLayout, buttonLayout) {
var axName = axisLayout._name;
Expand Down
2 changes: 1 addition & 1 deletion src/components/rangeslider/draw.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

'use strict';

var d3 = require('d3');
var d3 = require('@plotly/d3');

var Registry = require('../../registry');
var Plots = require('../../plots/plots');
Expand Down
2 changes: 1 addition & 1 deletion src/components/sliders/draw.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

'use strict';

var d3 = require('d3');
var d3 = require('@plotly/d3');

var Plots = require('../../plots/plots');
var Color = require('../color');
Expand Down
2 changes: 1 addition & 1 deletion src/components/titles/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

'use strict';

var d3 = require('d3');
var d3 = require('@plotly/d3');
var isNumeric = require('fast-isnumeric');

var Plots = require('../../plots/plots');
Expand Down
2 changes: 1 addition & 1 deletion src/components/updatemenus/draw.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

'use strict';

var d3 = require('d3');
var d3 = require('@plotly/d3');

var Plots = require('../../plots/plots');
var Color = require('../color');
Expand Down
2 changes: 1 addition & 1 deletion src/components/updatemenus/scrollbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

module.exports = ScrollBox;

var d3 = require('d3');
var d3 = require('@plotly/d3');

var Color = require('../color');
var Drawing = require('../drawing');
Expand Down
2 changes: 1 addition & 1 deletion src/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@ exports.PlotSchema = require('./plot_api/plot_schema');
exports.Queue = require('./lib/queue');

// export d3 used in the bundle
exports.d3 = require('d3');
exports.d3 = require('@plotly/d3');
2 changes: 1 addition & 1 deletion src/lib/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

'use strict';

var d3 = require('d3');
var d3 = require('@plotly/d3');
var loggers = require('./loggers');
var matrix = require('./matrix');
var mat4X4 = require('gl-mat4');
Expand Down
2 changes: 1 addition & 1 deletion src/lib/geo_location_utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

'use strict';

var d3 = require('d3');
var d3 = require('@plotly/d3');
var countryRegex = require('country-regex');
var turfArea = require('@turf/area');
var turfCentroid = require('@turf/centroid');
Expand Down
2 changes: 1 addition & 1 deletion src/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

'use strict';

var d3 = require('d3');
var d3 = require('@plotly/d3');
var utcFormat = require('d3-time-format').utcFormat;
var isNumeric = require('fast-isnumeric');

Expand Down
2 changes: 1 addition & 1 deletion src/lib/make_trace_groups.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

'use strict';

var d3 = require('d3');
var d3 = require('@plotly/d3');

/**
* General helper to manage trace groups based on calcdata
Expand Down
2 changes: 1 addition & 1 deletion src/lib/notifier.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

'use strict';

var d3 = require('d3');
var d3 = require('@plotly/d3');
var isNumeric = require('fast-isnumeric');

var NOTEDATA = [];
Expand Down
2 changes: 1 addition & 1 deletion src/lib/svg_text_utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

/* global MathJax:false */

var d3 = require('d3');
var d3 = require('@plotly/d3');

var Lib = require('../lib');
var strTranslate = Lib.strTranslate;
Expand Down
2 changes: 1 addition & 1 deletion src/plot_api/plot_api.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

'use strict';

var d3 = require('d3');
var d3 = require('@plotly/d3');
var isNumeric = require('fast-isnumeric');
var hasHover = require('has-hover');

Expand Down
2 changes: 1 addition & 1 deletion src/plot_api/subroutines.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

'use strict';

var d3 = require('d3');
var d3 = require('@plotly/d3');
var Registry = require('../registry');
var Plots = require('../plots/plots');

Expand Down
2 changes: 1 addition & 1 deletion src/plots/cartesian/axes.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

'use strict';

var d3 = require('d3');
var d3 = require('@plotly/d3');
var isNumeric = require('fast-isnumeric');
var Plots = require('../../plots/plots');

Expand Down
2 changes: 1 addition & 1 deletion src/plots/cartesian/dragbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

'use strict';

var d3 = require('d3');
var d3 = require('@plotly/d3');
var tinycolor = require('tinycolor2');
var supportsPassive = require('has-passive-events');

Expand Down
2 changes: 1 addition & 1 deletion src/plots/cartesian/graph_interact.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

'use strict';

var d3 = require('d3');
var d3 = require('@plotly/d3');

var Fx = require('../../components/fx');
var dragElement = require('../../components/dragelement');
Expand Down
2 changes: 1 addition & 1 deletion src/plots/cartesian/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

'use strict';

var d3 = require('d3');
var d3 = require('@plotly/d3');

var Registry = require('../../registry');
var Lib = require('../../lib');
Expand Down
2 changes: 1 addition & 1 deletion src/plots/cartesian/set_convert.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

'use strict';

var d3 = require('d3');
var d3 = require('@plotly/d3');
var utcFormat = require('d3-time-format').utcFormat;
var isNumeric = require('fast-isnumeric');

Expand Down
2 changes: 1 addition & 1 deletion src/plots/cartesian/transition_axes.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

'use strict';

var d3 = require('d3');
var d3 = require('@plotly/d3');

var Registry = require('../../registry');
var Lib = require('../../lib');
Expand Down
2 changes: 1 addition & 1 deletion src/plots/geo/geo.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

/* global PlotlyGeoAssets:false */

var d3 = require('d3');
var d3 = require('@plotly/d3');

var Registry = require('../../registry');
var Lib = require('../../lib');
Expand Down
2 changes: 1 addition & 1 deletion src/plots/geo/zoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

'use strict';

var d3 = require('d3');
var d3 = require('@plotly/d3');
var Lib = require('../../lib');
var Registry = require('../../registry');

Expand Down
2 changes: 1 addition & 1 deletion src/plots/mapbox/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ var strTranslate = Lib.strTranslate;
var strScale = Lib.strScale;
var getSubplotCalcData = require('../../plots/get_data').getSubplotCalcData;
var xmlnsNamespaces = require('../../constants/xmlns_namespaces');
var d3 = require('d3');
var d3 = require('@plotly/d3');
var Drawing = require('../../components/drawing');
var svgTextUtils = require('../../lib/svg_text_utils');

Expand Down
Loading