diff --git a/dev/dataSources.js b/dev/dataSources.js index 3548908ec..288fba219 100644 --- a/dev/dataSources.js +++ b/dev/dataSources.js @@ -1745,4 +1745,5 @@ export default { ], 'countries iso': ['AGO', 'ALB', 'ARE', 'ARG', 'ARM', 'AUS', 'AUT', 'AZE'], states: ['AL', 'AK', 'AZ', 'AR', 'CA', 'CO', 'CT', 'DE', 'FL', 'GA'], + textpositions: ['bottom', 'bottom right', 'left', 'right', 'left'], }; diff --git a/package.json b/package.json index 18f4e0266..469c120b1 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.35.1", + "version": "0.35.2", "author": "Plotly, Inc.", "bugs": { "url": "https://github.com/plotly/react-chart-editor/issues" @@ -126,4 +126,4 @@ "watch": "babel src --watch --out-dir lib --source-maps | node-sass -w src/styles/main.scss lib/react-chart-editor.css", "watch-test": "jest --watch" } -} \ No newline at end of file +} diff --git a/scripts/translationKeys/combined-translation-keys.txt b/scripts/translationKeys/combined-translation-keys.txt index 2acf4da25..e827f631b 100644 --- a/scripts/translationKeys/combined-translation-keys.txt +++ b/scripts/translationKeys/combined-translation-keys.txt @@ -1,6 +1,7 @@ # // react-chart-editor: /default_panels/StyleAxesPanel.js:228 $ // react-chart-editor: /default_panels/StyleAxesPanel.js:227 -% // react-chart-editor: /components/fields/derived.js:530 +% // react-chart-editor: /components/fields/derived.js:503 +("Top", "Middle", "Bottom") + ("Left", "Center", "Right") // react-chart-editor: /components/fields/TextPosition.js:45 1 234,56 // react-chart-editor: /default_panels/StyleLayoutPanel.js:65 1 234.56 // react-chart-editor: /default_panels/StyleLayoutPanel.js:64 1,234.56 // react-chart-editor: /default_panels/StyleLayoutPanel.js:63 @@ -19,7 +20,7 @@ $ 45 // react-chart-editor: /default_panels/StyleAxesPanel.js:178 90 // react-chart-editor: /default_panels/StyleAxesPanel.js:179 @ // react-chart-editor: /default_panels/StyleAxesPanel.js:229 -A // react-chart-editor: /components/fields/derived.js:593 +A // react-chart-editor: /components/fields/derived.js:566 Above // react-chart-editor: /default_panels/StyleImagesPanel.js:35 Active Color // react-chart-editor: /default_panels/StyleAxesPanel.js:384 Active Icon Color // react-chart-editor: /default_panels/StyleLayoutPanel.js:88 @@ -31,7 +32,7 @@ Aggregate Aggregations // react-chart-editor: /default_panels/GraphTransformsPanel.js:29 Aitoff // react-chart-editor: /default_panels/GraphSubplotsPanel.js:138 Albers USA // react-chart-editor: /default_panels/GraphSubplotsPanel.js:119 -All // react-chart-editor: /default_panels/StyleAxesPanel.js:214 +All // react-chart-editor: /components/fields/TextPosition.js:21 All points in a trace are colored in the same color. // react-chart-editor: /components/fields/MarkerColor.js:168 All traces will be colored in the the same color. // react-chart-editor: /components/fields/MarkerColor.js:110 All will be colored in the same color. // react-chart-editor: /components/fields/MultiColorPicker.js:89 @@ -47,15 +48,15 @@ Annotations are text and arrows you can use to point out specific parts of your Any // react-chart-editor: /default_panels/StyleLayoutPanel.js:127 April // react-chart-editor: /components/widgets/DateTimePicker.js:73 Area // react-chart-editor: /default_panels/StyleTracesPanel.js:324 -Arrow // react-chart-editor: /default_panels/StyleNotesPanel.js:28 -Arrowhead // react-chart-editor: /default_panels/StyleNotesPanel.js:35 +Arrow // react-chart-editor: /default_panels/StyleNotesPanel.js:49 +Arrowhead // react-chart-editor: /default_panels/StyleNotesPanel.js:56 Ascending // react-chart-editor: /default_panels/GraphTransformsPanel.js:85 Asia // react-chart-editor: /default_panels/GraphSubplotsPanel.js:103 Aspect Ratio // react-chart-editor: /default_panels/GraphSubplotsPanel.js:39 Asymmetric // react-chart-editor: /components/fields/ErrorBars.js:78 Atlas Map // react-chart-editor: /lib/computeTraceOptionsFromSchema.js:73 August // react-chart-editor: /components/widgets/DateTimePicker.js:77 -Auto // react-chart-editor: /components/fields/derived.js:515 +Auto // react-chart-editor: /components/fields/MarkerColor.js:195 Auto margins // react-chart-editor: /default_panels/StyleAxesPanel.js:157 Autoscale // plotly.js: components/modebar/buttons.js:150 Average // react-chart-editor: /default_panels/GraphTransformsPanel.js:40 && react-chart-editor: /components/fields/derived.js:136 @@ -68,7 +69,7 @@ Axis Line Axis to Style // react-chart-editor: /components/fields/AxesSelector.js:44 Azimuthal Equal Area // react-chart-editor: /default_panels/GraphSubplotsPanel.js:125 Azimuthal Equidistant // react-chart-editor: /default_panels/GraphSubplotsPanel.js:127 -B // react-chart-editor: /components/fields/derived.js:594 +B // react-chart-editor: /components/fields/derived.js:567 Background // react-chart-editor: /default_panels/StyleSlidersPanel.js:19 Background Color // react-chart-editor: /default_panels/StyleAxesPanel.js:336 Backward // react-chart-editor: /default_panels/StyleAxesPanel.js:373 @@ -93,9 +94,9 @@ Border Width Borders and Background // react-chart-editor: /default_panels/StyleColorbarsPanel.js:249 Both // react-chart-editor: /default_panels/StyleTracesPanel.js:582 Bottom // react-chart-editor: /components/fields/derived.js:99 -Bottom Center // react-chart-editor: /components/fields/derived.js:508 -Bottom Left // react-chart-editor: /components/fields/derived.js:507 -Bottom Right // react-chart-editor: /components/fields/derived.js:509 +Bottom Center // react-chart-editor: /components/fields/TextPosition.js:91 +Bottom Left // react-chart-editor: /components/fields/TextPosition.js:90 +Bottom Right // react-chart-editor: /components/fields/TextPosition.js:92 Boundaries // react-chart-editor: /default_panels/GraphSubplotsPanel.js:22 Box // react-chart-editor: /default_panels/StyleTracesPanel.js:598 Box Fill Color // react-chart-editor: /default_panels/StyleTracesPanel.js:604 @@ -107,14 +108,14 @@ Box Padding Box Select // plotly.js: components/modebar/buttons.js:114 Box Size and Spacing // react-chart-editor: /default_panels/StyleTracesPanel.js:245 Box Width // react-chart-editor: /default_panels/StyleTracesPanel.js:252 -Boxes // react-chart-editor: /components/fields/derived.js:671 -Boxes and Points // react-chart-editor: /components/fields/derived.js:673 +Boxes // react-chart-editor: /components/fields/derived.js:644 +Boxes and Points // react-chart-editor: /components/fields/derived.js:646 Button // react-chart-editor: /components/containers/RangeSelectorAccordion.js:38 Button Labels // react-chart-editor: /default_panels/StyleUpdateMenusPanel.js:21 Buttons // react-chart-editor: /components/containers/UpdateMenuAccordion.js:22 By // react-chart-editor: /default_panels/GraphTransformsPanel.js:76 By Type // react-chart-editor: /components/containers/TraceAccordion.js:166 -C // react-chart-editor: /components/fields/derived.js:595 +C // react-chart-editor: /components/fields/derived.js:568 Call out your data. // react-chart-editor: /components/containers/AnnotationAccordion.js:50 Candlestick // react-chart-editor: /lib/computeTraceOptionsFromSchema.js:121 Canvas // react-chart-editor: /components/fields/derived.js:409 @@ -148,7 +149,7 @@ Click to enter Y axis title Click to enter radial axis title // plotly.js: plots/polar/polar.js:501 Clockwise // react-chart-editor: /components/fields/derived.js:105 Close // react-chart-editor: /default_panels/GraphCreatePanel.js:98 -Closest // react-chart-editor: /components/fields/derived.js:703 +Closest // react-chart-editor: /components/fields/derived.js:676 Coastlines // react-chart-editor: /default_panels/GraphSubplotsPanel.js:160 Collapse All // react-chart-editor: /components/containers/PanelHeader.js:35 Color // react-chart-editor: /components/fields/ErrorBars.js:102 @@ -218,11 +219,11 @@ Diagonal Diameter // react-chart-editor: /default_panels/StyleTracesPanel.js:324 Diffuse // react-chart-editor: /default_panels/StyleTracesPanel.js:524 Direction // react-chart-editor: /default_panels/StyleAxesPanel.js:71 -Disable // react-chart-editor: /components/fields/derived.js:706 +Disable // react-chart-editor: /components/fields/derived.js:679 Disabled // react-chart-editor: /default_panels/GraphTransformsPanel.js:73 Display // react-chart-editor: /default_panels/StyleTracesPanel.js:183 Distributions // react-chart-editor: /lib/traceTypes.js:17 -Divergence // react-chart-editor: /components/fields/derived.js:616 +Divergence // react-chart-editor: /components/fields/derived.js:589 Diverging // react-chart-editor: /default_panels/StyleLayoutPanel.js:42 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:1013 @@ -271,7 +272,7 @@ Fill Fill Color // react-chart-editor: /default_panels/GraphCreatePanel.js:130 Fill to // react-chart-editor: /default_panels/StyleTracesPanel.js:436 Filled Area // react-chart-editor: /default_panels/StyleTracesPanel.js:435 -Fills // react-chart-editor: /components/fields/derived.js:686 +Fills // react-chart-editor: /components/fields/derived.js:659 Filter // react-chart-editor: /components/containers/TransformAccordion.js:21 Finance // react-chart-editor: /lib/traceTypes.js:13 First // react-chart-editor: /default_panels/GraphTransformsPanel.js:47 @@ -319,6 +320,7 @@ Histogram Normalization Hole // react-chart-editor: /default_panels/GraphSubplotsPanel.js:226 Hole Size // react-chart-editor: /default_panels/StyleTracesPanel.js:283 Horizontal // react-chart-editor: /default_panels/GraphCreatePanel.js:63 +Horizontal Alignment // react-chart-editor: /default_panels/StyleNotesPanel.js:28 Horizontal Boundaries // react-chart-editor: /default_panels/StyleShapesPanel.js:30 Horizontal Gap // react-chart-editor: /default_panels/StyleTracesPanel.js:504 Horizontal Gaps // react-chart-editor: /default_panels/StyleTracesPanel.js:508 @@ -342,7 +344,7 @@ Increasing Trace Styles Individually // react-chart-editor: /components/containers/TraceAccordion.js:165 Inequality // react-chart-editor: /components/fields/FilterOperation.js:71 Infer Zero // react-chart-editor: /default_panels/StyleTracesPanel.js:382 -Inside // react-chart-editor: /components/fields/derived.js:513 +Inside // react-chart-editor: /components/fields/TextPosition.js:96 Intensity // react-chart-editor: /default_panels/GraphCreatePanel.js:147 Interactions // react-chart-editor: /default_panels/StyleLayoutPanel.js:108 Interpolate // react-chart-editor: /default_panels/StyleTracesPanel.js:383 @@ -354,11 +356,11 @@ Jitter July // react-chart-editor: /components/widgets/DateTimePicker.js:76 June // react-chart-editor: /components/widgets/DateTimePicker.js:75 K (Optional) // react-chart-editor: /default_panels/GraphCreatePanel.js:94 -KDE // react-chart-editor: /components/fields/derived.js:679 +KDE // react-chart-editor: /components/fields/derived.js:652 Kavrayskiy 7 // react-chart-editor: /default_panels/GraphSubplotsPanel.js:123 LaTeX // react-chart-editor: /components/widgets/text_editors/MultiFormat.js:24 LaTeX is a math typesetting language that doesn't work with rich text. // react-chart-editor: /components/widgets/text_editors/MultiFormat.js:105 -Label // react-chart-editor: /components/fields/derived.js:528 +Label // react-chart-editor: /components/fields/derived.js:501 Label Format // react-chart-editor: /default_panels/StyleAxesPanel.js:186 Label Prefix // react-chart-editor: /default_panels/StyleColorbarsPanel.js:158 Label Suffix // react-chart-editor: /default_panels/StyleColorbarsPanel.js:184 @@ -370,7 +372,7 @@ Lasso Select Last // react-chart-editor: /default_panels/GraphTransformsPanel.js:48 Last label // react-chart-editor: /default_panels/StyleAxesPanel.js:242 Lat/Lon // react-chart-editor: /components/fields/LocationSelector.js:99 -Latitude // react-chart-editor: /components/fields/derived.js:587 +Latitude // react-chart-editor: /components/fields/derived.js:560 Left // react-chart-editor: /components/fields/derived.js:94 Legend // react-chart-editor: /default_panels/StyleLegendPanel.js:16 Legend Box // react-chart-editor: /default_panels/StyleLegendPanel.js:26 @@ -383,17 +385,17 @@ Light Position Lighting // react-chart-editor: /default_panels/StyleTracesPanel.js:522 Line // react-chart-editor: /default_panels/StyleShapesPanel.js:24 Line Color // react-chart-editor: /default_panels/StyleTracesPanel.js:539 -Line Width // react-chart-editor: /default_panels/StyleNotesPanel.js:33 +Line Width // react-chart-editor: /default_panels/StyleNotesPanel.js:54 Linear // react-chart-editor: /default_panels/StyleAxesPanel.js:48 Lines // react-chart-editor: /default_panels/StyleAxesPanel.js:81 Lines, Rectangles and Ellipses. // react-chart-editor: /components/containers/ShapeAccordion.js:55 Loading... // react-chart-editor: /components/widgets/Dropzone.js:110 -Location // react-chart-editor: /components/fields/derived.js:582 +Location // react-chart-editor: /components/fields/derived.js:555 Location Format // react-chart-editor: /components/fields/LocationSelector.js:27 Locations // react-chart-editor: /components/fields/LocationSelector.js:25 Log // react-chart-editor: /default_panels/StyleAxesPanel.js:49 Logos, watermarks and more. // react-chart-editor: /components/containers/ImageAccordion.js:55 -Longitude // react-chart-editor: /components/fields/derived.js:587 +Longitude // react-chart-editor: /components/fields/derived.js:560 Looks like there aren't any traces defined yet. // react-chart-editor: /components/containers/TraceRequiredPanel.js:22 Low // react-chart-editor: /default_panels/GraphCreatePanel.js:97 Lower < Target < Upper // react-chart-editor: /components/fields/FilterOperation.js:19 @@ -434,9 +436,9 @@ Menus Mercator // react-chart-editor: /default_panels/GraphSubplotsPanel.js:116 Meta Text // react-chart-editor: /default_panels/StyleLayoutPanel.js:170 Middle // react-chart-editor: /default_panels/StyleAxesPanel.js:410 -Middle Center // react-chart-editor: /components/fields/derived.js:505 -Middle Left // react-chart-editor: /components/fields/derived.js:504 -Middle Right // react-chart-editor: /components/fields/derived.js:506 +Middle Center // react-chart-editor: /components/fields/TextPosition.js:88 +Middle Left // react-chart-editor: /components/fields/TextPosition.js:87 +Middle Right // react-chart-editor: /components/fields/TextPosition.js:89 Miller // react-chart-editor: /default_panels/GraphSubplotsPanel.js:122 Milliseconds // react-chart-editor: /components/fields/AxisInterval.js:167 Min // react-chart-editor: /components/fields/MarkerColor.js:199 @@ -463,7 +465,7 @@ No No Results // react-chart-editor: /components/widgets/Dropdown.js:76 None // react-chart-editor: /components/fields/derived.js:62 None label // react-chart-editor: /default_panels/StyleColorbarsPanel.js:179 -Norm // react-chart-editor: /components/fields/derived.js:615 +Norm // react-chart-editor: /components/fields/derived.js:588 Normal // react-chart-editor: /components/fields/MarkerColor.js:185 Normalization // react-chart-editor: /default_panels/StyleTracesPanel.js:216 North America // react-chart-editor: /default_panels/GraphSubplotsPanel.js:105 @@ -471,7 +473,7 @@ Note Text Note: X and Y Values are used for binning. If Z values are provided, they are used as inputs to the histogram function which you can configure in the // react-chart-editor: /default_panels/GraphCreatePanel.js:85 Note: in horizontal orientation, Y values are used for binning. If X values are provided, they are used as inputs to the histogram function which you can configure in the // react-chart-editor: /default_panels/GraphCreatePanel.js:76 Note: in vertical orientation, X values are used for binning. If Y values are provided, they are used as inputs to the histogram function which you can configure in the // react-chart-editor: /default_panels/GraphCreatePanel.js:67 -Note: item count starts at 0. // react-chart-editor: /default_panels/StyleLayoutPanel.js:189 +Note: item count starts at 0. // react-chart-editor: /default_panels/StyleLayoutPanel.js:192 November // react-chart-editor: /components/widgets/DateTimePicker.js:80 Number format // react-chart-editor: /default_panels/StyleLayoutPanel.js:60 Number of Contours // react-chart-editor: /default_panels/StyleTracesPanel.js:366 @@ -493,14 +495,14 @@ Orientation Orthographic // react-chart-editor: /default_panels/GraphSubplotsPanel.js:117 Outdoors // react-chart-editor: /default_panels/GraphSubplotsPanel.js:78 Outliers // react-chart-editor: /default_panels/StyleTracesPanel.js:288 -Outside // react-chart-editor: /components/fields/derived.js:514 +Outside // react-chart-editor: /components/fields/TextPosition.js:97 Overlaid // react-chart-editor: /default_panels/StyleTracesPanel.js:211 Overlay // react-chart-editor: /default_panels/GraphSubplotsPanel.js:67 Padding // react-chart-editor: /default_panels/StyleColorbarsPanel.js:113 Pan // plotly.js: components/modebar/buttons.js:105 && react-chart-editor: /default_panels/StyleLayoutPanel.js:116 Parallel Categories // react-chart-editor: /lib/traceTypes.js:215 Parallel Coordinates // react-chart-editor: /lib/computeTraceOptionsFromSchema.js:93 -Percent // react-chart-editor: /components/fields/derived.js:603 +Percent // react-chart-editor: /components/fields/derived.js:576 Pie // react-chart-editor: /components/containers/SubplotAccordion.js:132 Pie Colors // react-chart-editor: /default_panels/StyleTracesPanel.js:81 Pie Segments // react-chart-editor: /components/containers/TraceMarkerSection.js:21 @@ -511,7 +513,7 @@ Plot Background Point Cloud // react-chart-editor: /lib/computeTraceOptionsFromSchema.js:85 Point Opacity // react-chart-editor: /default_panels/StyleTracesPanel.js:313 Points // react-chart-editor: /components/containers/TraceMarkerSection.js:23 -Points and Fills // react-chart-editor: /components/fields/derived.js:687 +Points and Fills // react-chart-editor: /components/fields/derived.js:660 Polar // react-chart-editor: /lib/constants.js:106 Polar Bar // react-chart-editor: /lib/computeTraceOptionsFromSchema.js:133 Polar Scatter // react-chart-editor: /lib/computeTraceOptionsFromSchema.js:125 @@ -523,14 +525,14 @@ Position on Positive // react-chart-editor: /default_panels/StyleTracesPanel.js:583 Positive/Negative Stacked // react-chart-editor: /default_panels/StyleTracesPanel.js:209 Prefix // react-chart-editor: /default_panels/StyleAxesPanel.js:222 -Previous X // react-chart-editor: /components/fields/derived.js:639 -Previous Y // react-chart-editor: /components/fields/derived.js:638 +Previous X // react-chart-editor: /components/fields/derived.js:612 +Previous Y // react-chart-editor: /components/fields/derived.js:611 Probability // react-chart-editor: /default_panels/StyleTracesPanel.js:116 Probability Density // react-chart-editor: /default_panels/StyleTracesPanel.js:118 Produced with Plotly // plotly.js: components/modebar/modebar.js:309 Projection // react-chart-editor: /default_panels/GraphSubplotsPanel.js:111 Pull // react-chart-editor: /default_panels/StyleTracesPanel.js:284 -R // react-chart-editor: /components/fields/derived.js:598 +R // react-chart-editor: /components/fields/derived.js:571 RMS // react-chart-editor: /default_panels/GraphTransformsPanel.js:43 Radians // react-chart-editor: /default_panels/GraphCreatePanel.js:117 Radius // react-chart-editor: /default_panels/GraphCreatePanel.js:112 @@ -657,18 +659,20 @@ Target > Reference Target ≠ Reference // react-chart-editor: /components/fields/FilterOperation.js:10 Target ≤ Reference // react-chart-editor: /components/fields/FilterOperation.js:12 Target ≥ Reference // react-chart-editor: /components/fields/FilterOperation.js:15 -Template // react-chart-editor: /components/fields/derived.js:547 +Template // react-chart-editor: /components/fields/derived.js:520 Ternary // react-chart-editor: /default_panels/GraphSubplotsPanel.js:219 Ternary Scatter // react-chart-editor: /lib/computeTraceOptionsFromSchema.js:45 -Text // react-chart-editor: /components/fields/derived.js:534 +Text // react-chart-editor: /components/fields/derived.js:507 Text Alignment // react-chart-editor: /default_panels/StyleLegendPanel.js:59 Text Attributes // react-chart-editor: /default_panels/StyleTracesPanel.js:439 Text Position // react-chart-editor: /default_panels/StyleTracesPanel.js:460 -Theta // react-chart-editor: /components/fields/derived.js:598 +Theta // react-chart-editor: /components/fields/derived.js:571 Theta Unit // react-chart-editor: /default_panels/GraphCreatePanel.js:115 Thickness // react-chart-editor: /components/fields/ErrorBars.js:103 This input has multiple values associated with it. Changing this setting will override these custom inputs. // react-chart-editor: /lib/constants.js:20 This panel could not be displayed due to an error. // react-chart-editor: /components/containers/PlotlyPanel.js:15 +This will position all text values on the plot according to the selected position. // react-chart-editor: /components/fields/TextPosition.js:29 +This will position text values individually, according to the provided data positions array. // react-chart-editor: /components/fields/TextPosition.js:39 Tick Labels // react-chart-editor: /default_panels/StyleAxesPanel.js:147 Tick Markers // react-chart-editor: /default_panels/StyleAxesPanel.js:283 Tick Spacing // react-chart-editor: /default_panels/StyleAxesPanel.js:272 @@ -680,19 +684,19 @@ Tip Title // react-chart-editor: /default_panels/StyleColorbarsPanel.js:37 Titles // react-chart-editor: /default_panels/StyleAxesPanel.js:32 To Date // react-chart-editor: /default_panels/StyleAxesPanel.js:372 -To Next // react-chart-editor: /components/fields/derived.js:650 -To Self // react-chart-editor: /components/fields/derived.js:649 +To Next // react-chart-editor: /components/fields/derived.js:623 +To Self // react-chart-editor: /components/fields/derived.js:622 To upload multiple files, create multiple files and upload them individually. // react-chart-editor: /components/widgets/Dropzone.js:103 Toggle Spike Lines // plotly.js: components/modebar/buttons.js:552 Toggle show closest data on hover // plotly.js: components/modebar/buttons.js:363 Top // react-chart-editor: /components/fields/derived.js:99 -Top Center // react-chart-editor: /components/fields/derived.js:502 -Top Left // react-chart-editor: /components/fields/derived.js:501 -Top Right // react-chart-editor: /components/fields/derived.js:503 +Top Center // react-chart-editor: /components/fields/TextPosition.js:85 +Top Left // react-chart-editor: /components/fields/TextPosition.js:84 +Top Right // react-chart-editor: /components/fields/TextPosition.js:86 Trace // react-chart-editor: /components/containers/TraceAccordion.js:138 Trace Opacity // react-chart-editor: /default_panels/StyleTracesPanel.js:50 Trace Order // react-chart-editor: /default_panels/StyleLegendPanel.js:75 -Trace name // react-chart-editor: /components/fields/derived.js:624 +Trace name // react-chart-editor: /components/fields/derived.js:597 Trace your data. // react-chart-editor: /components/containers/TraceAccordion.js:118 Traces // react-chart-editor: /components/containers/TraceRequiredPanel.js:25 Traces of various types like bar and line are the building blocks of your figure. // react-chart-editor: /components/containers/TraceAccordion.js:120 @@ -707,20 +711,21 @@ Turntable Turntable rotation // plotly.js: components/modebar/buttons.js:295 Type // react-chart-editor: /default_panels/GraphCreatePanel.js:29 Typeface // react-chart-editor: /default_panels/StyleAxesPanel.js:36 -U // react-chart-editor: /components/fields/derived.js:612 +U // react-chart-editor: /components/fields/derived.js:585 URL // react-chart-editor: /components/widgets/text_editors/RichText/LinkEditor.js:90 USA // react-chart-editor: /default_panels/GraphSubplotsPanel.js:101 USA State Abbreviations (e.g. NY) // react-chart-editor: /components/fields/LocationSelector.js:34 Unsorted // react-chart-editor: /default_panels/StyleTracesPanel.js:272 Upper Bound // react-chart-editor: /components/fields/FilterOperation.js:187 -V // react-chart-editor: /components/fields/derived.js:613 -Value // react-chart-editor: /components/fields/derived.js:529 +V // react-chart-editor: /components/fields/derived.js:586 +Value // react-chart-editor: /components/fields/derived.js:502 Value (-) // react-chart-editor: /components/fields/ErrorBars.js:143 -Values // react-chart-editor: /components/fields/derived.js:546 +Values // react-chart-editor: /components/fields/derived.js:519 Variable // react-chart-editor: /components/fields/MarkerColor.js:156 Vertex Normal // react-chart-editor: /default_panels/StyleTracesPanel.js:528 Vertexcolor // react-chart-editor: /default_panels/GraphCreatePanel.js:149 Vertical // react-chart-editor: /default_panels/GraphCreatePanel.js:63 +Vertical Alignment // react-chart-editor: /default_panels/StyleNotesPanel.js:38 Vertical Boundaries // react-chart-editor: /default_panels/StyleShapesPanel.js:36 Vertical Gap // react-chart-editor: /default_panels/StyleTracesPanel.js:505 Vertical Gaps // react-chart-editor: /default_panels/StyleTracesPanel.js:509 @@ -731,40 +736,40 @@ Violin Mode Violin Padding // react-chart-editor: /default_panels/StyleTracesPanel.js:264 Violin Size and Spacing // react-chart-editor: /default_panels/StyleTracesPanel.js:256 Violin Width // react-chart-editor: /default_panels/StyleTracesPanel.js:263 -Violins // react-chart-editor: /components/fields/derived.js:677 -Violins and Points // react-chart-editor: /components/fields/derived.js:680 -Violins, Points and KDE // react-chart-editor: /components/fields/derived.js:681 +Violins // react-chart-editor: /components/fields/derived.js:650 +Violins and Points // react-chart-editor: /components/fields/derived.js:653 +Violins, Points and KDE // react-chart-editor: /components/fields/derived.js:654 Visible Sides // react-chart-editor: /default_panels/StyleTracesPanel.js:580 -W // react-chart-editor: /components/fields/derived.js:614 +W // react-chart-editor: /components/fields/derived.js:587 WebGL // react-chart-editor: /components/fields/TraceSelector.js:101 Well this is embarrassing. // react-chart-editor: /components/containers/PlotlyPanel.js:14 Whisker Width // react-chart-editor: /default_panels/StyleTracesPanel.js:267 Width // react-chart-editor: /default_panels/GraphCreatePanel.js:142 Winkel Tripel // react-chart-editor: /default_panels/GraphSubplotsPanel.js:120 World // react-chart-editor: /default_panels/GraphSubplotsPanel.js:100 -X // react-chart-editor: /components/fields/derived.js:565 -X = 0 // react-chart-editor: /components/fields/derived.js:637 +X // react-chart-editor: /components/fields/derived.js:538 +X = 0 // react-chart-editor: /components/fields/derived.js:610 X Anchor // react-chart-editor: /default_panels/GraphSubplotsPanel.js:30 -X Axis // react-chart-editor: /components/fields/derived.js:704 +X Axis // react-chart-editor: /components/fields/derived.js:677 X Bin End // react-chart-editor: /default_panels/StyleTracesPanel.js:231 X Bin Size // react-chart-editor: /default_panels/StyleTracesPanel.js:233 X Bin Start // react-chart-editor: /default_panels/StyleTracesPanel.js:230 -X Offset // react-chart-editor: /default_panels/StyleNotesPanel.js:37 +X Offset // react-chart-editor: /default_panels/StyleNotesPanel.js:58 X Overlay // react-chart-editor: /default_panels/GraphSubplotsPanel.js:23 X Values // react-chart-editor: /default_panels/GraphCreatePanel.js:38 -X Vector // react-chart-editor: /default_panels/StyleNotesPanel.js:39 +X Vector // react-chart-editor: /default_panels/StyleNotesPanel.js:60 X start // react-chart-editor: /default_panels/GraphCreatePanel.js:105 -Y // react-chart-editor: /components/fields/derived.js:565 -Y = 0 // react-chart-editor: /components/fields/derived.js:636 +Y // react-chart-editor: /components/fields/derived.js:538 +Y = 0 // react-chart-editor: /components/fields/derived.js:609 Y Anchor // react-chart-editor: /default_panels/GraphSubplotsPanel.js:34 -Y Axis // react-chart-editor: /components/fields/derived.js:705 +Y Axis // react-chart-editor: /components/fields/derived.js:678 Y Bin End // react-chart-editor: /default_panels/StyleTracesPanel.js:236 Y Bin Size // react-chart-editor: /default_panels/StyleTracesPanel.js:238 Y Bin Start // react-chart-editor: /default_panels/StyleTracesPanel.js:235 -Y Offset // react-chart-editor: /default_panels/StyleNotesPanel.js:38 +Y Offset // react-chart-editor: /default_panels/StyleNotesPanel.js:59 Y Overlay // react-chart-editor: /default_panels/GraphSubplotsPanel.js:24 Y Values // react-chart-editor: /default_panels/GraphCreatePanel.js:46 -Y Vector // react-chart-editor: /default_panels/StyleNotesPanel.js:40 +Y Vector // react-chart-editor: /default_panels/StyleNotesPanel.js:61 Y start // react-chart-editor: /default_panels/GraphCreatePanel.js:106 Year // react-chart-editor: /default_panels/StyleAxesPanel.js:358 Years // react-chart-editor: /components/fields/AxisInterval.js:162 @@ -777,7 +782,7 @@ You can refer to the items in this column in any text fields of the editor like You can style and position your axes in the // react-chart-editor: /components/fields/AxesCreator.js:153 You can style and position your subplots in the // react-chart-editor: /components/fields/SubplotCreator.js:134 You need to provide a component for the modal to open! // react-chart-editor: /components/containers/ModalProvider.js:33 -Z // react-chart-editor: /components/fields/derived.js:580 +Z // react-chart-editor: /components/fields/derived.js:553 Z Values // react-chart-editor: /default_panels/GraphCreatePanel.js:55 Z start // react-chart-editor: /default_panels/GraphCreatePanel.js:107 Zero Line // react-chart-editor: /default_panels/StyleAxesPanel.js:129 diff --git a/scripts/translationKeys/translation-keys.txt b/scripts/translationKeys/translation-keys.txt index 80a92181e..bdc1fa5a6 100644 --- a/scripts/translationKeys/translation-keys.txt +++ b/scripts/translationKeys/translation-keys.txt @@ -12,7 +12,8 @@ under Style panel. If Z values are omitted, the histogram function defaults to Count. // /default_panels/GraphCreatePanel.js:89 # // /default_panels/StyleAxesPanel.js:228 $ // /default_panels/StyleAxesPanel.js:227 -% // /components/fields/derived.js:530 +% // /components/fields/derived.js:503 +("Top", "Middle", "Bottom") + ("Left", "Center", "Right") // /components/fields/TextPosition.js:45 1 234,56 // /default_panels/StyleLayoutPanel.js:65 1 234.56 // /default_panels/StyleLayoutPanel.js:64 1,234.56 // /default_panels/StyleLayoutPanel.js:63 @@ -31,7 +32,7 @@ $ 45 // /default_panels/StyleAxesPanel.js:178 90 // /default_panels/StyleAxesPanel.js:179 @ // /default_panels/StyleAxesPanel.js:229 -A // /components/fields/derived.js:593 +A // /components/fields/derived.js:566 Above // /default_panels/StyleImagesPanel.js:35 Active Color // /default_panels/StyleAxesPanel.js:384 Active Icon Color // /default_panels/StyleLayoutPanel.js:88 @@ -43,7 +44,7 @@ Aggregate Aggregations // /default_panels/GraphTransformsPanel.js:29 Aitoff // /default_panels/GraphSubplotsPanel.js:138 Albers USA // /default_panels/GraphSubplotsPanel.js:119 -All // /default_panels/StyleAxesPanel.js:214 +All // /components/fields/TextPosition.js:21 All points in a trace are colored in the same color. // /components/fields/MarkerColor.js:168 All traces will be colored in the the same color. // /components/fields/MarkerColor.js:110 All will be colored in the same color. // /components/fields/MultiColorPicker.js:89 @@ -59,15 +60,15 @@ Annotations are text and arrows you can use to point out specific parts of your Any // /default_panels/StyleLayoutPanel.js:127 April // /components/widgets/DateTimePicker.js:73 Area // /default_panels/StyleTracesPanel.js:324 -Arrow // /default_panels/StyleNotesPanel.js:28 -Arrowhead // /default_panels/StyleNotesPanel.js:35 +Arrow // /default_panels/StyleNotesPanel.js:49 +Arrowhead // /default_panels/StyleNotesPanel.js:56 Ascending // /default_panels/GraphTransformsPanel.js:85 Asia // /default_panels/GraphSubplotsPanel.js:103 Aspect Ratio // /default_panels/GraphSubplotsPanel.js:39 Asymmetric // /components/fields/ErrorBars.js:78 Atlas Map // /lib/computeTraceOptionsFromSchema.js:73 August // /components/widgets/DateTimePicker.js:77 -Auto // /components/fields/derived.js:515 +Auto // /components/fields/MarkerColor.js:195 Auto margins // /default_panels/StyleAxesPanel.js:157 Average // /default_panels/GraphTransformsPanel.js:40 Average // /components/fields/derived.js:136 @@ -79,7 +80,7 @@ Axis Line Axis to Style // /components/fields/AxesSelector.js:44 Azimuthal Equal Area // /default_panels/GraphSubplotsPanel.js:125 Azimuthal Equidistant // /default_panels/GraphSubplotsPanel.js:127 -B // /components/fields/derived.js:594 +B // /components/fields/derived.js:567 Background // /default_panels/StyleSlidersPanel.js:19 Background Color // /default_panels/StyleAxesPanel.js:336 Backward // /default_panels/StyleAxesPanel.js:373 @@ -104,9 +105,9 @@ Border Width Borders and Background // /default_panels/StyleColorbarsPanel.js:249 Both // /default_panels/StyleTracesPanel.js:582 Bottom // /components/fields/derived.js:99 -Bottom Center // /components/fields/derived.js:508 -Bottom Left // /components/fields/derived.js:507 -Bottom Right // /components/fields/derived.js:509 +Bottom Center // /components/fields/TextPosition.js:91 +Bottom Left // /components/fields/TextPosition.js:90 +Bottom Right // /components/fields/TextPosition.js:92 Boundaries // /default_panels/GraphSubplotsPanel.js:22 Box // /default_panels/StyleTracesPanel.js:598 Box Fill Color // /default_panels/StyleTracesPanel.js:604 @@ -117,14 +118,14 @@ Box Mode Box Padding // /default_panels/StyleTracesPanel.js:253 Box Size and Spacing // /default_panels/StyleTracesPanel.js:245 Box Width // /default_panels/StyleTracesPanel.js:252 -Boxes // /components/fields/derived.js:671 -Boxes and Points // /components/fields/derived.js:673 +Boxes // /components/fields/derived.js:644 +Boxes and Points // /components/fields/derived.js:646 Button // /components/containers/RangeSelectorAccordion.js:38 Button Labels // /default_panels/StyleUpdateMenusPanel.js:21 Buttons // /components/containers/UpdateMenuAccordion.js:22 By // /default_panels/GraphTransformsPanel.js:76 By Type // /components/containers/TraceAccordion.js:166 -C // /components/fields/derived.js:595 +C // /components/fields/derived.js:568 Call out your data. // /components/containers/AnnotationAccordion.js:50 Candlestick // /lib/computeTraceOptionsFromSchema.js:121 Canvas // /components/fields/derived.js:409 @@ -150,7 +151,7 @@ Click on the + button above to add an annotation. Click on the + button above to add an image. // /components/containers/ImageAccordion.js:61 Clockwise // /components/fields/derived.js:105 Close // /default_panels/GraphCreatePanel.js:98 -Closest // /components/fields/derived.js:703 +Closest // /components/fields/derived.js:676 Coastlines // /default_panels/GraphSubplotsPanel.js:160 Collapse All // /components/containers/PanelHeader.js:35 Color // /components/fields/ErrorBars.js:102 @@ -220,11 +221,11 @@ Diagonal Diameter // /default_panels/StyleTracesPanel.js:324 Diffuse // /default_panels/StyleTracesPanel.js:524 Direction // /default_panels/StyleAxesPanel.js:71 -Disable // /components/fields/derived.js:706 +Disable // /components/fields/derived.js:679 Disabled // /default_panels/GraphTransformsPanel.js:73 Display // /default_panels/StyleTracesPanel.js:183 Distributions // /lib/traceTypes.js:17 -Divergence // /components/fields/derived.js:616 +Divergence // /components/fields/derived.js:589 Diverging // /default_panels/StyleLayoutPanel.js:42 Drag // /default_panels/StyleLayoutPanel.js:109 Drop the // /components/widgets/Dropzone.js:46 @@ -268,7 +269,7 @@ Fill Fill Color // /default_panels/GraphCreatePanel.js:130 Fill to // /default_panels/StyleTracesPanel.js:436 Filled Area // /default_panels/StyleTracesPanel.js:435 -Fills // /components/fields/derived.js:686 +Fills // /components/fields/derived.js:659 Filter // /components/containers/TransformAccordion.js:21 Finance // /lib/traceTypes.js:13 First // /default_panels/GraphTransformsPanel.js:47 @@ -316,6 +317,7 @@ Histogram Normalization Hole // /default_panels/GraphSubplotsPanel.js:226 Hole Size // /default_panels/StyleTracesPanel.js:283 Horizontal // /default_panels/GraphCreatePanel.js:63 +Horizontal Alignment // /default_panels/StyleNotesPanel.js:28 Horizontal Boundaries // /default_panels/StyleShapesPanel.js:30 Horizontal Gap // /default_panels/StyleTracesPanel.js:504 Horizontal Gaps // /default_panels/StyleTracesPanel.js:508 @@ -338,7 +340,7 @@ Increasing Trace Styles Individually // /components/containers/TraceAccordion.js:165 Inequality // /components/fields/FilterOperation.js:71 Infer Zero // /default_panels/StyleTracesPanel.js:382 -Inside // /components/fields/derived.js:513 +Inside // /components/fields/TextPosition.js:96 Intensity // /default_panels/GraphCreatePanel.js:147 Interactions // /default_panels/StyleLayoutPanel.js:108 Interpolate // /default_panels/StyleTracesPanel.js:383 @@ -350,11 +352,11 @@ Jitter July // /components/widgets/DateTimePicker.js:76 June // /components/widgets/DateTimePicker.js:75 K (Optional) // /default_panels/GraphCreatePanel.js:94 -KDE // /components/fields/derived.js:679 +KDE // /components/fields/derived.js:652 Kavrayskiy 7 // /default_panels/GraphSubplotsPanel.js:123 LaTeX // /components/widgets/text_editors/MultiFormat.js:24 LaTeX is a math typesetting language that doesn't work with rich text. // /components/widgets/text_editors/MultiFormat.js:105 -Label // /components/fields/derived.js:528 +Label // /components/fields/derived.js:501 Label Format // /default_panels/StyleAxesPanel.js:186 Label Prefix // /default_panels/StyleColorbarsPanel.js:158 Label Suffix // /default_panels/StyleColorbarsPanel.js:184 @@ -365,7 +367,7 @@ Lasso Last // /default_panels/GraphTransformsPanel.js:48 Last label // /default_panels/StyleAxesPanel.js:242 Lat/Lon // /components/fields/LocationSelector.js:99 -Latitude // /components/fields/derived.js:587 +Latitude // /components/fields/derived.js:560 Left // /components/fields/derived.js:94 Legend // /default_panels/StyleLegendPanel.js:16 Legend Box // /default_panels/StyleLegendPanel.js:26 @@ -378,17 +380,17 @@ Light Position Lighting // /default_panels/StyleTracesPanel.js:522 Line // /default_panels/StyleShapesPanel.js:24 Line Color // /default_panels/StyleTracesPanel.js:539 -Line Width // /default_panels/StyleNotesPanel.js:33 +Line Width // /default_panels/StyleNotesPanel.js:54 Linear // /default_panels/StyleAxesPanel.js:48 Lines // /default_panels/StyleAxesPanel.js:81 Lines, Rectangles and Ellipses. // /components/containers/ShapeAccordion.js:55 Loading... // /components/widgets/Dropzone.js:110 -Location // /components/fields/derived.js:582 +Location // /components/fields/derived.js:555 Location Format // /components/fields/LocationSelector.js:27 Locations // /components/fields/LocationSelector.js:25 Log // /default_panels/StyleAxesPanel.js:49 Logos, watermarks and more. // /components/containers/ImageAccordion.js:55 -Longitude // /components/fields/derived.js:587 +Longitude // /components/fields/derived.js:560 Looks like there aren't any traces defined yet. // /components/containers/TraceRequiredPanel.js:22 Low // /default_panels/GraphCreatePanel.js:97 Lower < Target < Upper // /components/fields/FilterOperation.js:19 @@ -429,9 +431,9 @@ Menus Mercator // /default_panels/GraphSubplotsPanel.js:116 Meta Text // /default_panels/StyleLayoutPanel.js:170 Middle // /default_panels/StyleAxesPanel.js:410 -Middle Center // /components/fields/derived.js:505 -Middle Left // /components/fields/derived.js:504 -Middle Right // /components/fields/derived.js:506 +Middle Center // /components/fields/TextPosition.js:88 +Middle Left // /components/fields/TextPosition.js:87 +Middle Right // /components/fields/TextPosition.js:89 Miller // /default_panels/GraphSubplotsPanel.js:122 Milliseconds // /components/fields/AxisInterval.js:167 Min // /components/fields/MarkerColor.js:199 @@ -458,7 +460,7 @@ No No Results // /components/widgets/Dropdown.js:76 None // /components/fields/derived.js:62 None label // /default_panels/StyleColorbarsPanel.js:179 -Norm // /components/fields/derived.js:615 +Norm // /components/fields/derived.js:588 Normal // /components/fields/MarkerColor.js:185 Normalization // /default_panels/StyleTracesPanel.js:216 North America // /default_panels/GraphSubplotsPanel.js:105 @@ -466,7 +468,7 @@ Note Text Note: X and Y Values are used for binning. If Z values are provided, they are used as inputs to the histogram function which you can configure in the // /default_panels/GraphCreatePanel.js:85 Note: in horizontal orientation, Y values are used for binning. If X values are provided, they are used as inputs to the histogram function which you can configure in the // /default_panels/GraphCreatePanel.js:76 Note: in vertical orientation, X values are used for binning. If Y values are provided, they are used as inputs to the histogram function which you can configure in the // /default_panels/GraphCreatePanel.js:67 -Note: item count starts at 0. // /default_panels/StyleLayoutPanel.js:189 +Note: item count starts at 0. // /default_panels/StyleLayoutPanel.js:192 November // /components/widgets/DateTimePicker.js:80 Number format // /default_panels/StyleLayoutPanel.js:60 Number of Contours // /default_panels/StyleTracesPanel.js:366 @@ -487,14 +489,14 @@ Orientation Orthographic // /default_panels/GraphSubplotsPanel.js:117 Outdoors // /default_panels/GraphSubplotsPanel.js:78 Outliers // /default_panels/StyleTracesPanel.js:288 -Outside // /components/fields/derived.js:514 +Outside // /components/fields/TextPosition.js:97 Overlaid // /default_panels/StyleTracesPanel.js:211 Overlay // /default_panels/GraphSubplotsPanel.js:67 Padding // /default_panels/StyleColorbarsPanel.js:113 Pan // /default_panels/StyleLayoutPanel.js:116 Parallel Categories // /lib/traceTypes.js:215 Parallel Coordinates // /lib/computeTraceOptionsFromSchema.js:93 -Percent // /components/fields/derived.js:603 +Percent // /components/fields/derived.js:576 Pie // /components/containers/SubplotAccordion.js:132 Pie Colors // /default_panels/StyleTracesPanel.js:81 Pie Segments // /components/containers/TraceMarkerSection.js:21 @@ -505,7 +507,7 @@ Plot Background Point Cloud // /lib/computeTraceOptionsFromSchema.js:85 Point Opacity // /default_panels/StyleTracesPanel.js:313 Points // /components/containers/TraceMarkerSection.js:23 -Points and Fills // /components/fields/derived.js:687 +Points and Fills // /components/fields/derived.js:660 Polar // /lib/constants.js:106 Polar Bar // /lib/computeTraceOptionsFromSchema.js:133 Polar Scatter // /lib/computeTraceOptionsFromSchema.js:125 @@ -517,13 +519,13 @@ Position on Positive // /default_panels/StyleTracesPanel.js:583 Positive/Negative Stacked // /default_panels/StyleTracesPanel.js:209 Prefix // /default_panels/StyleAxesPanel.js:222 -Previous X // /components/fields/derived.js:639 -Previous Y // /components/fields/derived.js:638 +Previous X // /components/fields/derived.js:612 +Previous Y // /components/fields/derived.js:611 Probability // /default_panels/StyleTracesPanel.js:116 Probability Density // /default_panels/StyleTracesPanel.js:118 Projection // /default_panels/GraphSubplotsPanel.js:111 Pull // /default_panels/StyleTracesPanel.js:284 -R // /components/fields/derived.js:598 +R // /components/fields/derived.js:571 RMS // /default_panels/GraphTransformsPanel.js:43 Radians // /default_panels/GraphCreatePanel.js:117 Radius // /default_panels/GraphCreatePanel.js:112 @@ -641,18 +643,20 @@ Target > Reference Target ≠ Reference // /components/fields/FilterOperation.js:10 Target ≤ Reference // /components/fields/FilterOperation.js:12 Target ≥ Reference // /components/fields/FilterOperation.js:15 -Template // /components/fields/derived.js:547 +Template // /components/fields/derived.js:520 Ternary // /default_panels/GraphSubplotsPanel.js:219 Ternary Scatter // /lib/computeTraceOptionsFromSchema.js:45 -Text // /components/fields/derived.js:534 +Text // /components/fields/derived.js:507 Text Alignment // /default_panels/StyleLegendPanel.js:59 Text Attributes // /default_panels/StyleTracesPanel.js:439 Text Position // /default_panels/StyleTracesPanel.js:460 -Theta // /components/fields/derived.js:598 +Theta // /components/fields/derived.js:571 Theta Unit // /default_panels/GraphCreatePanel.js:115 Thickness // /components/fields/ErrorBars.js:103 This input has multiple values associated with it. Changing this setting will override these custom inputs. // /lib/constants.js:20 This panel could not be displayed due to an error. // /components/containers/PlotlyPanel.js:15 +This will position all text values on the plot according to the selected position. // /components/fields/TextPosition.js:29 +This will position text values individually, according to the provided data positions array. // /components/fields/TextPosition.js:39 Tick Labels // /default_panels/StyleAxesPanel.js:147 Tick Markers // /default_panels/StyleAxesPanel.js:283 Tick Spacing // /default_panels/StyleAxesPanel.js:272 @@ -664,17 +668,17 @@ Tip Title // /default_panels/StyleColorbarsPanel.js:37 Titles // /default_panels/StyleAxesPanel.js:32 To Date // /default_panels/StyleAxesPanel.js:372 -To Next // /components/fields/derived.js:650 -To Self // /components/fields/derived.js:649 +To Next // /components/fields/derived.js:623 +To Self // /components/fields/derived.js:622 To upload multiple files, create multiple files and upload them individually. // /components/widgets/Dropzone.js:103 Top // /components/fields/derived.js:99 -Top Center // /components/fields/derived.js:502 -Top Left // /components/fields/derived.js:501 -Top Right // /components/fields/derived.js:503 +Top Center // /components/fields/TextPosition.js:85 +Top Left // /components/fields/TextPosition.js:84 +Top Right // /components/fields/TextPosition.js:86 Trace // /components/containers/TraceAccordion.js:138 Trace Opacity // /default_panels/StyleTracesPanel.js:50 Trace Order // /default_panels/StyleLegendPanel.js:75 -Trace name // /components/fields/derived.js:624 +Trace name // /components/fields/derived.js:597 Trace your data. // /components/containers/TraceAccordion.js:118 Traces // /components/containers/TraceRequiredPanel.js:25 Traces of various types like bar and line are the building blocks of your figure. // /components/containers/TraceAccordion.js:120 @@ -688,20 +692,21 @@ Try again with a supported file format: Turntable // /default_panels/StyleLayoutPanel.js:119 Type // /default_panels/GraphCreatePanel.js:29 Typeface // /default_panels/StyleAxesPanel.js:36 -U // /components/fields/derived.js:612 +U // /components/fields/derived.js:585 URL // /components/widgets/text_editors/RichText/LinkEditor.js:90 USA // /default_panels/GraphSubplotsPanel.js:101 USA State Abbreviations (e.g. NY) // /components/fields/LocationSelector.js:34 Unsorted // /default_panels/StyleTracesPanel.js:272 Upper Bound // /components/fields/FilterOperation.js:187 -V // /components/fields/derived.js:613 -Value // /components/fields/derived.js:529 +V // /components/fields/derived.js:586 +Value // /components/fields/derived.js:502 Value (-) // /components/fields/ErrorBars.js:143 -Values // /components/fields/derived.js:546 +Values // /components/fields/derived.js:519 Variable // /components/fields/MarkerColor.js:156 Vertex Normal // /default_panels/StyleTracesPanel.js:528 Vertexcolor // /default_panels/GraphCreatePanel.js:149 Vertical // /default_panels/GraphCreatePanel.js:63 +Vertical Alignment // /default_panels/StyleNotesPanel.js:38 Vertical Boundaries // /default_panels/StyleShapesPanel.js:36 Vertical Gap // /default_panels/StyleTracesPanel.js:505 Vertical Gaps // /default_panels/StyleTracesPanel.js:509 @@ -712,40 +717,40 @@ Violin Mode Violin Padding // /default_panels/StyleTracesPanel.js:264 Violin Size and Spacing // /default_panels/StyleTracesPanel.js:256 Violin Width // /default_panels/StyleTracesPanel.js:263 -Violins // /components/fields/derived.js:677 -Violins and Points // /components/fields/derived.js:680 -Violins, Points and KDE // /components/fields/derived.js:681 +Violins // /components/fields/derived.js:650 +Violins and Points // /components/fields/derived.js:653 +Violins, Points and KDE // /components/fields/derived.js:654 Visible Sides // /default_panels/StyleTracesPanel.js:580 -W // /components/fields/derived.js:614 +W // /components/fields/derived.js:587 WebGL // /components/fields/TraceSelector.js:101 Well this is embarrassing. // /components/containers/PlotlyPanel.js:14 Whisker Width // /default_panels/StyleTracesPanel.js:267 Width // /default_panels/GraphCreatePanel.js:142 Winkel Tripel // /default_panels/GraphSubplotsPanel.js:120 World // /default_panels/GraphSubplotsPanel.js:100 -X // /components/fields/derived.js:565 -X = 0 // /components/fields/derived.js:637 +X // /components/fields/derived.js:538 +X = 0 // /components/fields/derived.js:610 X Anchor // /default_panels/GraphSubplotsPanel.js:30 -X Axis // /components/fields/derived.js:704 +X Axis // /components/fields/derived.js:677 X Bin End // /default_panels/StyleTracesPanel.js:231 X Bin Size // /default_panels/StyleTracesPanel.js:233 X Bin Start // /default_panels/StyleTracesPanel.js:230 -X Offset // /default_panels/StyleNotesPanel.js:37 +X Offset // /default_panels/StyleNotesPanel.js:58 X Overlay // /default_panels/GraphSubplotsPanel.js:23 X Values // /default_panels/GraphCreatePanel.js:38 -X Vector // /default_panels/StyleNotesPanel.js:39 +X Vector // /default_panels/StyleNotesPanel.js:60 X start // /default_panels/GraphCreatePanel.js:105 -Y // /components/fields/derived.js:565 -Y = 0 // /components/fields/derived.js:636 +Y // /components/fields/derived.js:538 +Y = 0 // /components/fields/derived.js:609 Y Anchor // /default_panels/GraphSubplotsPanel.js:34 -Y Axis // /components/fields/derived.js:705 +Y Axis // /components/fields/derived.js:678 Y Bin End // /default_panels/StyleTracesPanel.js:236 Y Bin Size // /default_panels/StyleTracesPanel.js:238 Y Bin Start // /default_panels/StyleTracesPanel.js:235 -Y Offset // /default_panels/StyleNotesPanel.js:38 +Y Offset // /default_panels/StyleNotesPanel.js:59 Y Overlay // /default_panels/GraphSubplotsPanel.js:24 Y Values // /default_panels/GraphCreatePanel.js:46 -Y Vector // /default_panels/StyleNotesPanel.js:40 +Y Vector // /default_panels/StyleNotesPanel.js:61 Y start // /default_panels/GraphCreatePanel.js:106 Year // /default_panels/StyleAxesPanel.js:358 Years // /components/fields/AxisInterval.js:162 @@ -758,7 +763,7 @@ You can refer to the items in this column in any text fields of the editor like You can style and position your axes in the // /components/fields/AxesCreator.js:153 You can style and position your subplots in the // /components/fields/SubplotCreator.js:134 You need to provide a component for the modal to open! // /components/containers/ModalProvider.js:33 -Z // /components/fields/derived.js:580 +Z // /components/fields/derived.js:553 Z Values // /default_panels/GraphCreatePanel.js:55 Z start // /default_panels/GraphCreatePanel.js:107 Zero Line // /default_panels/StyleAxesPanel.js:129 diff --git a/src/components/fields/TextPosition.js b/src/components/fields/TextPosition.js new file mode 100644 index 000000000..66507ff4e --- /dev/null +++ b/src/components/fields/TextPosition.js @@ -0,0 +1,105 @@ +import Dropdown from './Dropdown'; +import RadioBlocks from '../widgets/RadioBlocks'; +import Field from './Field'; +import PropTypes from 'prop-types'; +import React, {Component, Fragment} from 'react'; +import {connectToContainer} from 'lib'; +import Info from './Info'; +import DataSelector from './DataSelector'; + +export class UnconnectedTextPosition extends Component { + constructor(props) { + super(props); + this.state = { + posType: typeof props.fullValue === 'string' ? 'simple' : 'custom', + }; + } + + render() { + const _ = this.context.localize; + const radioOptions = [ + {label: _('All'), value: 'simple'}, + {label: _('Custom'), value: 'custom'}, + ]; + const control = + this.state.posType === 'simple' ? ( + + + {_( + 'This will position all text values on the plot according to the selected position.' + )} + + + + ) : ( + + +
+ {_( + 'This will position text values individually, according to the provided data positions array. ' + )} +
+
+ + +
{_('("Top", "Middle", "Bottom") + ("Left", "Center", "Right")')}
+
+
+ ); + + return ( + + { + this.setState({posType: value}); + if (value === 'simple') { + this.props.updatePlot('middle center'); + } else { + this.props.updateContainer({textpositionsrc: null}); + } + }} + /> + {control} + + ); + } +} + +UnconnectedTextPosition.propTypes = { + ...Field.propTypes, + options: PropTypes.array, + fullValue: PropTypes.oneOfType([PropTypes.array, PropTypes.string]), +}; + +UnconnectedTextPosition.contextTypes = { + localize: PropTypes.func, +}; + +export default connectToContainer(UnconnectedTextPosition, { + modifyPlotProps: (props, context, plotProps) => { + const {localize: _} = context; + let options = [ + {label: _('Top Left'), value: 'top left'}, + {label: _('Top Center'), value: 'top center'}, + {label: _('Top Right'), value: 'top right'}, + {label: _('Middle Left'), value: 'middle left'}, + {label: _('Middle Center'), value: 'middle center'}, + {label: _('Middle Right'), value: 'middle right'}, + {label: _('Bottom Left'), value: 'bottom left'}, + {label: _('Bottom Center'), value: 'bottom center'}, + {label: _('Bottom Right'), value: 'bottom right'}, + ]; + if (context.container.type === 'pie' || context.container.type === 'bar') { + options = [ + {label: _('Inside'), value: 'inside'}, + {label: _('Outside'), value: 'outside'}, + {label: _('Auto'), value: 'auto'}, + {label: _('None'), value: 'none'}, + ]; + } + plotProps.options = options; + plotProps.clearable = false; + }, +}); diff --git a/src/components/fields/derived.js b/src/components/fields/derived.js index 451083a37..73bff7f37 100644 --- a/src/components/fields/derived.js +++ b/src/components/fields/derived.js @@ -494,33 +494,6 @@ function computeAxesRefOptions(axes, propsAttr) { return options; } -export const TextPosition = connectToContainer(UnconnectedDropdown, { - modifyPlotProps: (props, context, plotProps) => { - const {localize: _} = context; - let options = [ - {label: _('Top Left'), value: 'top left'}, - {label: _('Top Center'), value: 'top center'}, - {label: _('Top Right'), value: 'top right'}, - {label: _('Middle Left'), value: 'middle left'}, - {label: _('Middle Center'), value: 'middle center'}, - {label: _('Middle Right'), value: 'middle right'}, - {label: _('Bottom Left'), value: 'bottom left'}, - {label: _('Bottom Center'), value: 'bottom center'}, - {label: _('Bottom Right'), value: 'bottom right'}, - ]; - if (context.container.type === 'pie' || context.container.type === 'bar') { - options = [ - {label: _('Inside'), value: 'inside'}, - {label: _('Outside'), value: 'outside'}, - {label: _('Auto'), value: 'auto'}, - {label: _('None'), value: 'none'}, - ]; - } - plotProps.options = options; - plotProps.clearable = false; - }, -}); - export const TextInfo = connectToContainer(UnconnectedFlaglist, { modifyPlotProps: (props, context, plotProps) => { const {localize: _, container} = context; diff --git a/src/components/fields/index.js b/src/components/fields/index.js index 35ca099ed..10a53211d 100644 --- a/src/components/fields/index.js +++ b/src/components/fields/index.js @@ -34,6 +34,7 @@ import RectanglePositioner from './RectanglePositioner'; import LocationSelector from './LocationSelector'; import AxisInterval from './AxisInterval'; import DateTimePicker from './DateTimePicker'; +import TextPosition from './TextPosition'; import { AnnotationArrowRef, @@ -57,7 +58,6 @@ import { TraceOrientation, AxisOverlayDropdown, AxisSide, - TextPosition, ShowInLegend, HoveronDropdown, HovermodeDropdown, diff --git a/src/default_panels/StyleAxesPanel.js b/src/default_panels/StyleAxesPanel.js index 9e13ce75d..2912545c9 100644 --- a/src/default_panels/StyleAxesPanel.js +++ b/src/default_panels/StyleAxesPanel.js @@ -198,7 +198,7 @@ class StyleAxesPanel extends Component { attr="exponentformat" clearable={false} options={[ - {label: _('None'), value: '000'}, + {label: _('None'), value: 'none'}, {label: _('e+6'), value: 'e'}, {label: _('E+6'), value: 'E'}, {label: _('x10^6'), value: 'power'}, diff --git a/src/default_panels/StyleLayoutPanel.js b/src/default_panels/StyleLayoutPanel.js index ce17edc63..0f4283027 100644 --- a/src/default_panels/StyleLayoutPanel.js +++ b/src/default_panels/StyleLayoutPanel.js @@ -174,17 +174,20 @@ const StyleLayoutPanel = (props, {localize: _}) => ( {_( 'You can refer to the items in this column in any text fields of the editor like so: ' )} - - {'%{meta[0]}'} - - {' .'} +
+ + {'%{meta[0]}'} + + {' .'} +

{_('Note: item count starts at 0.')} diff --git a/src/default_panels/StyleNotesPanel.js b/src/default_panels/StyleNotesPanel.js index 2300ae056..c2f6faf6e 100644 --- a/src/default_panels/StyleNotesPanel.js +++ b/src/default_panels/StyleNotesPanel.js @@ -24,7 +24,28 @@ const StyleNotesPanel = (props, {localize: _}) => ( + + + { it('does not search into data arrays', () => { @@ -65,4 +66,13 @@ describe('dereference', () => { expect(container[0].z[2][0]).toBe(3); expect(container[0].z[2][1]).toBe(2); }); + + // TO DO: dereference all of layout + it('can dereference top level layout keys', () => { + const container = {metasrc: 'x1', xaxis: {ticktext: 'x2'}}; + dereference(container, {x1: ['yes!'], x2: ['some', 'text']}); + + expect(Array.isArray(container.meta)).toBe(true); + expect(container.meta[0]).toBe('yes!'); + }); }); diff --git a/src/lib/dereference.js b/src/lib/dereference.js index 90618eeef..4232ac8a3 100644 --- a/src/lib/dereference.js +++ b/src/lib/dereference.js @@ -10,7 +10,6 @@ export default function dereference(container, dataSources, config = {deleteKeys } const dataKey = key.replace(SRC_ATTR_PATTERN, ''); - const traceType = parent.type; let srcRef = config.toSrc ? config.toSrc(parent[key]) : parent[key]; @@ -19,7 +18,7 @@ export default function dereference(container, dataSources, config = {deleteKeys srcRef = [srcRef]; } - let data = srcRef.map(ref => { + let dereferencedData = srcRef.map(ref => { if (config.deleteKeys && !(ref in dataSources)) { delete parent[dataKey]; } @@ -28,18 +27,29 @@ export default function dereference(container, dataSources, config = {deleteKeys // remove extra data wrapping if (srcRef.length === 1) { - data = data[0]; + dereferencedData = dereferencedData[0]; } - if (!Array.isArray(data)) { + if (!Array.isArray(dereferencedData)) { return; } - parent[dataKey] = maybeTransposeData(data, srcPath, traceType); + if (Array.isArray(container)) { + // Case where we were originally given data to dereference + const traceType = parent.type; + parent[dataKey] = maybeTransposeData(dereferencedData, srcPath, traceType); + } else { + // This means we're dereferencing layout + parent[dataKey] = dereferencedData; + } }; - walkObject(container, replacer, { - walkArraysMatchingKeys: ['data', 'transforms'], - pathType: 'nestedProperty', - }); + if (Array.isArray(container)) { + walkObject(container, replacer, { + walkArraysMatchingKeys: ['data', 'transforms'], + pathType: 'nestedProperty', + }); + } else { + walkObject(container, replacer, {pathType: 'nestedProperty'}); + } }