diff --git a/package.json b/package.json index 7a0b8aed2..5f01efa05 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "react-chart-editor", "description": "plotly.js chart editor react component UI", - "version": "0.34.4", + "version": "0.35.0", "author": "Plotly, Inc.", "bugs": { "url": "https://github.com/plotly/react-chart-editor/issues" @@ -15,7 +15,7 @@ "fast-isnumeric": "^1.1.1", "immutability-helper": "^2.7.1", "plotly-icons": "1.2.3", - "plotly.js": "1.43.2", + "plotly.js": "1.44.1", "prop-types": "^15.5.10", "raf": "^3.4.0", "react-color": "^2.13.8", diff --git a/scripts/translationKeys/combined-translation-keys.txt b/scripts/translationKeys/combined-translation-keys.txt index cc4430894..c1eb7869b 100644 --- a/scripts/translationKeys/combined-translation-keys.txt +++ b/scripts/translationKeys/combined-translation-keys.txt @@ -12,7 +12,7 @@ $ 2D Contour Histogram // react-chart-editor: /lib/computeTraceOptionsFromSchema.js:33 2D Histogram // react-chart-editor: /lib/computeTraceOptionsFromSchema.js:29 3D // react-chart-editor: /lib/traceTypes.js:29 -3D Line // react-chart-editor: /lib/computeTraceOptionsFromSchema.js:148 +3D Line // react-chart-editor: /lib/computeTraceOptionsFromSchema.js:152 3D Mesh // react-chart-editor: /lib/computeTraceOptionsFromSchema.js:61 3D Scatter // react-chart-editor: /lib/computeTraceOptionsFromSchema.js:53 3D Surface // react-chart-editor: /lib/traceTypes.js:102 @@ -142,7 +142,7 @@ Click to enter Colorscale title Click to enter Component A title // plotly.js: plots/ternary/ternary.js:377 Click to enter Component B title // plotly.js: plots/ternary/ternary.js:387 Click to enter Component C title // plotly.js: plots/ternary/ternary.js:397 -Click to enter Plot title // plotly.js: plot_api/plot_api.js:566 +Click to enter Plot title // plotly.js: plot_api/plot_api.js:585 Click to enter X axis title // plotly.js: plots/plots.js:327 Click to enter Y axis title // plotly.js: plots/plots.js:328 Click to enter radial axis title // plotly.js: plots/polar/polar.js:501 @@ -225,7 +225,7 @@ Distributions Divergence // react-chart-editor: /components/fields/derived.js:616 Diverging // react-chart-editor: /default_panels/StyleLayoutPanel.js:40 Double-click on legend to isolate one trace // plotly.js: components/legend/handle_click.js:89 -Double-click to zoom back out // plotly.js: plots/cartesian/dragbox.js:1040 +Double-click to zoom back out // plotly.js: plots/cartesian/dragbox.js:1013 Download plot // plotly.js: components/modebar/buttons.js:55 Download plot as a png // plotly.js: components/modebar/buttons.js:54 Drag // react-chart-editor: /default_panels/StyleLayoutPanel.js:107 @@ -347,6 +347,7 @@ Intensity Interactions // react-chart-editor: /default_panels/StyleLayoutPanel.js:106 Interpolate // react-chart-editor: /default_panels/StyleTracesPanel.js:383 Interpolate Gaps // react-chart-editor: /default_panels/StyleTracesPanel.js:517 +Isosurface // react-chart-editor: /lib/computeTraceOptionsFromSchema.js:137 J (Optional) // react-chart-editor: /default_panels/GraphCreatePanel.js:93 January // react-chart-editor: /components/widgets/DateTimePicker.js:70 Jitter // react-chart-editor: /default_panels/StyleTracesPanel.js:305 @@ -560,7 +561,7 @@ Roughness SVG // react-chart-editor: /components/fields/TraceSelector.js:101 Sankey // react-chart-editor: /lib/computeTraceOptionsFromSchema.js:97 Satellite // react-chart-editor: /default_panels/GraphSubplotsPanel.js:81 -Satellite Map // react-chart-editor: /lib/computeTraceOptionsFromSchema.js:155 +Satellite Map // react-chart-editor: /lib/computeTraceOptionsFromSchema.js:159 Satellite with Streets // react-chart-editor: /default_panels/GraphSubplotsPanel.js:82 Scale // react-chart-editor: /default_panels/GraphSubplotsPanel.js:213 Scale Group // react-chart-editor: /default_panels/StyleTracesPanel.js:561 @@ -672,7 +673,7 @@ Tick Spacing Tick spacing // react-chart-editor: /default_panels/StyleColorbarsPanel.js:213 Ticks // react-chart-editor: /default_panels/StyleColorbarsPanel.js:221 Timescale Buttons // react-chart-editor: /default_panels/StyleAxesPanel.js:342 -Timeseries // react-chart-editor: /lib/computeTraceOptionsFromSchema.js:144 +Timeseries // react-chart-editor: /lib/computeTraceOptionsFromSchema.js:148 Tip // react-chart-editor: /default_panels/StyleTracesPanel.js:71 Title // react-chart-editor: /default_panels/StyleColorbarsPanel.js:37 Titles // react-chart-editor: /default_panels/StyleAxesPanel.js:32 @@ -794,16 +795,16 @@ in pixels incoming flow count: // plotly.js: traces/sankey/plot.js:147 k/M/B // react-chart-editor: /default_panels/StyleAxesPanel.js:206 k/M/G // react-chart-editor: /default_panels/StyleAxesPanel.js:205 -kde: // plotly.js: traces/violin/calc.js:77 +kde: // plotly.js: traces/violin/calc.js:86 lat: // plotly.js: traces/scattergeo/calc.js:48 lon: // plotly.js: traces/scattergeo/calc.js:49 low: // plotly.js: traces/ohlc/calc.js:104 -lower fence: // plotly.js: traces/box/calc.js:141 -max: // plotly.js: traces/box/calc.js:139 -mean ± σ: // plotly.js: traces/box/calc.js:140 -mean: // plotly.js: traces/box/calc.js:140 -median: // plotly.js: traces/box/calc.js:135 -min: // plotly.js: traces/box/calc.js:136 +lower fence: // plotly.js: traces/box/calc.js:146 +max: // plotly.js: traces/box/calc.js:144 +mean ± σ: // plotly.js: traces/box/calc.js:145 +mean: // plotly.js: traces/box/calc.js:145 +median: // plotly.js: traces/box/calc.js:140 +min: // plotly.js: traces/box/calc.js:141 new text // plotly.js: plots/plots.js:330 && react-chart-editor: /components/containers/AnnotationAccordion.js:37 noon // react-chart-editor: /components/widgets/DateTimePicker.js:140 open: // plotly.js: traces/ohlc/calc.js:102 @@ -811,8 +812,8 @@ outgoing flow count: panel under Structure to define traces. // react-chart-editor: /components/containers/TraceRequiredPanel.js:26 panel under Style. If Y values are omitted, the histogram function defaults to Count. // react-chart-editor: /default_panels/GraphCreatePanel.js:71 panel. // react-chart-editor: /components/fields/AxesCreator.js:155 -q1: // plotly.js: traces/box/calc.js:137 -q3: // plotly.js: traces/box/calc.js:138 +q1: // plotly.js: traces/box/calc.js:142 +q3: // plotly.js: traces/box/calc.js:143 scaled // react-chart-editor: /default_panels/StyleTracesPanel.js:65 source: // plotly.js: traces/sankey/plot.js:145 target: // plotly.js: traces/sankey/plot.js:146 @@ -825,7 +826,7 @@ transforms allow you to sort a trace, so as to control marker overlay or line co transforms allow you to summarize a trace using an aggregate function like "average" or "minimum". // react-chart-editor: /components/containers/TransformAccordion.js:118 under Style panel. If X values are omitted, the histogram function defaults to Count. // react-chart-editor: /default_panels/GraphCreatePanel.js:80 under Style panel. If Z values are omitted, the histogram function defaults to Count. // react-chart-editor: /default_panels/GraphCreatePanel.js:89 -upper fence: // plotly.js: traces/box/calc.js:142 +upper fence: // plotly.js: traces/box/calc.js:147 x // react-chart-editor: /default_panels/StyleAxesPanel.js:226 x10^6 // react-chart-editor: /default_panels/StyleAxesPanel.js:204 √ // react-chart-editor: /components/fields/ErrorBars.js:117 \ No newline at end of file diff --git a/scripts/translationKeys/translation-keys.txt b/scripts/translationKeys/translation-keys.txt index 0f595a61f..1d6578880 100644 --- a/scripts/translationKeys/translation-keys.txt +++ b/scripts/translationKeys/translation-keys.txt @@ -24,7 +24,7 @@ $ 2D Contour Histogram // /lib/computeTraceOptionsFromSchema.js:33 2D Histogram // /lib/computeTraceOptionsFromSchema.js:29 3D // /lib/traceTypes.js:29 -3D Line // /lib/computeTraceOptionsFromSchema.js:148 +3D Line // /lib/computeTraceOptionsFromSchema.js:152 3D Mesh // /lib/computeTraceOptionsFromSchema.js:61 3D Scatter // /lib/computeTraceOptionsFromSchema.js:53 3D Surface // /lib/traceTypes.js:102 @@ -343,6 +343,7 @@ Intensity Interactions // /default_panels/StyleLayoutPanel.js:106 Interpolate // /default_panels/StyleTracesPanel.js:383 Interpolate Gaps // /default_panels/StyleTracesPanel.js:517 +Isosurface // /lib/computeTraceOptionsFromSchema.js:137 J (Optional) // /default_panels/GraphCreatePanel.js:93 January // /components/widgets/DateTimePicker.js:70 Jitter // /default_panels/StyleTracesPanel.js:305 @@ -547,7 +548,7 @@ Roughness SVG // /components/fields/TraceSelector.js:101 Sankey // /lib/computeTraceOptionsFromSchema.js:97 Satellite // /default_panels/GraphSubplotsPanel.js:81 -Satellite Map // /lib/computeTraceOptionsFromSchema.js:155 +Satellite Map // /lib/computeTraceOptionsFromSchema.js:159 Satellite with Streets // /default_panels/GraphSubplotsPanel.js:82 Scale // /default_panels/GraphSubplotsPanel.js:213 Scale Group // /default_panels/StyleTracesPanel.js:561 @@ -656,7 +657,7 @@ Tick Spacing Tick spacing // /default_panels/StyleColorbarsPanel.js:213 Ticks // /default_panels/StyleColorbarsPanel.js:221 Timescale Buttons // /default_panels/StyleAxesPanel.js:342 -Timeseries // /lib/computeTraceOptionsFromSchema.js:144 +Timeseries // /lib/computeTraceOptionsFromSchema.js:148 Tip // /default_panels/StyleTracesPanel.js:71 Title // /default_panels/StyleColorbarsPanel.js:37 Titles // /default_panels/StyleAxesPanel.js:32 diff --git a/src/default_panels/StyleLayoutPanel.js b/src/default_panels/StyleLayoutPanel.js index c62c5468f..3d5956387 100644 --- a/src/default_panels/StyleLayoutPanel.js +++ b/src/default_panels/StyleLayoutPanel.js @@ -17,6 +17,7 @@ import { Radio, } from '../components'; import {HoverColor} from '../components/fields/derived'; +import DataSelector from '../components/fields/DataSelector'; const StyleLayoutPanel = (props, {localize: _}) => ( @@ -165,6 +166,9 @@ const StyleLayoutPanel = (props, {localize: _}) => ( + + + ); diff --git a/src/lib/computeTraceOptionsFromSchema.js b/src/lib/computeTraceOptionsFromSchema.js index 1c0da0522..8ff33db1a 100644 --- a/src/lib/computeTraceOptionsFromSchema.js +++ b/src/lib/computeTraceOptionsFromSchema.js @@ -132,6 +132,10 @@ function computeTraceOptionsFromSchema(schema, _, context) { value: 'barpolar', label: _('Polar Bar'), }, + { + value: 'isosurface', + label: _('Isosurface'), + }, ].filter(obj => traceTypes.indexOf(obj.value) !== -1); const traceIndex = traceType => traceOptions.findIndex(opt => opt.value === traceType); diff --git a/src/lib/index.js b/src/lib/index.js index d26665ddf..5a071d4dd 100644 --- a/src/lib/index.js +++ b/src/lib/index.js @@ -155,7 +155,7 @@ function maybeAdjustSrc(src, srcAttributePath, traceType, config) { return src[0]; } - return config && config.fromSrc ? config.fromSrc(src, traceType) : src; + return config && config.fromSrc ? config.fromSrc(src, traceType, srcAttributePath) : src; } function adjustColorscale(colorscale, numberOfNeededColors, colorscaleType, config) { diff --git a/src/lib/traceTypes.js b/src/lib/traceTypes.js index cecabc19f..04f213dc3 100644 --- a/src/lib/traceTypes.js +++ b/src/lib/traceTypes.js @@ -240,4 +240,9 @@ export const traceTypes = _ => [ label: _('Carpet'), category: chartCategory(_).HIDDEN, }, + { + value: 'isosurface', + label: _('Isosurface'), + category: chartCategory(_).HIDDEN, + }, ];