From e4f2d828b883bfefff4c9def97cc7dec97fec5a6 Mon Sep 17 00:00:00 2001 From: archmoj Date: Fri, 7 Dec 2018 13:58:19 -0500 Subject: [PATCH] revert log.txt --- log.txt | 4458 ------------------------------------------------------- 1 file changed, 4458 deletions(-) delete mode 100644 log.txt diff --git a/log.txt b/log.txt deleted file mode 100644 index eb53024fec4..00000000000 --- a/log.txt +++ /dev/null @@ -1,4458 +0,0 @@ - -> plotly.js@1.42.5 test-jasmine /home/mojtaba/plotly/webgl/plotly.js -> karma start test/jasmine/karma.conf.js - -07 12 2018 11:21:13.132:INFO [framework.browserify]: registering rebuild (autoWatch=true) -07 12 2018 11:21:25.674:INFO [framework.browserify]: 43534829 bytes written (11.54 seconds) -07 12 2018 11:21:26.183:INFO [framework.browserify]: bundle built -07 12 2018 11:21:26.293:WARN [karma]: No captured browser, open http://localhost:9876/ -07 12 2018 11:21:26.298:INFO [karma-server]: Karma v3.1.1 server started at http://0.0.0.0:9876/ -07 12 2018 11:21:26.298:INFO [launcher]: Launching browsers _Chrome with concurrency unlimited -07 12 2018 11:21:26.308:INFO [launcher]: Starting browser Chrome -07 12 2018 11:21:27.125:INFO [Chrome 70.0.3538 (Linux 0.0.0)]: Connected on socket GQW7jP2GsCVZc2yGAAAA with id 83988083 -07 12 2018 11:21:27.136:WARN [middleware:karma]: Invalid file type, defaulting to js. browserify -07 12 2018 11:21:27.137:WARN [middleware:karma]: Invalid file type, defaulting to js. json -. - Test gl3d plots - - @noCI @gl should display correct hover labels and emit correct event data (scatter3d case) - - @noCI @gl should display correct hover labels and emit correct event data (surface case) - - @noCI @gl should emit correct event data on click (scatter3d case) - - @gl should display correct hover labels (mesh3d case) - - @gl should set the camera dragmode to orbit if the camera.up.z vector is set to be tilted - - @gl should set the camera dragmode to turntable if the camera.up.z vector is set to be upwards - - @gl should set the camera dragmode to turntable if the camera.up is not set - - @gl should set the camera dragmode to turntable if any of camera.up.[x|y|z] is missing - - @gl should set the camera dragmode to turntable if all camera.up.[x|y|z] are zero or missing - - @gl should be able to reversibly change trace type - - @gl should be able to delete the last trace - - @gl should be able to toggle visibility - - @gl should avoid passing blank texts to webgl - - @gl should avoid passing empty lines to webgl - - @gl should only accept texts for textposition otherwise textposition is set to middle center before passing to webgl - - @gl axis ticks should not be set when axis _length is NaN - - Plots.supplyAnimationDefaults - - supplies transition defaults - - uses provided values - - Test animate API - - throws an error on addFrames if gd is not a graph - - throws an error on animate if gd is not a graph - With duration = 0 - - animates to a frame - - rejects if a frame is not found - - treats objects as frames - - treats a list of objects as frames - - animates all frames if list is null - - animates all frames if list is undefined - - animates to a single frame - - animates to an empty list - - animates to a list of frames - - animates frames by group - - animates frames in the correct order - - accepts a single animationOpts - - accepts an array of animationOpts - - falls back to animationOpts[0] if not enough supplied in array - - chains animations as promises - - emits plotly_animated before the promise is resolved - - emits plotly_animated as each animation in a sequence completes - - resolves at the end of each animation sequence - With duration = 30 - - animates to a frame - - rejects if a frame is not found - - treats objects as frames - - treats a list of objects as frames - - animates all frames if list is null - - animates all frames if list is undefined - - animates to a single frame - - animates to an empty list - - animates to a list of frames - - animates frames by group - - animates frames in the correct order - - accepts a single animationOpts - - accepts an array of animationOpts - - falls back to animationOpts[0] if not enough supplied in array - - chains animations as promises - - emits plotly_animated before the promise is resolved - - emits plotly_animated as each animation in a sequence completes - - resolves at the end of each animation sequence - Animation direction - - animates frames by name in reverse - - animates a group in reverse - Animation fromcurrent - - animates starting at the current frame - - plays from the start when current frame = last frame - - animates in reverse starting at the current frame - - plays in reverse from the end when current frame = first frame - Calling Plotly.animate synchronously in series - - emits plotly_animationinterrupted when an animation is interrupted - - queues successive animations - - an empty list with immediate dumps previous frames - - animates groups in the correct order - - drops queued frames when immediate = true - - animates frames and groups in sequence - - rejects when an animation is interrupted - frame events - - emits an event when a frame is transitioned to - frame vs. transition timing - - limits the transition duration to <= frame duration - - limits the transition duration to <= frame duration (matching per-config) - - Animate API details - - redraws after a layout animation - - forces a relayout after layout animations - - triggers plotly_animated after a single layout animation - - triggers plotly_animated after a multi-step layout animation - - does not fail if strings are not used - - ignores null and undefined frames - - null frames should not break everything - - Animating multiple axes - - @flaky updates ranges of secondary axes - - non-animatable fallback - - falls back to a simple update for bar graphs - - animating scatter traces - - animates trace opacity - - computes calcdata correctly when transforms are present - - should animate axis ranges using the less number of steps - - Test annotations - supplyLayoutDefaults - - should skip non-array containers - - should make non-object item visible: false - - should default to pixel for axref/ayref - - should convert ax/ay date coordinates to date string if tail is in milliseconds and axis is a date - - should clean *xclick* and *yclick* values - - should default to end for arrowside - - annotations relayout - - should be able to add /remove annotations - - should sort correctly when index>10 - - should be able update annotations - - can update several annotations and add and delete in one call - - warns on ambiguous combinations and invalid values: {"annotations":[{"text":"a"}],"annotations[0]":{"text":"b"}} - - warns on ambiguous combinations and invalid values: {"annotations":null,"annotations[0]":{"text":"b"}} - - warns on ambiguous combinations and invalid values: {"annotations":[{"text":"a"}],"annotations[0]":null} - - warns on ambiguous combinations and invalid values: {"annotations":[{"text":"a"}],"annotations[0].text":"b"} - - warns on ambiguous combinations and invalid values: {"annotations[0]":{"text":"a"},"annotations[0].text":"b"} - - warns on ambiguous combinations and invalid values: {"annotations[0]":null,"annotations[0].text":"b"} - - warns on ambiguous combinations and invalid values: {"annotations":{"text":"a"}} - - warns on ambiguous combinations and invalid values: {"annotations[0]":"not an object"} - - warns on ambiguous combinations and invalid values: {"annotations[100]":{"text":"bad index"}} - - handles xref/yref changes with or without x/y changes - - annotations log/linear axis changes - - doesnt try to update position automatically with ref changes - - keeps the same data value if the axis type is changed without position - - annotations autorange - - should adapt to relayout calls - - catches bad xref/yref - - should propagate axis autorange changes when axis ranges are set - - annotation clicktoshow - - should select only clicktoshow annotations matching x, y, and axes of any point - - works on date and log axes - - works on category axes - - annotation effects - - respects anchor: auto when paper-referenced without arrow - - also works paper-referenced with explicit anchors and no arrow - - works paper-referenced with arrows - - works data-referenced with no arrow - - works data-referenced with arrow - - works date string data-referenced with no arrow - - works date sting data-referenced with arrow - - should only make the clippaths it needs and delete others - - should register clicks and show hover effects on the text box only - - does not collect right-click or ctrl-click - - makes the whole text box a link if the link is the whole text - - animating annotations - - updates annotations when no axis update present - - Test axes - swap - - should swap most attributes and fix placeholder titles - - should not swap noSwapAttrs - - should swap shared attributes, combine linear/log, and move annotations - supplyLayoutDefaults - autotype - - treats booleans as categories - - sees a single "None" or "" as a category - - lets a single number beat up to two distinct categories - - turns back to category with >2 per distinct number - - works with world calendars - - requires >twice as many distinct dates as numbers - - counts ambiguous dates as both dates and numbers - - should set undefined linewidth/linecolor if linewidth, linecolor or showline is not supplied - - should set default linewidth and linecolor if showline is true - - should set linewidth to default if linecolor is supplied and valid - - should set linecolor to default if linewidth is supplied and valid - - should set default gridwidth and gridcolor - - should set gridcolor/gridwidth to undefined if showgrid is false - - should set default zerolinecolor/zerolinewidth - - should set zerolinecolor/zerolinewidth to undefined if zeroline is false - - should use 'axis.color' as default for 'axis.title.font.color' - - should use 'axis.color' as default for 'axis.linecolor' - - should use 'axis.color' as default for 'axis.zerolinecolor' - - should use combo of 'axis.color', bgcolor and lightFraction as default for 'axis.gridcolor' - - should inherit calendar from the layout - - should allow its own calendar - - should set autorange to true when input range is invalid - - should set autorange to false when input range is valid - - only allows rangemode with linear axes - - finds scaling groups and calculates relative scales - - breaks scaleanchor loops and drops conflicting ratios - - silently drops invalid scaleanchor values - - will not link axes of different types - - drops scaleanchor settings if either the axis or target has fixedrange - - should coerce hoverformat even on visible: false axes - constraints relayout - - updates ranges when adding, removing, or changing a constraint - - can change per-axis constrain:domain/range and constraintoward - - autoranges consistently with padding - - can constrain date axes - - can constrain category axes - - can constrain log axes - categoryorder - setting, or not setting categoryorder if it is not explicitly declared - - should set categoryorder to default if categoryorder and categoryarray are not supplied - - should set categoryorder to default even if type is not set to category explicitly - - should NOT set categoryorder to default if type is not category - - should set categoryorder to default if type is overridden to be category - setting categoryorder to "array" - - should leave categoryorder on "array" if it is supplied - - should switch categoryorder on "array" if it is not supplied but categoryarray is supplied - - should revert categoryorder to "trace" if "array" is supplied but there is no list - do not set categoryorder to "array" if list exists but empty - - should switch categoryorder to default if list is not supplied - - should not switch categoryorder on "array" if categoryarray is supplied but empty - do NOT set categoryorder to "array" if it has some other proper value - - should use specified categoryorder if it is supplied even if categoryarray exists - - should use specified categoryorder if it is supplied even if categoryarray exists - - should use specified categoryorder if it is supplied even if categoryarray exists - setting categoryorder to the default if the value is unexpected - - should switch categoryorder to "trace" if mode is supplied but invalid - - should switch categoryorder to "array" if mode is supplied but invalid and list is supplied - handleTickDefaults - - should set defaults on bad inputs - - should use valid inputs - - should conditionally coerce based on showticklabels - handleTickValueDefaults - - should set default tickmode correctly - - should set nticks iff tickmode=auto - - should set tick0 and dtick iff tickmode=linear - - should handle tick0 and dtick for date axes - - should handle tick0 and dtick for log axes - - should set tickvals and ticktext iff tickmode=array - saveRangeInitial - - should save range when autosize turned off and rangeInitial isn't defined - - should not overwrite saved range if rangeInitial is defined - - should save range when overwrite option is on and range has changed - list - - returns empty array when no fullLayout is present - - returns array of axes in fullLayout - - returns array of axes, including the ones in scenes - - returns array of axes, excluding the ones in scenes with only2d option - - returns array of axes, of particular ax letter with axLetter option - getSubplots - - returns only what was prepopulated in fullLayout._subplots - - returns list of subplots ids of particular axis with ax option - getAutoRange - - returns reasonable range without explicit rangemode or autorange - - reverses axes - - expands empty range - - returns a lower bound of 0 on rangemode tozero with positive points - - returns an upper bound of 0 on rangemode tozero with negative points - - returns a positive and negative range on rangemode tozero with positive and negative points - - reverses range after applying rangemode tozero - - expands empty positive range to include 0 with rangemode tozero - - expands empty negative range to something including 0 with rangemode tozero - - pads an empty range, but not past center, with rangemode tozero - - shows the data even if it cannot show the padding - - never returns a negative range when rangemode nonnegative is set with positive and negative points - - never returns a negative range when rangemode nonnegative is set with only negative points - - never returns a negative range when rangemode nonnegative is set with only nonpositive points - - expands empty range to something nonnegative with rangemode nonnegative - findExtremes - - constructs simple ax._min and ._max correctly - - calls ax.setScale if necessary - - handles symmetric pads as numbers - - handles symmetric pads as number arrays - - handles separate pads as numbers - - handles separate pads as number arrays - - overrides symmetric pads with separate pads - - adds 5% padding if specified by flag - - has lower bound zero with all positive data if tozero is sset - - has upper bound zero with all negative data if tozero is set - - sets neither bound to zero with positive and negative data if tozero is set - - overrides padded with tozero - - should fail if no data is given - - should return even if `autorange` is false - calcTicks and tickText - - reverts to "power" for SI/B exponentformat beyond the prefix range (linear case) - - reverts to "power" for SI/B exponentformat beyond the prefix range (log case) - - supports e/E format on log axes - - provides a new date suffix whenever the suffix changes - - should give dates extra precision if tick0 is weird - - should never give dates more than 100 microsecond precision - - never gives date dtick < 100 microseconds (autotick case) - - never gives date dtick < 100 microseconds (explicit tick case) - - should handle edge cases with dates and tickvals - - should handle tickvals edge cases with linear and log axes - - should handle tickvals edge cases with category axes - - notices when all categories are off the edge - - should always start at year for date axis hover - - avoids infinite loops due to rounding errors - - truncates at the greater of 1001 ticks or one per pixel - - never hides the exponent when in hover mode - autoBin - - should auto bin categories - - should not error out for categories on linear axis - - should not error out for categories on log axis - - should not error out for categories on date axis - - should auto bin linear data - - should auto bin linear data with nbins constraint - makeCalcdata - should convert items - - - linear case - - - date case - - - category case - should fill item to other coordinate length if not present - - - base case - - - x0/dx case - - - other length case - should subarray typed arrays - - - same length linear case - - - same length log case - - - subarray case - should convert typed arrays to plain array - - - on a category axis - - - on a date axis - automargin - - should grow and shrink margins - zeroline visibility logic - - works with a single subplot - - works with multiple coupled subplots - - works with multiple overlaid subplots - *tickson*: - - should respond to relayout - - should rotate labels to avoid overlaps - - Test Axes.getTickformat - - get proper tickformatstop for linear axis - - get proper tickformatstop for date axis - - get proper tickformatstop for log axis - - Test tickformatstops: - - handles zooming-in until milliseconds zoom level - - handles zooming-out until years zoom level - - responds to hover - - doesn't fail on bad input - - Bar.supplyDefaults - - should set visible to false when x and y are empty - - should set visible to false when x or y is empty - - should be visible using x0/dx if x is missing completely but y is present - - should be visible using y0/dy if y is missing completely but x is present - - should not set base, offset or width - - should coerce a non-negative width - - should coerce textposition to none - - should default textfont to layout.font except for insidetextfont.color - - should not default insidetextfont.color to layout.font.color - - should default insidetextfont.color to textfont.color - - should inherit layout.calendar - - should take its own calendars - - bar calc / crossTraceCalc (formerly known as setPositions) - - should fill in calc pt fields (stack case) - - should fill in calc pt fields (overlay case) - - should fill in calc pt fields (group case) - - should fill in calc pt fields (relative case) - - should fill in calc pt fields (relative / percent case) - - Bar.calc - - should guard against invalid base items - - should not exclude items with non-numeric x/y from calcdata - - should not exclude items with non-numeric y from calcdata (to plots gaps correctly) - - should not exclude items with non-numeric x from calcdata (to plots gaps correctly) - - Bar.crossTraceCalc (formerly known as setPositions) - - should guard against invalid offset items - - should work with *width* typed arrays - - should work with *offset* typed arrays - - should guard against invalid width items - - should guard against invalid width items (group case) - - should stack vertical and horizontal traces separately - - should not group traces that set offset - - should not stack traces that set base - - should draw traces separately in overlay mode - - should ignore barnorm in overlay mode - - should honor barnorm for traces that cannot be grouped - - should honor barnorm for traces that cannot be stacked - - should honor barnorm (group case) - - should honor barnorm (group+base case) - - should honor barnorm (stack case) - - should honor barnorm (relative case) - - should expand position axis - - should expand size axis (overlay case) - - should expand size axis (relative case) - - should expand size axis (barnorm case) - - should include explicit base in size axis range - - should not include date zero (1970) in date axis range - - works with log axes (grouped bars) - - works with log axes (stacked bars) - - works with log axes (normalized bars) - - A bar plot - - should show bar texts (inside case) - - Pushes outside text relative bars inside when not outmost - - does not push text inside when base is set - - should show bar texts (outside case) - - should show bar texts (horizontal case) - - should show bar texts (barnorm case) - - should use inside text colors contrasting to bar colors by default - - should take bar fill opacities into account when calculating contrasting inside text colors - - should use defined textfont.color for inside text instead of the contrasting default - - should use matching color from textfont.color array for inside text, contrasting otherwise - - should use defined insidetextfont.color for inside text instead of the contrasting default - - should use matching color from insidetextfont.color array instead of the contrasting default - - should use a contrasting text color by default for outside labels being pushed inside because of another bar stacked above - - should style outside labels pushed inside by bars stacked above as inside labels - - should fall back to textfont array values if insidetextfont array values don't cover all bars - - should retain text styles throughout selecting and deselecting data points - - should be able to restyle - - should coerce text-related attributes - - can change orientation and correctly sets axis types - - should be able to add/remove text node on restyle - - should be able to react with new text colors - - bar visibility toggling: - - should update axis range according to visible edits (group case) - - should update axis range according to visible edits (stack case) - - gets the right legend traceorder if all bars are visible: false - - bar hover - with orientation *v* - - should return the correct hover point data (case x) - - should return the correct hover point data (case closest) - with orientation *h* - - should return the correct hover point data (case y) - - should return the correct hover point data (case closest) - text labels - - should show 'hovertext' items when present, 'text' if not - - should use hovertemplate if specified - with special width/offset combinations - - should return correct hover data (single bar, trace width) - - should return correct hover data (two bars, array width) - - positions labels correctly w.r.t. narrow bars - - should show/hide text in clipped and non-clipped layers - - event data - - should contain the correct fields - - Test barpolar defaults: - - should not coerce polar.bar* attributes on subplot w/o visible barpolar - - Test barpolar hover: - - should generate correct hover labels base - - should generate correct hover labels with custom text scalar - - should generate correct hover labels with custom text array - - should generate correct hover labels works with bars with offsets - - should generate correct hover labels works on clockwise angular axes - - should generate correct hover labels works with radians theta coordinates - - should generate correct hover labels works on radians angular axes - - should generate correct hover labels works on category angular axes - - should generate correct hover labels works on *gridshape:linear* subplots - - should generate correct hover labels works on log radial axes - - should generate correct hover labels works on category radial axes - - should generate correct hover labels works on date radial axes - - should generate correct hover labels works on negative radial coordinates - - should generate correct hover labels works on reversed radial axis ranges - - should generate correct hover labels works on a subplot with hole>0 - - should generate correct hover labels on overlapping bars of same size, the narrower wins - - should generate correct hover labels on overlapping bars of same width, the one will tip closer to cursor wins - - Test boxes supplyDefaults - - should set visible to false when x and y are empty - - should set visible to false when x or y is empty - - should set orientation to v by default - - should set orientation to h when only x is supplied - - should inherit layout.calendar - - should take its own calendars - - should not coerce point attributes when boxpoints is false - - should default boxpoints to suspectedoutliers when marker.outliercolor is set & valid - - should default boxpoints to suspectedoutliers when marker.line.outliercolor is set & valid - - Test box hover: - - should generate correct hover labels base - - should generate correct hover labels with mean - - should generate correct hover labels with sd - - should generate correct hover labels with boxpoints fences - - should generate correct hover labels with overlaid boxes - - should generate correct hover labels hoveron points | hovermode closest - - should generate correct hover labels hoveron points | hovermode x - - should generate correct hover labels hoveron boxes+points | hovermode x (hover on box only - same result as base) - - should generate correct hover labels hoveron boxes+points | hovermode x (box AND closest point) - - should generate correct hover labels text items on hover - - should generate correct hover labels only text items on hover - - Box edge cases - - does not barf on a single outlier with jitter - - Test box restyle: - - should be able to add/remove innner parts - - should update axis range accordingly on calc edits - - calculated data and points - connectGaps - - should exclude null and undefined points when false - - should exclude null and undefined points as categories when false - category ordering - default category ordering reified - - should output categories in the given order by default - - should output categories in the given order if `trace` order is explicitly specified - domain alphanumerical category ordering - - should output categories in ascending domain alphanumerical order - - should output categories in descending domain alphanumerical order - - should output categories in ascending domain alphanumerical order even if categories are all numbers - - should output categories in categoryorder order even if category array is defined - - should output categories in ascending domain alphanumerical order, excluding undefined - - should combine duplicate categories - - should skip over visible-false traces - explicit category ordering - - should output categories in explicitly supplied order, independent of trace order - - should output categories in explicitly supplied order even if category values are all numbers - - should output categories in explicitly supplied order, independent of trace order, pruned - - should output categories in explicitly supplied order even if not all categories are present - - should output categories in explicitly supplied order even if some missing categories were at the beginning or end of categoryarray - - should output categories in explicitly supplied order even if some missing categories were at the beginning or end of categoryarray - - should output categories in explicitly supplied order even if not all categories are present, and should interact with a null value orthogonally - - should output categories in explicitly supplied order first, if not all categories are covered - ordering tests in the presence of multiple traces - mutually exclusive - - baseline testing for the unordered, disjunct case - - category order follows the trace order (even if categoryarray is specified) - - category order is category ascending (even if categoryarray is specified) - - category order is category descending (even if categoryarray is specified) - - category order follows categoryarray - ordering tests in the presence of multiple traces - partially overlapping - - baseline testing for the unordered, partially overlapping case - - category order follows the trace order (even if categoryarray is specified) - - category order is category ascending (even if categoryarray is specified) - - category order is category descending (even if categoryarray is specified) - - category order follows categoryarray - ordering tests in the presence of multiple traces - fully overlapping - - baseline testing for the unordered, fully overlapping case - - category order follows the trace order (even if categoryarray is specified) - - category order is category ascending (even if categoryarray is specified) - - category order is category descending (even if categoryarray is specified) - - category order follows categoryarray - - category order follows categoryarray even if data is sparse - ordering and stacking combined - - partially overlapping category order follows categoryarray and stacking produces expected results - - fully overlapping - category order follows categoryarray and stacking produces expected results - - should order categories per axis - - should consider number categories and their string representation to be the same - customdata - - should pass customdata to the calcdata points - - carpet supplyDefaults - - uses a, b, x, and y - - sets a0/da when a not provided - - sets b0/db when b not provided - - sets visible = false when x is not valid - - sets visible = false when y is not valid - - sets visible = false if dim x !== dim y - - supplyDefaults visibility check - - does not hide empty subplots - - does not hide axes with non-carpet traces - - does not hide axes with non-cheater carpet - - hides axes with cheater - - does not hide an axis with cheater and non-cheater carpet - - does not hide an axis with cheater and non-cheater carpet - - carpet smooth_fill_2d_array - - fills in all points trivially - - fills in linearly from corner data - - fills in interior data - - fills in exterior data - - fills in heavily missing data - - fills non-uniform interior data - - fills non-uniform exterior data - - fills heavily missing non-uniform data - - applies laplacian smoothing - - applies laplacian smoothing symmetrically - - smooth_fill_array - - fills in via linear interplation - - fills with zero if no data - - fills with constant if only one data point - - fills in one leading point - - fills in two leading points - - fills in one trailing point - - fills in two trailing points - - Test carpet interactions: - - should restyle visible attribute properly - - should add/delete trace properly - - should respond to relayout properly - - scattercarpet should be able to coexist with scatter traces - - preserves order of carpets on the same subplot after hide/show - - scattercarpet array attributes - - works in both initial draws and restyles - - scattercarpet hover labels - - should generate hover label (base) - - should generate hover label with 'hoverinfo' set - - should generate hover label with arrayOk 'hoverinfo' settings - - contourcarpet plotting & editing - - keeps the correct ordering after hide and show - - zoom box element - - should be appended to the zoom layer - - main plot pan - - should respond to pan interactions - - should show/hide `cliponaxis: false` pts according to range - - axis zoom/pan and main plot zoom - - updates with correlated subplots & no constraints - zoom, dblclick, axis ends - - updates with correlated subplots & no constraints - middles, corners, and scrollwheel - - updates linked axes when there are constraints - - updates linked axes when there are constraints (axes_scaleanchor mock) - - updates axis layout when the constraints require it - - should draw correct zoomboxes corners - - handles xy, x-only and y-only zoombox updates - - Event data: - - should have correct content for *scatter* traces - - should have correct content for *heatmap* traces - - restyle - scatter traces - - reuses SVG fills - - reuses SVG lines - - can change scatter mode - - can legend-hide the second and only scatter trace - - @gl can legend-hide the second and only scattergl trace - - relayout - axis category attributes - - should response to 'categoryarray' and 'categoryorder' updates - axis ranges - - should translate points and text element - - should autorange correctly with margin pushers - axis line visibility - - can show and hide axis lines - - subplot creation / deletion: - - should clear orphan subplot when adding traces to blank graph - - should remove unused axes when deleting traces - - makes new backgrounds when switching between overlaying and separate subplots - - puts plot backgrounds behind everything except if they overlap - - puts not have backgrounds nodes when plot and paper color match - - should clear overlaid subplot trace layers on restyle - - should clear obsolete content out of axis layers when relayout'ing *layer* - - should clear obsolete content out of axis layers when changing overlaying configuation - - clear axis ticks, labels and title when relayout an axis to `*visible:false* - - Test choropleth - supplyDefaults - - should set _length based on locations and z but not slice - - should make trace invisible if locations is not defined - - should make trace invisible if z is not an array - - Test choropleth hover: - - should generate hover label info (base) - - should generate hover label info ('text' single value case) - - should generate hover label info ('text' array case) - - should generate hover label with custom styling - - should generate hover label with arrayOk 'hoverinfo' settings - - choropleth drawing - - should not throw an error with bad locations - - preserves order after hide/show - - Test click interactions: - click events - - should not be triggered when not on data points - - should not be triggered when in the margin - - should contain the correct fields - - should work with a sloppy click (shift < minDrag before mouseup) - - works with fixedrange axes - - should not be triggered when not on data points - - should not be triggered when in the margin - - should not be triggered if you dont cancel contextmenu - - should contain the correct fields - - should not be triggered when not on data points - - should not be triggered when in the margin - - should not be triggered if you dont cancel contextmenu - - should contain the correct fields - click event with hoverinfo set to skip - plotly_click - - should not register the click - click events with hoverinfo set to skip - plotly_hover - - should not register the hover - click event with hoverinfo set to none - plotly_click - - should contain the correct fields despite hoverinfo: "none" - click events with hoverinfo set to none - plotly_hover - - should contain the correct fields despite hoverinfo: "none" - plotly_unhover event with hoverinfo set to none - - should contain the correct fields despite hoverinfo: "none" - double click events - - should return null - drag interactions - - on nw dragbox should update the axis ranges - - on ne dragbox should update the axis ranges - - on sw dragbox should update the axis ranges - - on se dragbox should update the axis ranges - - on ew dragbox should update the xaxis range - - on w dragbox should update the xaxis range - - on e dragbox should update the xaxis range - - on ns dragbox should update the yaxis range - - on s dragbox should update the yaxis range - - on n dragbox should update the yaxis range - double click interactions - - when set to 'reset+autorange' (the default) should work when 'autorange' is on - - when set to 'reset+autorange' (the default) should reset to set range on double click - - when set to 'reset+autorange' (the default) should autosize on 1st double click and reset on 2nd - - when set to 'reset+autorange' (the default) should autosize on 1st double click and zoom when immediately dragged - - when set to 'reset+autorange' (the default) should follow updated auto ranges - - when set to 'reset' should work when 'autorange' is on - - when set to 'reset' should reset to set range on double click - - when set to 'reset' should reset on all double clicks - - when set to 'autosize' should work when 'autorange' is on - - when set to 'autosize' should set to autorange on double click - - when set to 'autosize' should reset on all double clicks - zoom interactions - - on main dragbox should update the axis ranges - scroll zoom interactions - - zooms in on scroll up - pan interactions - - on main dragbox should update the axis ranges - - should move the plot when panning - - dragbox - - should scale subplot and inverse scale scatter points - - Test color: - clean - - should turn rgb and rgba fractions into 0-255 values - - should dive into objects, arrays, and colorscales - - should count 0 as a fraction but not 1, except in alpha - - should allow extra whitespace or space instead of commas - - should not change if r, g, b >= 1 but clip alpha > 1 - - should not alter malformed strings or non-color keys - - should not barf on nulls - fill - - should call style with both fill and fill-opacity - stroke - - should call style with both fill and fill-opacity - contrast - - should darken light colors - - should darken light colors (2) - - should lighten dark colors - - Test colorbar: - supplyDefaults: - - should fill in tickfont defaults - - should inherit tickfont defaults from global font - hasColorbar - - should return true when marker colorbar is defined - drawing & editing - - does not lock up on tiny fractional ranges - - can show and hide heatmap colorbars and sizes correctly with automargin - - can show and hide scatter colorbars - - can show and hide histogram colorbars - - creates multiple fills for contour colorbars - - can show and hide parcoords colorbars - - can drag root-level colorbars in editable mode - - can drag marker-level colorbars in editable mode - - Test colorscale: - isValidScale - - should accept colorscale strings - - should accept only array of 2-item arrays - - should accept only arrays with 1st val = 0 and last val = 1 - - should accept ascending order number-color items - flipScale - - should flip a colorscale - hasColorscale - - should return false when marker is not defined - - should return false when marker is not defined (nested version) - - should return true when marker color is an Array with at least one number - - should return true when marker showscale is true - - should return true when marker colorscale is valid - - should return true when marker cmin & cmax are numbers - - should return true when marker colorbar is defined - - should return true when marker color is a typed array with at least one non-NaN - handleDefaults (heatmap-like version) - - should set auto to true when min/max are valid - - should fall back to auto true when min/max are invalid - - should coerce autocolorscale to false unless set to true - - should coerce showscale to true unless set to false - handleDefaults (scatter-like version) - - should coerce autocolorscale to true by default - - should coerce autocolorscale to false when valid colorscale is given - - should coerce showscale to true if colorbar is specified - calc - - should be RdBuNeg when autocolorscale and z <= 0 - - should be layout.colorscale.sequentialminus when autocolorscale and z <= 0 - - should set autocolorscale to false if it wasn't explicitly set true in input - - should be Blues when the only numerical z <= -0.5 - - should be layout.colorscale.sequentialminus when autocolorscale and the only numerical z <= -0.5 - - should be Reds when the only numerical z >= 0.5 - - should be layout.colorscale.sequential when autocolorscale and the only numerical z >= 0.5 - - should be layout.colorscale.diverging when autocolorscale and there are positive and negative values - - should ignore layout.colorscale.diverging when colorscale is defined at trace-level - - should be reverse the auto scale when reversescale is true - extractScale + makeColorScaleFunc - - should constrain color array values between cmin and cmax - - Plots.executeAPICommand - with a successful API command - - calls the API method and resolves - with an unsuccessful command - - calls the API method and rejects - with the skip command - - resolves immediately - - Plots.hasSimpleAPICommandBindings - - return the binding when bindings are simple - - the skip method returns false - - return false when properties are not the same - - return false when a command binds to more than one property - - return false when commands affect different traces - - return the binding when commands affect the same traces - - return the binding when commands affect the same traces in different order - - Plots.computeAPICommandBindings - - the skip method returns no bindings - restyle - with invalid notation - - with a scalar value - with astr + val notation - and a single attribute - - with a scalar value - - with an array value and no trace specified - - with trace specified - - with a different trace specified - - with an array value - - with two array values and two traces specified - - with traces specified in reverse order - - with two values and a single trace specified - - with two values and a different trace specified - with aobj notation - and a single attribute - - with a scalar value - - with trace specified - - with a different trace specified - - with an array value - - with two array values and two traces specified - - with traces specified in reverse order - - with two values and a single trace specified - - with two values and a different trace specified - and multiple attributes - - with a scalar value - with mixed notation - - and nested object and nested attr - - and traces specified - - and more data than traces - relayout - with invalid notation - - and a scalar value - with aobj notation - - and a single attribute - - and two attributes - with astr + val notation - - and an attribute - - and nested atributes - with mixed notation - - containing aob + astr - update - - computes bindings - animate - - binds to the frame for a simple animate command - - treats numeric frame names as strings - - binds to nothing for a multi-frame animate command - - component bindings - - creates an observer - - logs a warning if unable to create an observer - - udpates bound components when the value changes - - does not update the component if the value is not present - - udpates bound components when the computed value changes - - attaching component bindings - - attaches and updates bindings for sliders - - attaches and updates bindings for updatemenus - - Test mergeFrames - computing a single frame - - returns false if the frame does not exist - - returns a new object - - copies objects - - does NOT copy arrays - - computes a single frame - - leaves the frame unaffected - circularly defined frames - - avoid infinite recursion (starting point = 0) - - avoid infinite recursion (starting point = 1) - - avoid infinite recursion (starting point = 2) - computing trace data - - merges orthogonal traces - - merges overlapping traces - - merges partially overlapping traces - - assumes serial order without traces specified - computing trace layout - - merges layouts - - leaves the frame unaffected - - Test cone defaults - - should not set `visible: false` for traces with x,y,z,u,v,w arrays - - should set `visible: false` for traces missing x,y,z,u,v,w arrays - - should set `visible: false` for traces empty x,y,z,u,v,w arrays - - Test cone autorange: - - @gl should add pad around cone position to make sure they fit on the scene - - Test cone interactions - - @gl should add/clear gl objects correctly - - @gl should not pass zero or infinite `coneSize` to gl-cone3d - - @gl should display hover labels - - @gl should display hover labels (multi-trace case) - - config argument - attribute layout.autosize - - should fill the frame when autosize: false, fillFrame: true, frameMargins: undefined - - should fill the frame when autosize: true, fillFrame: true and frameMargins: undefined - - should fill the container when autosize: false, fillFrame: false and frameMargins: undefined - - should fill the container when autosize: true, fillFrame: false and frameMargins: undefined - - should fill the container when autosize: false, fillFrame: false and frameMargins: 0.1 - - should fill the container when autosize: true, fillFrame: false and frameMargins: 0.1 - - should fill the container when autosize: true up its max-width and max-height - - should respect attribute autosizable: false - showLink attribute - - should not display the edit link by default - - should display a link when true - editable attribute - - should let edits override editable - - should make titles editable - - should make x axes labels editable - - should make y axes labels editable - - should make legend labels editable - - should make annotation labels editable - - should make annotation labels draggable - - should make annotation arrows draggable - - should make legends draggable - axis drag handles attribute - - should have drag rectangles cursors by default - - should not have drag rectangles when disabled - axis range entry attribute - - allows axis range entry by default - - disallows axis range entry when disabled - plotlyServerURL: - - should default to plotly cloud - - can be set to other base urls - - has lesser priotiy then window env - responsive figure - - @flaky should resize when the viewport width/height changes - - @flaky should still be responsive if the plot is edited - - @flaky should still be responsive if the plot is purged and replotted - - @flaky should only have one resize handler when plotted more than once - - @flaky should become responsive if configured as such via Plotly.react - - @flaky should stop being responsive if configured as such via Plotly.react - - @flaky should resize horizontally in a flexbox when responsive: true - - @flaky should resize vertically in a flexbox when responsive: true - - @flaky should resize in both direction in a grid when responsive: true - - @flaky should provide a fixed non-zero width/height when autosize/responsive: true and container' size is zero - - @flaky should use the explicitly provided width/height even if autosize/responsive:true - - contour defaults - - should set autocontour to false when contours is supplied - - should inherit layout.calendar - - should take its own calendars - - contour makeColorMap - - should make correct color map function ('fill' coloring case) - - should make correct color map function ('heatmap' coloring case) - - should make correct color map function ('lines' coloring case) - - contour calc - - should fill in bricks if x/y not given - - should fill in bricks with x0/dx + y0/dy - - should convert x/y coordinates into bricks - - should trim brick-link /y coordinates - - should handle 1-xy + 1-brick case - - should handle 1-xy + multi-brick case - - should handle 0-xy + multi-brick case - - should make nice autocontour values - - should supply size and reorder start/end if autocontour is off - - contour plotting and editing - - can restyle x/y to different types - - works and draws labels when explicitly specifying ncontours=1 - - should always draw heatmap coloring layer below contour lines - - can change z values with gaps - - keeps the correct ordering after hide and show - - Plotly.downloadImage - - should be attached to Plotly - - should create link, remove link, accept options - - should create link, remove link, accept options - - should create link, remove link, accept options - - should create link, remove link, accept options - - should work when passing graph div id - - should work when passing a figure object - - should produce the right SVG output in IE - - dragElement - - should init drag element - - should pass event, startX and startY to prepFn on mousedown - - should pass dx and dy to moveFn on mousemove - - does not pass the event to doneFn on mouseup after mousemove - - should pass numClicks and event to clickFn on mouseup after no/small mousemove - - should add a cover slip div to the DOM - - should not add a cover slip div to the DOM when right click - - should fire off click event when down/up without dragging - - should not register move event handler when dragmode is false - - dragElement.getCursor - - should return sw-resize when x < 1/3, y < 1/3 - - should return s-resize when 1/3 < x < 2/3, y < 1/3 - - should return se-resize when x > 2/3, y < 1/3 - - should return w-resize when x < 1/3, 1/3 < y < 2/3 - - should return move when 1/3 < x < 2/3, 1/3 < y < 2/3 - - should return e-resize when x > 1/3, 1/3 < y < 2/3 - - should return nw-resize when x > 1/3, y > 2/3 - - should return nw-resize when 1/3 < x < 2/3, y > 2/3 - - should return nw-resize when x > 2/3, y > 2/3 - - dragElement.align - - should return min value if anchor is set to 'bottom' or 'left' - - should return max value if anchor is set to 'top' or 'right' - - should return center value if anchor is set to 'middle' or 'center' - - should return center value if anchor is set to 'middle' or 'center' - - should return min value  - - should return max value  - - Drawing - setClipUrl - - should set the clip-path attribute - - should unset the clip-path if arg is falsy - - should append window URL to clip-path if is present - - should append window URL w/o hash to clip-path if is present - getTranslate - - should work with regular DOM elements - - should work with d3 elements - - should work with negative values - setTranslate - - should work with regular DOM elements - - should work with d3 elements - getScale - - should work with regular DOM elements - - should work with d3 elements - setScale - - should work with regular DOM elements - - should work with d3 elements - setPointGroupScale - - sets the scale of a point - - appends the scale of a point - - modifies the scale of a point - - does not apply the scale of a point if scale (1, 1) - - removes the scale of a point if scale (1, 1) - setTextPointsScale - - sets the transform on an empty element - - unsets the transform - - preserves a leading translate - - preserves transforms - - should not break when is not present - bBox - - should update bounding box dimension on window scroll - - works with dummy nodes created in Drawing.tester - - gradients - - clears unused gradients after a replot - - errorbar plotting - - should autorange to the visible bars and remove invisible bars - - shows half errorbars and removes individual bars that disappear - - Events - init - - instantiates an emitter on incoming plot object - - maps function onto incoming plot object - - is idempotent - - triggers node style events - - triggers jquery events - - mirrors events on an internal handler - triggerHandler - - triggers node handlers and returns last value - - does *not* mirror triggerHandler events on the internal handler - - triggers jQuery handlers when no matching node events bound - - triggers jQuery handlers when no node events initialized - - triggers jQuery + nodejs handlers and returns last jQuery value - - works with *once* event handlers - purge - - should remove all method from the plotObj - when jQuery.noConflict is set, - - triggers jquery events - - triggers jQuery handlers when no matching node events bound - - triggers jQuery handlers when no node events initialized - - triggers jQuery + nodejs handlers and returns last jQuery value - - extendFlat - - extends an array with an array - - extends an array with an array into a clone - - extends an array with an object - - extends an object with an array - - extends an object with another object - - merges array keys - - ignores keys with undefined values - - does not handle null inputs - - does not handle string targets - - extendDeep - - extends nested object with another nested object - - doesn't modify source objects after setting the target - - merges array items - - ignores keys with undefined values - - leaves a gap in the array for undefined of lower index than that of the highest defined value - - does not handle circular structure - - extendDeepAll - - extends object with another other containing keys undefined values - - array by reference vs deep-copy - - extendDeep DOES deep-copy untyped source arrays - - extendDeepNoArrays includes by reference untyped arrays from source - - extendDeepNoArrays includes by reference typed arrays from source - - extendDeep ALSO includes by reference typed arrays from source - - finance charts defaults: - - should generated the correct number of full traces - - should not mutate user data - - should work with transforms - - should not slice data arrays but record minimum supplied length - - should set visible to *false* when a component (other than x) is missing - - should return visible: false if any data component is empty - - direction *showlegend* should be inherited from trace-wide *showlegend* - - direction *name* should be ignored if there's a trace-wide *name* - - trace *name* default should make reference to user data trace indices - - trace-wide styling should set default for corresponding per-direction styling - - trace-wide *visible* should work - - should add a few layout settings by default - - pushes layout.calendar to all output traces - - accepts a calendar per input trace - - should make empty candlestick traces autotype to *linear* (as opposed to real box traces) - - finance charts calc - - should fill when *x* is not present - - should work with *filter* transforms - - should work with *groupby* transforms (ohlc) - - should work with *groupby* transforms (candlestick) - - should use the smallest trace minimum x difference to convert *tickwidth* to data coords for all traces attached to a given x-axis - - works with category x data - - should fallback to a spacing of 1 in one-item traces - - should handle cases where 'open' and 'close' entries are equal - - should include finance hover labels prefix in calcdata - - finance charts updates: - - Plotly.restyle should work - - should be able to toggle visibility - - Plotly.relayout should work - - Plotly.extendTraces should work - - Plotly.deleteTraces / addTraces should work - - Plotly.addTraces + Plotly.relayout should update candlestick box position values - - Plotly.plot with data-less trace and adding with Plotly.restyle - - should be able to update ohlc tickwidth - - finance charts *special* handlers: - - `editable: true` handlers should work - - finance trace hover: - - should generate correct hover labels ohlc - basic - - should generate correct hover labels ohlc - with scalar text - - should generate correct hover labels ohlc - with array text - - should generate correct hover labels ohlc - just scalar text - - should generate correct hover labels ohlc - just array text - - should generate correct hover labels ohlc - just array text with array hoverinfo - - should generate correct hover labels candlestick - basic - - should generate correct hover labels candlestick - with scalar text - - should generate correct hover labels candlestick - with array text - - should generate correct hover labels candlestick - just scalar text - - should generate correct hover labels candlestick - just array text - - should generate correct hover labels candlestick - just array text with array hoverinfo - - Test frame api - gd initialization - - creates an empty list for frames - - creates an empty lookup table for frames - #addFrames - - issues a warning if a number-named frame would overwrite a frame - - treats an undefined list as a noop - - compresses garbage when adding frames - - treats a null list as a noop - - treats an empty list as a noop - - names an unnamed frame - - casts names to strings - - creates multiple unnamed frames at the same time - - creates multiple unnamed frames in series - - casts number names to strings on insertion - - updates frames referenced by number - - avoids name collisions - - inserts frames at specific indices - - inserts frames at specific indices (reversed) - - implements undo/redo - - overwrites frames - #deleteFrames - - deletes a frame - - deletes multiple frames - - deletes all frames if frameList is falsey - - deleteFrames is a no-op with empty array - - Fx defaults - - should default (blank version) - - should default (cartesian version) - - should default (cartesian horizontal version) - - should default (gl3d version) - - should default (geo version) - - should default (multi plot type version) - - should coerce trace and annotations hoverlabel using global as defaults - - relayout - - should update main drag with correct - - Test Geo layout defaults - - should not coerce projection.rotation if type is albers usa - - should not coerce projection.rotation if type is albers usa (converse) - - should not coerce coastlines and ocean if type is albers usa - - should not coerce coastlines and ocean if type is albers usa (converse) - - should not coerce projection.parallels if type is conic - - should coerce subunits only when available (usa case) - - should coerce subunits only when available (default case) - - should coerce subunits only when available (NA case) - - should coerce subunits only when available (NA case 2) - - should coerce subunits only when available (NA case 2) - - should not coerce frame unless for world scope - - should add geo data-only geos into layoutIn - - should add geo data-only geos into layoutIn (converse) - should default to lon(lat)range to params non-world scopes - - base case for usa - - custom case for usa - - base case for europe - - custom case for europe - - base case for asia - - custom case for asia - - base case for africa - - custom case for africa - - base case for north america - - custom case for north america - - base case for south america - - custom case for south america - should adjust default lon(lat)range to projection.rotation in world scopes - - - case 0 - - - case 1 - - - case 2 - should default projection.rotation.lon to lon-center of world-scope maps - - - case 0 - - - case 1 - - - case 2 - - - case 3 - - - case 4 - - - converse 0 - - - converse 1 - - - converse 2 - - - converse 3 - - - converse 4 - should default center.lon - - to projection.rotation.lon on world maps - case 0 - - to projection.rotation.lon on world maps - case 1 - - to projection.rotation.lon on world maps - case 2 - - to projection.rotation.lon on world maps - case 3 - - to projection.rotation.lon on world maps - case 4 - - to lon-center on scoped maps - case 0 - - to lon-center on scoped maps - case 1 - - to lon-center on scoped maps - case 2 - - to lon-center on scoped maps - case 3 - - to lon-center on scoped maps - case 4 - should default center.lat - - - case 0 - - - case 1 - - - case 2 - - geojson / topojson utils - should be able to extract topojson feature from *locations* items - - with *ISO-3* locationmode - - with *ISO-3* locationmode (not-found case) - - with *country names* locationmode - - with *country names* locationmode (not-found case) - should distinguish between US and US Virgin Island - - (case Virgin Islands (U.S.)) - - (case Virgin Islands (U.S.) ) - - Test geo interactions - mock geo_first.json - scattergeo hover events - - should contain the correct fields - - should show the correct point data - - should not be triggered when pt over on the other side of the globe - - should not be triggered when pt *location* does not have matching feature - scattergeo click events - - should contain the correct fields - - should show the correct point data - scattergeo unhover events - - should contain the correct fields - - should show the correct point data - choropleth hover events - - should contain the correct fields - - should show the correct point data - choropleth click events - - should contain the correct fields - - should show the correct point data - choropleth unhover events - - should contain the correct fields - - should show the correct point data - trace visibility toggle - - should toggle scattergeo elements - - should toggle choropleth elements - deleting traces and geos - - should delete traces in succession - streaming calls - - should be able to add line/marker/text nodes - - should be able to shift line/marker/text nodes - - should be able to update line/marker/text nodes - - should be able to delete line/marker/text nodes and choropleth paths - - should be able to update line/marker/text nodes and choropleth paths - - should not throw during hover when out-of-range pts are present in *albers usa* map - - should clear hover label when cursor slips off subplot - - should not confuse positions on either side of the globe - - should plot to scope defaults when user setting lead to NaN map bounds - - should get hover right for choropleths involving landmasses that cross antimeridian - - Test event property of interactions on a geo plot: - click events - - should not be trigged when not on data points - - should contain the correct fields - modified click events - - should not be trigged when not on data points - - does not support right-click - hover events - - should contain the correct fields - unhover events - - should contain the correct fields - - Test geo base layers - - should clear obsolete features and layers on *geo.scope* relayout calls - - Test geo zoom/pan/drag interactions: - - should work for non-clipped projections - - should work for clipped projections - - should work for scoped projections - - should work for *albers usa* projections - - should guard againt undefined projection.invert result in some projections - - Test hover and click interactions - - @gl should output correct event data for scattergl - - @gl should output correct event data for scattergl in *select* dragmode - - @gl should output correct event data for scattergl in *lasso* dragmode - - @gl should output correct event data for scattergl with hoverinfo: 'none' - - @gl should show correct label for scattergl when hovertext is set - - @gl should output correct event data for pointcloud - - @gl should output correct event data for heatmapgl - - @gl should output correct event data for heatmapgl (asymmetric case)  - - @gl should output correct event data for scattergl after visibility restyle - - @gl should output correct event data for scattergl-fancy - - @gl should output correct event data contourgl - - @noCI Test gl2d lasso/select: - - @gl should work under fast mode with *select* dragmode - - @gl should work under fast mode with *lasso* dragmode - - @gl should work under fancy mode with *select* dragmode - - @gl should work under fancy mode with *lasso* dragmode - - @gl should work on trace with enabled transforms - - @gl should work on gl text charts - - @gl should work on gl text charts with array textfont.color - - @gl should work after a width/height relayout - - @gl should behave correctly during select+doubleclick+pan scenarios - - @gl should work on overlaid subplots - - date axis - - @gl should use the fancy gl-vis/gl-scatter2d - - @gl should use the fancy gl-vis/gl-scatter2d once again - - @gl should now use the non-fancy gl-vis/gl-scatter2d - - @gl should use the non-fancy gl-vis/gl-scatter2d with string dates - - Test removal of gl contexts - - @gl Plots.cleanPlot should remove gl context from the graph div of a gl2d plot - - @gl Plotly.newPlot should remove gl context from the graph div of a gl2d plot - - Test gl plot side effects - - @gl should not draw the rangeslider - - @gl should be able to replot from a blank graph - - @gl should be able to switch trace type - - @gl should be able to resize canvas properly - - @noCI @gl should fire *plotly_webglcontextlost* when on webgl context lost - - @gl should not clear context when dimensions are not integers - - Test gl2d plots - - @gl should respond to drag interactions - - @gl should be able to toggle visibility - - @gl should be able to toggle trace with different modes - - @noCI @gl should display selection of big number of regular points - - @noCI @gl should display selection of big number of miscellaneous points - - @gl should be able to toggle from svg to gl - - @gl supports 1D and 2D Zoom - - @gl supports axis constraints with zoom - - @gl should change plot type with incomplete data - - @gl data-referenced annotations should update on drag - - @gl should not scroll document while panning - - @gl should restyle opacity - - @gl should update selected points - - @gl should remove fill2d - - @gl should be able to draw more than 4096 colors - - @gl should work with typed array - - @gl should create two WebGL contexts per graph - - @gl should handle transform traces properly (calcTransform case) - - @gl should handle transform traces properly (default transform case) - - @gl should clear canvases on *replot* edits - - @gl should not cause infinite loops when coordinate arrays start/end with NaN - - Test scattergl autorange: - should return the same value as SVG scatter for ~small~ data - - @gl - case lines+markers - - @gl - case bubbles - - @gl - case line on log axes - - @gl - case fill to zero - - @gl - case annotations - should return the approximative values for ~big~ data - - @gl - case scalar marker.size - - @gl - case array marker.size - - @gl - case mode:lines - - pointcloud traces - - @gl renders without raising an error - - @gl should update properly - - contourgl plots - - @gl render without raising an error - - @gl render without raising an error - - render without raising an error (coloring: "lines") - - render smooth, regular ellipses without raising an error (coloring: "fill") - - render ellipses with added noise without raising an error (coloring: "fill") - - should update properly - - Test gl3d modebar handlers - - @gl button zoom3d should updates the scene dragmode and dragmode button - - @gl button pan3d should updates the scene dragmode and dragmode button - - @gl button orbitRotation should updates the scene dragmode and dragmode button - - @gl button hoverClosest3d should update the scene hovermode and spikes - - @gl button resetCameraDefault3d should reset camera to default - - @gl button resetCameraLastSave3d should reset camera to default - - Test gl3d drag and wheel interactions - - @gl should not scroll document while panning - - @gl should update the scene camera - - Test gl3d relayout calls - - @gl should be able to adjust margins - - @gl should skip root-level axis objects - - Test gl3d annotations - - @gl should move with camera - - @gl should be removed when beyond the scene axis ranges - - @gl should be able to add/remove and hide/unhide themselves via relayout - - @gl should work across multiple scenes - - @gl should contribute to scene axis autorange - - @gl should allow text and tail position edits under `editable: true` - - @gl should display hover labels and trigger *plotly_clickannotation* event - - Test removal of gl contexts - - @gl Plots.cleanPlot should remove gl context from the graph div of a gl3d plot - - @gl Plotly.newPlot should remove gl context from the graph div of a gl3d plot - - @gl should fire *plotly_webglcontextlost* when on webgl context lost - - Test Gl3dAxes - supplyLayoutDefaults supplies defaults - - should define specific default set with empty initial layout - - should inherit layout.calendar - - should accept its own calendar - - Test Gl3d layout defaults - supplyLayoutDefaults - - should coerce aspectmode=ratio when ratio data is valid - - should coerce aspectmode=auto when aspect ratio data is invalid - - should coerce manual when valid ratio data but invalid aspectmode - - should not coerce manual when invalid ratio data but invalid aspectmode - - should not coerce manual when valid ratio data and valid non-manual aspectmode - - should coerce dragmode - - should coerce hovermode - - should add data-only scenes into layoutIn - - should add scene data-only scenes into layoutIn (converse) - - should use combo of 'axis.color', bgcolor and lightFraction as default for 'axis.gridcolor' - - Gl3d layout edge cases - - should handle auto aspect ratio correctly on data changes - - gl3d plots - - @gl should respond to drag interactions with mock of unset camera - - @gl should respond to drag interactions with mock of partially set camera - - heatmap supplyDefaults - - should set visible to false when z is empty - - should set visible to false when z is non-numeric - - should set visible to false when z isn't column not a 2d array - - should set paddings to 0 when not defined - - should not step on defined paddings - - should not coerce gap if zsmooth is set - - should inherit layout.calendar - - should take its own calendars - - heatmap convertColumnXYZ - - should convert x/y/z columns to z(x,y) - - should convert x/y/z columns to z(x,y) with uneven dimensions - - should convert x/y/z columns to z(x,y) with missing values - - should convert x/y/z/text columns to z(x,y) and text(x,y) - - should convert x/y/z columns to z(x,y) with out-of-order data - - should convert x/y/z columns with nulls to z(x,y) - - heatmap calc - - should fill in bricks if x/y not given - - should fill in bricks with x0/dx + y0/dy - - should convert x/y coordinates into bricks - - should respect brick-link /y coordinates - - should handle 1-xy + 1-brick case - - should handle 1-xy + multi-brick case - - should handle 0-xy + multi-brick case - - should handle the category case - - should handle the category x/y/z/ column case - - should handle the date x/y/z/ column case - - should fill in bricks if x/y not given (typed array case) - - should convert x/y coordinates into bricks (typed array case) - - heatmap plot - - should not draw traces that are off-screen - - keeps the correct ordering after hide and show - - should be able to restyle - - draws canvas with correct margins - - can change z values with connected gaps - - heatmap hover - for `heatmap_multi-trace` - - should find closest point (case 1) and should - - should find closest point (case 2) and should - for xyz-column traces - - should find closest point and should - nonuniform bricks - - gives data positions, not brick centers - - Test histogram2d - supplyDefaults - - should quit early if there is no data - - should set zsmooth to false when zsmooth is empty - - doesnt step on zsmooth when zsmooth is set - - should set xgap and ygap to 0 when xgap and ygap are empty - - shouldnt step on xgap and ygap when xgap and ygap are set - - shouldnt coerce gap when zsmooth is set - - should inherit layout.calendar - - should take its own calendars - calc - - should handle both uniform and nonuniform date bins - restyle / relayout interaction - - should update paths on zooms - - handles autobin correctly on restyles - - respects explicit autobin: false as a one-time autobin - - Test histogram - supplyDefaults - - should set visible to false when x or y is empty - - should set visible to false when x or y is empty AND the other is present - - should set visible to false when type is histogram2d(contour) and x or y are empty - - should set orientation to v by default - - should set orientation to h when only y is supplied - - should not coerce autobinx regardless of xbins - - should not coerce autobiny regardless of ybins - - should inherit layout.calendar - - should take its own calendars - calc - - should handle auto dates with nonuniform (month) bins - - should handle auto dates with uniform (day) bins - - should handle very small bins - - handles single-bin data without extra bins - - handles single-value overlaid autobinned data with other manual bins - - handles single-value overlaid autobinned data with other auto bins - - handles multiple single-valued overlaid autobinned traces with different values - - handles multiple single-date overlaid autobinned traces with different values - - handles several overlaid autobinned traces with only one value total - - can tell the difference between single-bin and single-value histograms - - harmonizes autobins when all traces are autobinned - - autobins all data as one - - harmonizes autobins with smaller manual bins - - harmonizes autobins with larger manual bins - - ignores incompatible sizes, and harmonizes start values - - can take size and start from different traces in any order - - works with only a size specified - - ignores traces on other axes - - can handle TypedArrays - cumulative distribution functions - - makes the right base histogram - - handles direction=undefined, currentbin=undefined, histnorm=undefined, histfunc=undefined - - handles direction=decreasing, currentbin=undefined, histnorm=undefined, histfunc=undefined - - handles direction=undefined, currentbin=exclude, histnorm=undefined, histfunc=undefined - - handles direction=decreasing, currentbin=exclude, histnorm=undefined, histfunc=undefined - - handles direction=undefined, currentbin=half, histnorm=undefined, histfunc=undefined - - handles direction=decreasing, currentbin=half, histnorm=undefined, histfunc=undefined - - handles direction=decreasing, currentbin=half, histnorm=percent, histfunc=undefined - - handles direction=undefined, currentbin=exclude, histnorm=probability, histfunc=undefined - - handles direction=decreasing, currentbin=half, histnorm=density, histfunc=undefined - - handles direction=decreasing, currentbin=half, histnorm=probability density, histfunc=undefined - - handles direction=undefined, currentbin=half, histnorm=undefined, histfunc=sum - - handles direction=undefined, currentbin=half, histnorm=probability, histfunc=sum - - handles direction=decreasing, currentbin=half, histnorm=percent, histfunc=max - - handles direction=decreasing, currentbin=half, histnorm=density, histfunc=min - - handles direction=undefined, currentbin=exclude, histnorm=probability density, histfunc=avg - plot / restyle - - should update autobins correctly when restyling - - respects explicit autobin: false as a one-time autobin - - allows changing axis type with new x data - - can resize a plot with several histograms - - gives the right bar width for single-value histograms - - can recalc after the first trace is hidden - - autobins all histograms (on the same subplot) together except `visible: false` - - getBinSpanLabelRound - - works when the bin edges are round numbers and data are "continuous" - - works when the bins are shifted to be less round than the data - - rounds dates to full fields (if larger than seconds) - round bin edges case - - rounds dates to full fields (if larger than seconds) - round data case - - rounds (mostly) correctly when using world calendars - - event data - - should contain the correct fields - - hover info - hover info - - responds to hover - hover info x - - responds to hover x - hover info y - - responds to hover y - hover info text - - responds to hover text - hover info text with 0 - - responds to hover text - hover info all - - responds to hover all - hover info with bad name - - cleans the name - hover info y on log axis - - responds to hover y - hover info y+text - - responds to hover y+text - hover info x+text - - responds to hover x+text - hover error x text (log axis positive) - - responds to hover x+text - hover error text (log axis 0) - - responds to hover x+text - hover error text (log axis negative) - - responds to hover x+text - hover info text with html - - responds to hover text with html - hover info skip - - does not hover if hover info is set to skip - hover info none - - does not render if hover is set to none - 'closest' hover info (superimposed case) - - render hover labels of the above trace - - render only non-hoverinfo 'none' hover labels - hover label order for stacked traces with zeros - - puts the top trace on top - - puts the right trace on the right - hover info for x/y/z traces - - should display correct label content - - should display correct label content with specified format - heatmap - - provides exponents correctly for z data - - should display correct label content with specified format - contour - - should get the right content and color for contour constraints - - should display correct label content with specified format - histogram2d - - should display correct label content with specified format - histogram2dcontour - hover info for negative data on a log axis - - shows negative data even though it is infinitely off-screen - histogram hover info - - shows the data range when bins have multiple values - - shows the exact data when bins have single values - - will show a category range if you ask nicely - histogram2d hover info - - shows the data range when bins have multiple values - - shows the exact data when bins have single values - candlestick hoverinfo - - has the right basic and event behavior - - shows correct labels in split mode - - shows text iff text is in hoverinfo - ohlc hoverinfo - - has the right basic and event behavior - - shows correct labels in split mode - - shows text iff text is in hoverinfo - hoverformat - - should display the correct format when ticklabels true - - should display the correct format when ticklabels false - textmode - - should show text labels - - should show number labels - - should not show null text labels - - should not show undefined text labels - hover events - - should skip the hover event if explicitly instructed - - should emit events only if the event looks user-driven - overflowing hover labels - - shows as many labels as will fit on the div, not on the subplot - centered - - renders labels inside boxes - - renders secondary info box right to primary info box - - stacks nicely upon each other - hovertemplate - - should format labels according to a template string - - should format secondary label with extra tag - - should support pseudo-html - - should support array - - should contain the axis names - - hover info on stacked subplots - hover info on stacked subplots with shared x-axis - - responds to hover and keeps the labels from crossing - hover info on stacked subplots with shared y-axis - - responds to hover - - hover on many lines+bars - - shows hover info for both traces - - hover info on overlaid subplots - - should respond to hover - - hover after resizing - - should work - - hover on fill - - should always show one label in the right place - - should always show one label in the right place (symmetric fill edge case) - - should work for scatterternary too - - should act like closest mode on ternary when cartesian is in compare mode - - hover updates - - should update the labels on animation - - should not trigger infinite loop of plotly_unhover events - - Test hover label custom styling: - - should work for x/y cartesian traces - - should work for x/y cartesian traces (multi-trace case) - - should work for 2d z cartesian traces - - hover distance - closest hovermode - - does not render if distance to the point is larger than default (>20) - - render if distance to the point is less than default (<20) - - responds to hoverdistance change - - correctly responds to setting the hoverdistance to -1 by increasing the range of search for points to hover to Infinity - x hovermode - - does not render if distance to the point is larger than default (>20) - - render if distance to the point is less than default (<20) - - responds to hoverdistance change from 10 to 30 (part 1) - - responds to hoverdistance change from 10 to 30 (part 2) - - responds to hoverdistance change from default to 0 (part 1) - - responds to hoverdistance change from default to 0 (part 2) - - responds to setting the hoverdistance to -1 by increasing the range of search for points to hover to Infinity (part 1) - - responds to setting the hoverdistance to -1 by increasing the range of search for points to hover to Infinity (part 2) - - hover label rotation: - when a single pt is picked - - should rotate labels under *hovermode:y* - - should not rotate labels under *hovermode:closest* - when mulitple pts are picked - - should rotate labels under *hovermode:y* - - should not rotate labels under *hovermode:closest* - - hovermode defaults to - - 'closest' for cartesian plots if clickmode includes 'select' - - 'x' for horizontal cartesian plots if clickmode lacks 'select' - - 'y' for vertical cartesian plots if clickmode lacks 'select' - - 'closest' for a non-cartesian plot - - touch devices - dragmode:pan - - emits click events - dragmode:zoom - - emits click events - - dragmode: false - - should emit hover events on mousemove - - spikeline hover - - draws lines and markers on enabled axes in the closest hovermode - - works the same for scattergl - - draws lines and markers on enabled axes w/o tick labels - - draws lines and markers on enabled axes in the x hovermode - - draws lines and markers on enabled axes in the spikesnap "cursor" mode - - doesn't switch between toaxis and across spikemodes on switching the hovermodes - - increase the range of search for points to draw the spikelines on spikedistance change - - correctly responds to setting the spikedistance to -1 by increasing the range of search for points to draw the spikelines to Infinity - - correctly responds to setting the spikedistance to 0 by disabling the search for points to draw the spikelines - - positions spikes at the data value on grouped bars - - positions spikes at the data value on grouped boxes - - positions spikes correctly on grouped violins - - positions spikes correctly on heatmaps - - positions spikes correctly on contour maps - - does not show spikes on scatter fills - - isArrayOrTypedArray - - treats [] as an array - - treats [null,null,null,null,null,null,null,null,null,null] as an array - - treats {"0":0} as an array - - treats {"0":1,"1":2,"2":3} as an array - - treats undefined as NOT an array - - treats {} as NOT an array - - treats {"location":{"href":"http://localhost:9876/context.html","ancestorOrigins":{"0":"http://localhost:9876"},"origin":"http://localhost:9876","protocol":"http:","host":"localhost:9876","hostname":"localhost","port":"9876","pathname":"/context.html","search":"","hash":""}} as NOT an array - - treats "window" as NOT an array - - treats null as NOT an array - - treats undefined as NOT an array - - treats "string" as NOT an array - - treats true as NOT an array - - treats false as NOT an array - - treats null as NOT an array - - treats null as NOT an array - - treats {} as NOT an array - - treats "\n" as NOT an array - - treats "2018-12-07T16:21:29.337Z" as NOT an array - - treats {} as NOT an array - - treats "string" as NOT an array - - treats {} as NOT an array - - isTypedArray - - treats {"0":0} as an array - - treats {"0":1,"1":2,"2":3} as an array - - treats [null,null,null,null,null,null,null,null,null,null] as NOT an array - - treats [] as NOT an array - - treats undefined as NOT an array - - treats {} as NOT an array - - treats {"location":{"href":"http://localhost:9876/context.html","ancestorOrigins":{"0":"http://localhost:9876"},"origin":"http://localhost:9876","protocol":"http:","host":"localhost:9876","hostname":"localhost","port":"9876","pathname":"/context.html","search":"","hash":""}} as NOT an array - - treats "window" as NOT an array - - treats null as NOT an array - - treats undefined as NOT an array - - treats "string" as NOT an array - - treats true as NOT an array - - treats false as NOT an array - - treats null as NOT an array - - treats null as NOT an array - - treats {} as NOT an array - - treats "\n" as NOT an array - - treats "2018-12-07T16:21:29.338Z" as NOT an array - - treats {} as NOT an array - - treats "string" as NOT an array - - treats {} as NOT an array - - isPlainObject - - treats {} as a plain object - - treats {"a":"A","B":"b"} as a plain object - - treats undefined as NOT a plain object - - treats {} as NOT a plain object - - treats {"location":{"href":"http://localhost:9876/context.html","ancestorOrigins":{"0":"http://localhost:9876"},"origin":"http://localhost:9876","protocol":"http:","host":"localhost:9876","hostname":"localhost","port":"9876","pathname":"/context.html","search":"","hash":""}} as NOT a plain object - - treats "window" as NOT a plain object - - treats null as NOT a plain object - - treats undefined as NOT a plain object - - treats [] as NOT a plain object - - treats {"0":0} as NOT a plain object - - treats "string" as NOT a plain object - - treats true as NOT a plain object - - treats false as NOT a plain object - - treats null as NOT a plain object - - treats null as NOT a plain object - - treats {} as NOT a plain object - - treats "\n" as NOT a plain object - - treats [null,null,null,null,null,null,null,null,null,null] as NOT a plain object - - treats "2018-12-07T16:21:29.338Z" as NOT a plain object - - treats {} as NOT a plain object - - treats "string" as NOT a plain object - - treats {} as NOT a plain object - - Layout images - supplyLayoutDefaults - - should reject when there is no `source` - - should reject when not an array - - should coerce the correct defaults - drawing - - should draw images on the right layers - - should fall back on imageLowerLayer for below missing subplots - with anchors and sizing - - should work for center middle - - should work for left top - - should work for right bottom - - should work for stretch sizing - - should work for fill sizing - when the plot is dragged - - should not move when referencing the paper - - should move when referencing axes - when relayout - - should update the image if changed - - should update the image position if changed - - should remove the image tag if an invalid source - when adding/removing images - - should properly add and remove image - - images log/linear axis changes - - doesnt try to update position automatically with ref changes - - keeps the same data value if the axis type is changed without position - - The legend - when plotted with many traces - - should not exceed plot height - - should insert a scrollbar - - should scroll when there's a wheel event - - should scroll on dragging the scrollbar - - should not scroll on dragging the scrollbox - - should not scroll on dragging the scrollbar with a right click - - removes scroll bar and handlers when switching to horizontal - - updates scrollBar size/existence on deleteTraces - - should keep the scrollbar position after a toggle event - - should be restored and functional after relayout - - should constrain scrolling to the contents - - should scale the scrollbar movement from top to bottom - - should be removed from DOM when 'showlegend' is relayout'ed to false - - should resize when relayout'ed with new height - when plotted with few traces - - should not display the scrollbar - - should be removed from DOM when 'showlegend' is relayout'ed to false - - should resize when traces added - - legend defaults - - hides by default if there is only one legend item by default - - shows if there are two legend items by default but only one is shown - - hides if no items are actually shown - - shows with one visible pie - - does not show with a hidden pie - - shows if even a default hidden single item is explicitly shown - - should default traceorder to reversed for stack bar charts - - should default traceorder to reversed for filled tonext scatter charts - - should default traceorder to grouped when a group is present - - does not consider invisible traces for traceorder default - - should default orientation to vertical - for horizontal legends - - should default position to bottom left - - should default position to top left if a range slider present - - legend getLegendData - - should group legendgroup traces - - should collapse when data has only one group - - should return empty array when legend data has no traces - - should reverse the order when legend.traceorder is set - - should reverse the trace order within groups when reversed+grouped - - legend helpers: - isGrouped - - should return true when trace is visible and supports legend - isReversed - - should return true when trace is visible and supports legend - - legend anchor utils: - isRightAnchor - - should return true when 'xanchor' is set to 'right' - - should return true when 'xanchor' is set to 'auto' and 'x' >= 2/3 - isCenterAnchor - - should return true when 'xanchor' is set to 'center' - - should return true when 'xanchor' is set to 'auto' and 1/3 < 'x' < 2/3 - isBottomAnchor - - should return true when 'yanchor' is set to 'right' - - should return true when 'yanchor' is set to 'auto' and 'y' <= 1/3 - isMiddleAnchor - - should return true when 'yanchor' is set to 'center' - - should return true when 'yanchor' is set to 'auto' and 1/3 < 'y' < 2/3 - - legend relayout update - - should hide and show the legend - - should update border styling - should update legend valign - - it should translate markers - - legend orientation change: - - should update plot background - - legend restyle update - - should update trace toggle background rectangle - - legend interaction - pie chart - single click - - should hide slice - - should fade legend item - - should unhide slice - - should unfade legend item - double click - - should hide other slices - - should fade other legend items - - should unhide all slices - - should unfade legend items - non-pie chart - single click - - should hide series - - should fade legend item - - should unhide series - - should unfade legend item - double click - - should hide series - - should fade legend item - - should unhide series - - should unfade legend items - carpet plots - - should ignore carpet traces when toggling - editable mode interactions - - sets and unsets trace group names - visible toggle - - should find correct bounding box (case h - {"legendPosition":true}) - - should find correct bounding box (case h - {"legendPosition":true,"legendText":true}) - - should find correct bounding box (case v - {"legendPosition":true}) - - should find correct bounding box (case v - {"legendPosition":true,"legendText":true}) - legend visibility interactions - for regular traces - - clicking once toggles legendonly -> true - - clicking once toggles true -> legendonly - - double-clicking isolates a visible trace  - - double-clicking an isolated trace shows all non-hidden traces - legendgroup visibility - - toggles the visibility of legendgroups as a whole - - isolates legendgroups as a whole - legend visibility toggles with groupby - - computes the initial visibility correctly - - toggles the visibility of a non-groupby trace in the presence of groupby traces - - toggles the visibility of the first group in a groupby trace - - toggles the visibility of the third group in a groupby trace - - double-clicking isolates a non-groupby trace - - double-clicking isolates a groupby trace - custom legend click/doubleclick handlers - - should call custom click handler before default handler - - should call custom doubleclick handler before default handler - - should not call default click handler if custom handler return *false* - - should not call default doubleclick handle if custom handler return *false* - legend click/doubleclick event data - - should have correct keys (base case) - - should have correct keys (groupby case) - - should have correct keys (pie case) - - dates - dateTime2ms - - should accept valid date strings - - should accept 4-digit and 2-digit numbers - - should accept Date objects within year +/-9999 - - should not accept Date objects beyond our limits - - should not accept invalid strings or other objects - - should use UTC with no timezone offset or daylight saving time - - should interpret JS dates by local time, not by its getTime() - ms2DateTime - - should report the minimum fields with nonzero values, except minutes - - should accept Date objects within year +/-9999 - - should not accept Date objects beyond our limits or other objects - - should drop the right pieces if rounding is specified - - should work right with inputs beyond our precision - world calendar inputs - - should give the right values near epoch zero - - should contain canonical ticks sundays, ranges for all calendars - - should handle Chinese intercalary months correctly - cleanDate - - should convert numbers or js Dates to strings based on local TZ - - should fail numbers & js Dates out of range, and other bad objects - - should not alter valid date strings, even to truncate them - incrementMonth - - should include Chinese intercalary months - - should increment years even over leap years - isJSDate - - should return true for any Date object but not the equivalent numbers - - should return false for anything thats not explicitly a JS Date - formatDate - - should pick a format based on tickround if no format is provided - - should accept custom formats using d3 specs even for world cals - - should not round up to 60 seconds - - should remove extra fractional second zeros - - segmentsIntersect - - catches normal intersections - - catches non-intersections - - does not consider colinear lines intersecting - - segmentDistance - - returns 0 if segments intersect or share endpoints - - works in the endpoint-to-endpoint case - - works in the endpoint-to-perpendicular case - - getVisibleSegment - - returns undefined if the path is out of bounds - - returns the whole path if it is not clipped - - works with initial clipping - - works with both ends clipped - - works with final clipping - - is open if entry/exit points match but are not the start/end points - - can be closed even without Z - - Test lib.js: - interp() should - - return 1.75 as Q1 of [1, 2, 3, 4, 5]: - - return 4.25 as Q3 of [1, 2, 3, 4, 5]: - - error if second input argument is a string: - - error if second input argument is a date: - - return the right boundary on input [-Inf, Inf]: - transposeRagged() - - should transpose and return a rectangular array - dot() - - should return null for empty or unequal-length inputs - - should dot vectors to a scalar - - should dot a vector and a matrix to a vector - - should dot two matrices to a matrix - aggNums() - - should work with 1D and 2D inputs and ignore non-numerics - mean() should - - toss out non-numerics (strings) - - toss out non-numerics (NaN) - - evaluate numbers which are passed around as text strings: - midRange() should - - should calculate the arithmetic mean of the maximum and minimum value of a given array - - toss out non-numerics (strings) - - toss out non-numerics (NaN) - - should be able to deal with array of length 1 - - should return undefined for an empty array - variance() should - - return 0 on input [2, 2, 2, 2, 2]: - - return 2/3 on input [-1, 0, 1]: - - toss out non-numerics (strings): - - toss out non-numerics (NaN): - stdev() should - - return 0 on input [2, 2, 2, 2, 2]: - - return sqrt(2/3) on input [-1, 0, 1]: - - toss out non-numerics (strings): - - toss out non-numerics (NaN): - smooth() - - should not alter the input for FWHM < 1.5 - - should preserve the length and integral even with multiple bounces - - should use a hann window and bounce - nestedProperty - - should access simple objects - - should access arrays - - should not access whole array elements with index -1 - - should access properties of objects in an array with index -1 - - should remove a property only with undefined or null - - should not remove arrays or empty objects inside container arrays - - should allow empty object sub-containers - - does not prune inside `args` arrays - - should get empty, and fail on set, with a bad input object - - should fail on a bad property string - objectFromPath - - should return an object - - should work for deep objects - - should work for arrays - - should work for any given value - expandObjectPaths - - returns the original object - - unpacks top-level paths - - unpacks recursively - - unpacks deep paths - - unpacks non-top-level deep paths - - merges dotted properties into objects - - merges objects into dotted properties - - retains the identity of nested objects - - retains the identity of nested arrays - - expands bracketed array notation - - expands nested arrays - - expands bracketed array with more nested attributes - - expands bracketed array notation without further nesting - - expands bracketed array notation with further nesting - - expands bracketed array notation with further nesting - - combines changes with single array nesting - - does not skip over array container set to null values - - expands array containers - coerce - - should set a value and return the value it sets - data_array valType - - should pass ref to out object (plain array case) - - should pass ref to out object (typed array case) - string valType - - should insert the default if input is missing, or blank with noBlank - - should always return a string for any input - coerce2 - - should set a value and return the value it sets when user input is valid - - should set and return the default if the user input is not valid - - should return false if there is no user input - info_array valType - - should insert the default if input is missing - - should dive into the items and coerce accordingly - - should coerce unexpected input as best as it can - - supports bounded freeLength attributes - - supports unbounded freeLength attributes - - supports 2D fixed-size arrays - - supports unbounded 2D freeLength arrays - - supports dimensions='1-2' with 1D items array - - supports dimensions='1-2' with single item - subplotid valtype - - should allow "slice" - - should allow "slice2" - - should allow "slice1492" - - should not allow "slice0" - - should not allow "slice1" - - should not allow "Slice2" - - should not allow "2slice" - - should not allow "2" - - should not allow "2" - - should not allow "slice2 " - - should not allow "slice2.0" - - should not allow " slice2" - - should not allow "slice 2" - - should not allow "slice01" - coerceFont - - should insert the full default if no or empty input - - should fill in defaults for bad inputs - - should pass through individual valid pieces - init2dArray - - should initialize a 2d array with the correct dimenstions - validate - - should work for valType 'data_array' where - - should work for valType 'enumerated' where - - should work for valType 'boolean' where - - should work for valType 'number' where - - should work for valType 'integer' where - - should work for valType 'string' where - - should work for valType 'color' where - - should work for valType 'colorlist' where - - should work for valType 'colorscale' where - - should work for valType 'angle' where - - should work for valType 'subplotid' where - - should work for valType 'flaglist' where - - should work for valType 'any' where - - should work for valType 'info_array' where - - should work for valType 'info_array' (freeLength case) - setCursor - - should assign cursor- class - - should assign cursor- class while present non-cursor- classes - - should update class from one cursor- class to another - - should update multiple cursor- classes - - should remove cursor- if no new class is given - overrideCursor - - should apply the new cursor(s) and revert to the original when removed - - should apply the new cursor(s) and revert to the none when removed - - should do nothing if no existing or new override is present - pushUnique - - should fill new items in array - - should ignore falsy items except 0 - - should ignore item already in array - - should recognize matching RegExps - filterUnique - - should return array containing unique values - numSeparate - - should work on numbers and strings - - should ignore years - - should work even for 4-digit integer if third argument is true - - should work for multiple thousands - - should work when there's only one separator - - should throw an error when no separator is provided - cleanNumber - - should return finite numbers untouched - - should accept number strings with arbitrary cruft on the outside - - should not accept other objects or cruft in the middle - isPlotDiv - - should work on plain objects - isD3Selection - - recognizes real and duck typed selections - - rejects non-selections - loggers - - emits one console message if apply is available - - falls back on console.log if no trace - - falls back on separate calls if no apply - - omits .log at log level 1 - - logs nothing at log level 0 - - falls back on simple log if there is no console.error - keyedContainer - with no existing container - - creates a named container only when setting a value - with no path - - adds elements just like when there is a path - - does not barf if the array is missing - with a filled container - modifying the object - - adds and updates items - - removes items - - gets items - - renames items - constructing updates - - constructs updates for addition and modification - - constructs updates for removal - - constructs updates for renaming - with custom named properties - - performs all of the operations - with nested valueName - - gets and sets values - - renames values - - constructs updates - - unsets but does not remove items with extra top-level data - - unsets but does not remove items with extra value data - - does not compress nested attributes *sigh* - templateString - - evaluates attributes - - evaluates nested properties - - evaluates array nested properties - - subtitutes multiple matches - - replaces missing matches with empty string - - replaces empty key with empty string - hovertemplateString - - evaluates attributes - - evaluates attributes with a dot in their name - - evaluates nested properties - - evaluates array nested properties - - subtitutes multiple matches - - replaces missing matches with template string - - uses the value from the first object with the specified key - - formats value using d3 mini-language - - looks for default label if no format is provided - - warns user up to 10 times if a variable cannot be found - relativeAttr() - - replaces the last part always - - ascends with ^ - - fails on ascending too far - - fails with malformed baseAttr - subplotSort - - puts xy subplots in the right order - - puts simple subplots in the right order - sort - - sorts ascending arrays ascending in N-1 calls - - sorts descending arrays ascending in N-1 calls - - sorts ascending arrays descending in N-1 calls - - sorts descending arrays descending in N-1 calls - - sorts random arrays ascending in a few more calls than bare sort - - sorts random arrays descending in a few more calls than bare sort - - supports short arrays - - still short-circuits in order with duplicates - - still short-circuits reversed with duplicates - relinkPrivateKeys - - ignores customdata and ids - - ignores any values that are === - - reinserts other private keys if they're not already there - concat - - works with multiple Arrays - - works with some empty arrays - - works with all empty arrays - - converts mismatched types to Array - - concatenates matching TypedArrays preserving type - - Queue - - should not fill in undoQueue by default - - should fill in undoQueue up to value found in *queueLength* config - - localization - - uses the input string and standard formats if no locales are provided - - contains all short and long day and month names in the default locale - - contains correct periods, dateTime, date, and time fields in the default locale - - uses the region first, then language (registered case) - - gives higher precedence to region than context vs registered - - does not generate an automatic base locale in context - - allows registering dictionary and format separately without overwriting the other - - uses number format for default but still supports explicit layout.separators - - uses extraFormat to localize the autoFormatted x-axis date tick - - updates ticks and modebar tooltips on Plotly.react - - mapbox defaults - - should fill empty containers - - should copy ref to input container in full (for updating on map move) - - should accept both string and object style - - should fill layer containers - - should skip over non-object layer containers - - should coerce 'sourcelayer' only for *vector* 'sourcetype' - - should only coerce relevant layer style attributes - - should set *layout.dragmode* to pan while zoom is not available - - mapbox credentials - - should throw error if token is not registered - - should throw error if token is invalid - - should use access token in mapbox layout options if present - - should bypass access token in mapbox layout options when config points to an Atlas server - - @noCI, mapbox plots - - should be able to toggle trace visibility - - should be able to delete and add traces - - should be able to restyle - - should be able to relayout - - should be able to relayout the map style - - should be able to add, update and remove layers - - should be able to react to layer changes - - should be able to update the access token - - should be able to update traces - - should display to hover labels on mouse over - - should respond to hover interactions by - - should respond drag / scroll / double-click interactions - - should respond to click interactions by - - @noCI, mapbox toImage - - should generate image data with global credentials - - should generate image data with config credentials - - should generate image data with layout credentials - - Test mesh3d restyle - - should clear *cauto* when restyle *cmin* and/or *cmax* - - ModeBar - createModebar - - creates a mode bar - - throws when button config does not have name - - throws when button name is not unique - - throws when button config does not have a click handler - - defaults title to name when missing - - hides title to when title is falsy but not 0 - creates a custom button - - with a Plotly icon - - with a custom icon - - with a custom icon with no transform - - with a custom icon created by a function - - with a legacy icon config - - with the spikeline icon - modeBar.removeAllButtons - - removes all mode bar buttons - modeBar.destroy - - removes the mode bar entirely - manageModeBar - - creates mode bar (unselectable cartesian version) - - creates mode bar (selectable scatter version) - - creates mode bar (selectable box version) - - creates mode bar (cartesian fixed-axes version) - - creates mode bar (gl3d version) - - creates mode bar (geo version) - - creates mode bar (geo + selected version) - - creates mode bar (mapbox version) - - creates mode bar (mapbox + selected version) - - creates mode bar (gl2d version) - - creates mode bar (pie version) - - creates mode bar (cartesian + gl3d version) - - creates mode bar (cartesian + geo unselectable version) - - creates mode bar (cartesian + geo selectable version) - - creates mode bar (cartesian + pie version) - - creates mode bar (gl3d + geo version) - - creates mode bar (un-selectable ternary version) - - creates mode bar (selectable ternary version) - - creates mode bar (ternary + cartesian version) - - creates mode bar (ternary + gl3d version) - - throws an error if modeBarButtonsToRemove isn't an array - - throws an error if modeBarButtonsToAdd isn't an array - - displays or not mode bar according to displayModeBar config arg - - updates mode bar according to displayModeBar config arg - - displays or not logo according to displaylogo config arg - - always displays the logo if watermark config arg is true - - updates mode bar buttons if plot type changes - - updates mode bar buttons if modeBarButtonsToRemove changes - - updates mode bar buttons if modeBarButtonsToAdd changes - - sets up buttons with modeBarButtonsToAdd and modeBarButtonToRemove - - sets up buttons with modeBarButtonsToAdd and modeBarButtonToRemove (2) - - sets up buttons with fully custom modeBarButtons - - sets up buttons with custom modeBarButtons + default name - - throw error when modeBarButtons contains invalid name - modebar on clicks - toImage handlers - - should use defaults - - should accept overriding defaults - cartesian handlers - buttons zoomIn2d, zoomOut2d, autoScale2d and resetScale2d - - should update axis ranges - buttons zoom2d, pan2d, select2d and lasso2d - - should update the layout dragmode - buttons hoverCompareCartesian and hoverClosestCartesian - - should update layout hovermode - button toggleSpikelines - - should not change layout hovermode - - should makes spikelines visible - - should not become disabled when hovermode is switched off closest - - should keep the state on changing the hovermode - pie handlers - buttons hoverClosestPie - - should update layout hovermode - geo handlers - buttons hoverClosestGeo - - should update layout hovermode - @noCI mapbox handlers - - button *resetViewMapbox* should reset the mapbox view attribute to their default - modebar styling - - create an associated style element and destroy it on purge - - changes icon colors - - changes active icon colors - - changes background color - - changes orientation - - page rendering - - should hide all elements if the div is hidden with visibility:hidden - - Basic parcats trace - - should create trace properly - - should compute initial model properly - - should compute initial data properly - - should compute initial fullData properly - - should compute initial model views properly - - should compute initial svg properly - - Dimension reordered parcats trace - - should compute initial model properly - - should recover from bad display order specification - - should compute initial model views properly - - should compute initial svg properly - - Drag to reordered dimensions - - should support dragging dimension label to reorder dimensions in freeform arrangement - - should support dragging dimension label to reorder dimensions in perpendicular arrangement - - should NOT support dragging dimension label to reorder dimensions in fixed arrangement - - Drag to reordered categories - - should support dragging category to reorder categories and dimensions in freeform arrangement - - should support dragging category to reorder categories only in perpendicular arrangement - - should NOT support dragging category to reorder categories or dimensions in fixed arrangement - - Click events - - should fire on category click - - should NOT fire on category click if hoverinfo is skip - - should fire on path click - - should NOT fire on path click if hoverinfo is skip - - Click events with hoveron color - - should fire on category click - - should fire on path click - - Hover events - - hover and unhover should fire on category - - hover and unhover should fire on path - - Hover events with hoveron color - - hover and unhover should fire on category hoveron color - - hover and unhover should fire on path hoveron color - - parcoords initialization tests - parcoords global defaults - - should not coerce trace opacity - - should use global font as label, tick and range font defaults - - should not coerce hoverlabel - parcoords defaults - - 'line' specification should yield a default color - - 'colorscale' should assume a default value if the 'color' array is specified - - 'domain' specification should have a default - - 'dimension' specification should have a default of an empty array - - 'dimension' should be used with default values where attributes are not provided - - 'dimension.visible' should be set to false, and other props just passed through if 'values' is not provided - - 'dimension.visible' should be set to false, and other props just passed through if 'values' is an empty array - - 'dimension.visible' should be set to false, and other props just passed through if 'values' is not an array - - 'dimension.values' should get truncated to a common shortest *nonzero* length - - cleans up constraintrange - parcoords calc - - 'colorscale' should assume a default value if the 'color' array is specified - - use a singular 'color' if it is not an array - - use a singular 'color' even if a 'colorscale' is supplied as 'color' is not an array - - parcoords edge cases - - @gl Works fine with one panel only - - @gl Do something sensible if there is no panel i.e. dimension count is less than 2 - - @gl Does not error with zero dimensions - - @gl Works with duplicate dimension labels - - @gl Works with a single line; also, use a longer color array than the number of lines - - @gl Does not raise an error with zero lines and no specified range - - @gl Works with non-finite `values` elements - - @noCI @gl Works with 60 dimensions - - @noCI @gl Truncates 60+ dimensions to 60 - - @noCI @gl Truncates dimension values to the shortest array, retaining only 3 lines - - @gl Skip dimensions which are not plain objects or whose `values` is not an array - - parcoords Lifecycle methods - - Plotly.deleteTraces with one trace removes the plot - - @gl Plotly.deleteTraces with two traces removes the deleted plot - - @gl Calling `Plotly.restyle` with zero panels left should erase lines - - @gl displays focused and context data after relayout - Having two datasets - - @gl Two subsequent calls to Plotly.plot should create two parcoords rows - - @gl Plotly.addTraces should add a new parcoords row - - @gl Plotly.restyle should update the existing parcoords row - - @gl line.color `Plotly.restyle` should change focus layer - - @gl line.color `Plotly.restyle` should not change context layer - - parcoords basic use - - @gl should create three WebGL contexts per graph - - @gl `Plotly.plot` should have proper fields on `gd.data` on initial rendering - - @gl Calling `Plotly.plot` again should add the new parcoords - - @gl Calling `Plotly.restyle` with a string path to colorscale should amend the preexisting parcoords - - @gl Calling `Plotly.restyle` for a dimension should amend the preexisting dimension - - @gl Calling `Plotly.restyle` with an object should amend the preexisting parcoords - - @gl Should emit a 'plotly_restyle' event - - @gl Should emit a 'plotly_hover' event - - @gl Calling `Plotly.relayout` with string should amend the preexisting parcoords - - @gl Calling `Plotly.relayout`with object should amend the preexisting parcoords - - @gl Calling `Plotly.animate` with patches targeting `dimensions` attributes should do the right thing - - @gl should fire *plotly_webglcontextlost* when on webgl context lost - - @noCI parcoords constraint interactions - - @gl snaps ordinal constraints - - @gl updates continuous constraints with no snap - - @gl will only select one region when multiselect is disabled - - Pie defaults - - finds the minimum length of labels & values - - allows labels or values to be missing but not both - - is marked invisible if either labels or values is empty - - does not apply layout.font.color to insidetextfont.color (it'll be contrasting instead) - - does apply textfont.color to insidetextfont.color if not set - - Pie traces - - should separate colors and opacities - - can sum values or count labels - - propagate explicit colors to the same labels in earlier OR later traces - - can use a separate pie colorway and disable extended colors - - shows multiline title in hole - - scales multiline title to fit in hole - - shows title top center if hole is zero - - shows title top center if titleposition is undefined and no hole - - shows title top center - - shows title top left - - shows title top right - - shows title bottom left - - shows title bottom center - - shows title bottom right - - does not intersect pulled slices - - correctly positions large title - - support separate stroke width values per slice - - allow to specify textfont properties per individual slice (textposition outside) - - allow to specify textfont properties per individual slice (textposition inside) - - allow to specify outsidetextfont properties per individual slice (textposition outside) - - allow to specify insidetextfont properties per individual slice (textposition inside) - - should use inside text colors contrasting to explicitly set slice colors by default - - should use inside text colors contrasting to standard slice colors by default - - should use textfont.color for inside text instead of the contrasting default - - should use matching color from textfont.color array for inside text, contrasting otherwise - - should not use layout.font.color for inside text, but a contrasting color instead - - should use matching color from insidetextfont.color array instead of the contrasting default - - should fall back to textfont scalar values if outsidetextfont value arrays don't cover all slices - - should fall back to textfont scalar values if insidetextfont value arrays don't cover all slices - - should fall back to textfont array values and layout.font scalar (except color) values for inside text - - should fall back to textfont array values and layout.font scalar values for outside text - - should fall back to layout.font scalar values for inside text (except color) if textfont value arrays don't cover all slices - - should fall back to layout.font scalar values for inside text (except color) if insidetextfont value arrays don't cover all slices - - should fall back to layout.font scalar values for outside text if textfont value arrays don't cover all slices - - should fall back to layout.font scalar values for outside text if outsidetextfont value arrays don't cover all slices - - show a user-defined title with a custom position and font - - still support the deprecated `title` structure (backwards-compatibility) - - should be able to restyle title - - should be able to restyle title despite using the deprecated attributes - - should be able to react with new text colors - - pie hovering - with hoverinfo set to none - - should fire hover event when moving from one slice to another - - should fire unhover event when the mouse moves off the graph - event data - - should contain the correct fields - - should fire hover event when moving from one slice to another - - should fire unhover event when the mouse moves off the graph - labels - - should show the default selected values - - should show the correct separators for values - - should use hovertemplate if specified - - Test event data of interactions on a pie plot: - click events - - should not be trigged when not on data points - - should contain the correct fields - - should not contain pointNumber if aggregating - modified click events - - should not be trigged when not on data points - - does not respond to right-click - hover events - - should contain the correct fields - - should not emit a hover if you're dragging - - should not emit a hover if hover is disabled - unhover events - - should contain the correct fields - - should not emit an unhover if you didn't first hover - - pie relayout - - will update colors when colorway is updated - - @noCIdep Plotly.react - - can add / remove traces - - should notice new data by ===, without layout.datarevision - - should notice new layout.datarevision - - picks up partial redraws - - picks up special dtick geo case - - picks up minimal sequence for cartesian axis range updates - - redraws annotations one at a time - - redraws images all at once - - can change config, and always redraws - - can put polar plots into staticPlot mode - - can change data in candlesticks multiple times - - can change pie aggregations - - can change scatter aggregations - - can change parcoords aggregations - - can change type with aggregations - - can change frames without redrawing - - can redraw "1" with no changes as a noop (svg mocks) - - can redraw "4" with no changes as a noop (svg mocks) - - can redraw "5" with no changes as a noop (svg mocks) - - can redraw "10" with no changes as a noop (svg mocks) - - can redraw "11" with no changes as a noop (svg mocks) - - can redraw "17" with no changes as a noop (svg mocks) - - can redraw "21" with no changes as a noop (svg mocks) - - can redraw "22" with no changes as a noop (svg mocks) - - can redraw "airfoil" with no changes as a noop (svg mocks) - - can redraw "annotations-autorange" with no changes as a noop (svg mocks) - - can redraw "axes_enumerated_ticks" with no changes as a noop (svg mocks) - - can redraw "axes_visible-false" with no changes as a noop (svg mocks) - - can redraw "bar_and_histogram" with no changes as a noop (svg mocks) - - can redraw "basic_error_bar" with no changes as a noop (svg mocks) - - can redraw "binding" with no changes as a noop (svg mocks) - - can redraw "cheater_smooth" with no changes as a noop (svg mocks) - - can redraw "finance_style" with no changes as a noop (svg mocks) - - can redraw "geo_first" with no changes as a noop (svg mocks) - - can redraw "layout_image" with no changes as a noop (svg mocks) - - can redraw "layout-colorway" with no changes as a noop (svg mocks) - - can redraw "polar_categories" with no changes as a noop (svg mocks) - - can redraw "polar_direction" with no changes as a noop (svg mocks) - - can redraw "polar_wind-rose" with no changes as a noop (svg mocks) - - can redraw "range_selector_style" with no changes as a noop (svg mocks) - - can redraw "range_slider_multiple" with no changes as a noop (svg mocks) - - can redraw "sankey_energy" with no changes as a noop (svg mocks) - - can redraw "parcats_bad-displayindex" with no changes as a noop (svg mocks) - - can redraw "scattercarpet" with no changes as a noop (svg mocks) - - can redraw "shapes" with no changes as a noop (svg mocks) - - can redraw "splom_iris" with no changes as a noop (svg mocks) - - can redraw "table_wrapped_birds" with no changes as a noop (svg mocks) - - can redraw "ternary_fill" with no changes as a noop (svg mocks) - - can redraw "text_chart_arrays" with no changes as a noop (svg mocks) - - can redraw "transforms" with no changes as a noop (svg mocks) - - can redraw "updatemenus" with no changes as a noop (svg mocks) - - can redraw "violin_side-by-side" with no changes as a noop (svg mocks) - - can redraw "world-cals" with no changes as a noop (svg mocks) - - can redraw "typed arrays" with no changes as a noop (svg mocks) - - can redraw "gl2d_heatmapgl" with no changes as a noop (gl mocks) - - can redraw "gl2d_line_dash" with no changes as a noop (gl mocks) - - can redraw "gl2d_parcoords_2" with no changes as a noop (gl mocks) - - can redraw "gl2d_pointcloud-basic" with no changes as a noop (gl mocks) - - can redraw "gl3d_annotations" with no changes as a noop (gl mocks) - - can redraw "gl3d_set-ranges" with no changes as a noop (gl mocks) - - can redraw "gl3d_world-cals" with no changes as a noop (gl mocks) - - can redraw "gl3d_cone-autorange" with no changes as a noop (gl mocks) - - can redraw "gl3d_streamtube-simple" with no changes as a noop (gl mocks) - - can redraw "glpolar_style" with no changes as a noop (gl mocks) - - @noCI can redraw "scattermapbox" with no changes as a noop (mapbpox mocks) - - @noCI tested every trace & transform type at least once - - resizing with Plotly.relayout and Plotly.react - - recalculates autoranges when height/width change - - Plotly.react and uirevision attributes - - preserves zoom and trace visibility state until uirevision changes - - moves trace visibility with uid - - controls axis edits with axis.uirevision - - respects reverting an explicit cartesian axis range to auto - - respects reverting an explicit polar axis range to auto - - controls trace and pie label visibility from legend.uirevision - - preserves groupby group visibility - - @gl preserves modebar interactions using modebar.uirevision - - preserves geo viewport changes using geo.uirevision - - @gl preserves 3d camera changes using scene.uirevision - - preserves selectedpoints using selectionrevision - - preserves selectedpoints using selectedrevision (groupby case) - - preserves polar view changes using polar.uirevision - - preserves ternary view changes using ternary.uirevision - - @gl preserves mapbox view changes using mapbox.uirevision - - preserves editable: true shape & annotation edits using editrevision - - preserves editable: true plot title and legend & colorbar positions using editrevision - - preserves editable: true name, colorbar title and parcoords constraint range via trace.uirevision - - preserves editable: true axis titles using the axis uirevisions - - Test plot api - Plotly.version - - should be the same as in the package.json - Plotly.plot - - accepts gd, data, layout, and config as args - - accepts gd and an object as args - - allows adding more frames to the initial set - - should emit afterplot event after plotting is done - Plotly.relayout - - should update the plot clipPath if the plot is resized - - sets null values to their default - - ignores undefined values - - can set items in array objects - - errors if child and parent are edited together - - can set empty text nodes - - should skip empty axis objects - - annotations, shapes and images linked to category axes should update properly on zoom/pan - - clears autorange when you modify a range or part of a range - - sets aspectmode to manual when you provide any aspectratio - - sets tickmode to linear when you edit tick0 or dtick - - updates non-auto ranges for linear/log changes - - respects reversed autorange when switching linear to log - - autoranges automatically when switching to/from any other axis type than linear <-> log - - updates autosize/width/height correctly - - passes update data back to plotly_relayout unmodified even if deprecated attributes have been used - Plotly.relayout subroutines switchboard - - should trigger replot (but not recalc) when switching into select or lasso dragmode for scattergl traces - - should trigger replot (but not recalc) when changing attributes that affect axis length/range - - should trigger minimal sequence for cartesian axis range updates - - should trigger calc on axis range updates when constraints are present - Plotly.restyle subroutines switchboard - - calls Scatter.arraysToCalcdata and Plots.style on scatter styling - - calls Bar.arraysToCalcdata and Plots.style on bar styling - - should do full replot when arrayOk attributes are updated - - should do full replot when arrayOk base attributes are updated - - should do full replot when attribute container are updated - - calls plot on xgap and ygap styling - - should clear calcdata when restyling 'zmin' and 'zmax' on contour traces - - should not clear calcdata when restyling 'zmin' and 'zmax' on heatmap traces - - ignores undefined values - - ignores invalid trace indices - - restores null values to defaults - - can target specific traces by leaving properties undefined - Plotly.restyle unmocked - - should redo auto z/contour when editing z array - - errors if child and parent are edited together - - turns off zauto when you edit zmin or zmax - - turns off cauto (autocolorscale) when you edit cmin or cmax (colorscale) - - turns off autobin when you edit bin specs - - turns off autocontour when you edit contour specs - - sets heatmap xtype/ytype when you edit x/y data or scaling params - - sets heatmap xtype/ytype even when data/fullData indices mismatch - - sets colorbar.tickmode to linear when editing colorbar.tick0/dtick - - updates colorbars when editing bar charts - - updates colorbars when editing gl3d plots - - updates box position and axis type when it falls back to name - - updates scene axis types automatically - - can drop Cartesian while constraints are active - Plotly.deleteTraces - - should throw an error when indices are omitted - - should throw an error when indices are out of bounds - - should throw an error when indices are repeated - - should work when indices are negative - - should work when multiple traces are deleted - - should work when indices are not sorted - - should work with more than 10 indices - Plotly.addTraces - - should throw an error when traces is not an object or an array of objects - - should throw an error when traces and newIndices arrays are unequal - - should throw an error when newIndices are out of bounds - - should work when newIndices is undefined - - should work when newIndices is defined - - should work when newIndices has negative indices - - should work when newIndices is an integer - - should work when adding an existing trace - - should work when duplicating the existing data - Plotly.moveTraces should - - throw an error when index arrays are unequal - - throw an error when gd.data isn't an array. - - thow an error when a current index is out of bounds - - thow an error when a new index is out of bounds - - thow an error when current indices are repeated - - thow an error when new indices are repeated - - accept integers in place of arrays - - handle unsorted currentIndices - - work when newIndices are undefined. - - accept negative indices. - Plotly.extendTraces / Plotly.prependTraces - - should throw an error when gd.data isn't an array. - - should throw an error when update is not an object - - should throw an error when indices are omitted - - should throw an error when a current index is out of bounds - - should not throw an error when negative index wraps to positive - - should throw an error when number of Indices does not match Update arrays - - should throw an error when maxPoints is an Object but does not match Update - - should throw an error when update keys mismatch trace keys - - should extend traces with update keys - - should extend and window traces with update keys - - should extend and window traces with update keys - - should extend and window traces using full maxPoint object - - should truncate arrays when maxPoints is zero - - prepend is the inverse of extend - no maxPoints - - extend is the inverse of prepend - no maxPoints - - prepend is the inverse of extend - with maxPoints - - should throw when trying to extend a plain array with a typed array - - should throw when trying to extend a typed array with a plain array - - should extend traces with update keys (typed array case) - should extend/prepend and window traces with update keys linked - - - extend no maxp - - - extend maxp === insert.length - - - extend maxp < insert.length - - - extend maxp > insert.length - - - extend maxp === 0 - - - prepend no maxp - - - prepend maxp === insert.length - - - prepend maxp < insert.length - - - prepend maxp > insert.length - - - prepend maxp === 0 - Plotly.purge - - should return the graph div in its original state - Plotly.redraw - -  - cleanData & cleanLayout - - should rename 'YIGnBu' colorscales YlGnBu (2dMap case) - - should rename 'YIGnBu' colorscales YlGnBu (markerColorscale case) - - should rename 'YIOrRd' colorscales YlOrRd (2dMap case) - - should rename 'YIOrRd' colorscales YlOrRd (markerColorscale case) - - should rename 'highlightColor' to 'highlightcolor') - - should rename 'highlightWidth' to 'highlightwidth') - - should rename *filtersrc* to *target* in filter transforms - - should rename *calendar* to *valuecalendar* in filter transforms - - should cleanup annotations / shapes refs - - removes direction names and showlegend from finance traces - Plotly.newPlot - - should respect layout.width and layout.height - Plotly.update should - - call doTraceStyle on trace style updates - - clear calcdata on data updates - - clear calcdata on data + axis updates w/o extending current gd.data - - call doLegend on legend updates - - call layoutReplot when adding update menu - - call doModeBar when updating 'dragmode' - - ignores invalid trace indices - - plot_api helpers - hasParent - - does not match the attribute itself or other related non-parent attributes - - is false when called on a top-level attribute - - matches any kind of parent - - plot_api edit_types - - initializes flags with all false - - makes no changes if editType is not included - - gets updates from the outer object and ignores nested items - - Test plot structure - cartesian plots - scatter traces - - has one *subplot xy* node - - has four clip paths - - has one dragger group - - has one *scatterlayer* node - - has as many *trace scatter* nodes as there are traces - - has as many *point* nodes as there are traces - - has the correct name spaces - - should be able to get deleted - - should restore layout axes when they get deleted - contour/heatmap traces - initial structure - - has four *subplot* nodes - - has four heatmap image nodes - - has two contour nodes - - has one colorbar nodes - structure after restyle - - has four *subplot* nodes - - has two heatmap image nodes - - has two contour nodes - - has one scatter node - - has no colorbar node - structure after deleteTraces - - should be removed of traces in sequence - pie traces - - has as many *slice* nodes as there are pie items - - has the correct name spaces - - should be able to get deleted - - should be able to be restyled to a bar chart and back - geo plots - - has as many *choroplethlocation* nodes as there are choropleth locations - - has as many *point* nodes as there are marker points - - has the correct name spaces - - plot svg clip paths - - should set clip path url to ids (base case) - - should set clip path url to ids appended to window url - - Plotly.___ methods - Plotly.plot promise - - should be returned with the graph div as an argument - - should be rejected when plotly_beforeplot event handlers return false - - should reject the promise when graph is being dragged - Plotly.redraw promise - - should be returned with the graph div as an argument - Plotly.newPlot promise - - should be returned with the graph div as an argument - Plotly.extendTraces promise - - should be returned with the graph div as an argument - Plotly.prependTraces promise - - should be returned with the graph div as an argument - Plotly.addTraces promise - - should be returned with the graph div as an argument - Plotly.deleteTraces promise - - should be returned with the graph div as an argument - - should be returned with the graph div as an argument - Plotly.moveTraces promise - - should be returned with the graph div as an argument - Plotly.restyle promise - - should be returned with the graph div as an argument - - should be rejected when the attribute is missing - Plotly.relayout promise - - should be returned with the graph div as an argument - - should be returned with the graph div as an argument - - should be returned with the graph div unchanged when the framework is polar - - should be rejected when the attribute is missing - Plotly.Plots.resize promise - - should return a resolved promise of the gd - - should return a rejected promise if gd is hidden - - should return a rejected promise if gd is detached from the DOM - - should return a resolved promise if plot has been purged and there is nothing to resize - - should return a resolved promise if plot has been hidden and gd is hidden - - errors before even generating a promise if gd is not defined - - Test Plots - Plots.supplyDefaults - - should not throw an error when gd is a plain object - - should relink private keys - - should include the correct reference to user data - - should call sanitizeMargins only once when both width and height are defined - - should call sanitizeMargins only once when autosize is false - - should call sanitizeMargins only once when autosize is true - Plots.supplyLayoutGlobalDefaults should - - should sanitize margins when they are wider than the plot - - should sanitize margins when they are taller than the plot - Plots.supplyTraceDefaults - should coerce hoverinfo - - without *name* for single-trace graphs by default - - with *name* for multi-trace graphs by default - - only if hovertemplate is not defined - Plots.supplyTransformDefaults - - should accept an empty layout when transforms present - Plots.resize: - on graph div DOM style changes - - should resize the plot clip - - should resize the main svgs - - should update the axis scales - - should allow resizing by plot ID - on styled graph div - - should sanitize margins - Plots.purge - - should unset everything in the gd except _context - extendObjectWithContainers - - extend each container items - - clears container items when applying null src items - - clears container applying null src - Plots.graphJson - - should serialize data, layout and frames - - should convert typed arrays to regular arrays - getSubplotCalcData - - should extract calcdata traces associated with subplot (1) - - should extract calcdata traces associated with subplot (2) - - should return [] when no calcdata traces where found - - should return [] when subplot type is invalid - Plots.generalUpdatePerTraceModule - - should update subplot trace hash and call module plot method with correct calcdata traces - - should handle cases when module plot is not set (geo case) - - should handle cases when module plot is not set (ternary case) - Plots.style - - should call reused style modules only once per graph - subplot cleaning logic - - makes at least a blank cartesian subplot - - uses the first x & y axes it finds in making a blank cartesian subplot - - shows expected cartesian subplots from visible traces and components - - shows expected cartesian subplots from invisible traces and components - - ignores unused axis and subplot objects - - grids - - does not barf on invalid grid objects - - defaults to a coupled layout - - has a bigger default gap with independent layout - - can set x and y gaps and change domain - - responds to xside and yside - - places other subplots in the grid by default - - Test legacy polar plots logs: - - should log deprecation warning on legacy polar scatter traces - - should log deprecation warning on legacy polar bar traces - - should log deprecation warning on legacy area traces - - Test polar plots defaults: - - should default *radialaxis.angle* to first sector angle - - should coerce *angularaxis.thetaunit* only for linear angular axes - - should not try to autotype visible false traces - - should propagate axis *color* settings - - should default *rotation* to 90 when clockwise *direction* - - (for now) should log message when detecting *date* angular axes and fallback to *linear* - - should not coerce hoverformat on category axes - - should coerce hoverformat even for `visible: false` axes - - Test relayout on polar subplots: - - should be able to reorder axis layers when relayout'ing *layer* - - should be able to relayout axis types - - should be propagate angular settings down to tick labels - - should be able to relayout angular ticks layout - - should be able to toggle axis features - - should be able to restyle radial axis title - - should clean up its framework, clip paths and info layers when getting deleted - - should update axis ranges when extending traces - - should be able to relayout *gridshape* - - should not attempt to draw radial axis when *polar.hole* is set to 1 - - Test polar interactions: - - should trigger hover/unhover/click/doubleclick events - - @flaky should respond to drag interactions on plot area - - should response to drag interactions on radial drag area - - should response to drag interactions on inner radial drag area - - should response to drag interactions on angular drag area - should update scene during drag interactions on radial and angular drag area - - @gl - scatter marker case - - @gl - line case - - @gl - line & markers case - - @gl - gl and non-gl on same subplot case - - Test polar *gridshape linear* interactions - - should snap radial axis rotation to polygon vertex angles - - should rotate all non-symmetrical layers on angular drag - - should place zoombox handles at correct place on main drag - - polygon.tester - - should exclude points outside the bounding box - - should prepare a polygon object correctly - - should include the whole boundary, except as per omitFirstEdge - - should find only the right interior points - - polygon.isSegmentBent - - should treat any two points as straight - - should find a bent line at the right tolerance - - should treat any backward motion as bent - - polygon.filter - - should give the right result if points are provided upfront - - should give the right result if points are added one-by-one - - range selector defaults: - - should set 'visible' to false when no buttons are present - - should coerce an empty button object - - should skip over non-object buttons - - should coerce all buttons present - - should not coerce 'stepmode' and 'count', for 'step' all buttons - - should use axis and counter axis to determine 'x' and 'y' defaults (case 1 y) - - should use axis and counter axis to determine 'x' and 'y' defaults (case multi y) - - should not allow month/year todate with calendars other than Gregorian - - range selector getUpdateObject: - - should return update object (1 month backward case) - - should return update object (3 months backward case) - - should return update object (6 months backward case) - - should return update object (5 months to-date case) - - should return update object (1 year to-date case) - - should return update object (10 year to-date case) - - should return update object (1 year backward case) - - should return update object (reset case) - - should return update object (10 day backward case) - - should return update object (5 hour backward case) - - should return update object (15 minute backward case) - - should return update object (10 second backward case) - - should return update object (12 hour to-date case) - - should return update object (20 minute to-date case) - - should return update object (2 second to-date case) - - should return update object with correct axis names - - range selector interactions: - - should display the correct nodes and can hide buttons - - should be able to be removed by `relayout` - - should be able to remove button(s) on `relayout` - - should be able to change its style on `relayout` - - should update range and active button when clicked - - should change color on mouse over - - should update is active relayout calls - - range selector automargin - - updates automargin when hiding, showing, or moving - - Visible rangesliders - - should be added to the DOM when specified - - should have the correct style and size and be able to update these - - should react to resizing the minimum handle - - should react to resizing the maximum handle - - should react to moving the slidebox left to right - - should react to moving the slidebox right to left - - should resize the main plot when rangeslider has moved - - should relayout with relayout "array syntax" - - should relayout with relayout "element syntax" - - should relayout with style options - - should relayout on size / domain udpate - - Rangeslider visibility property - - should not add the slider to the DOM by default - - should add the slider if rangeslider is set to anything - - should add the slider if visible changed to `true` - - should remove the slider if changed to `false` or `undefined` - - should clear traces in range plot when needed - - Rangeslider handleDefaults function - - should not coerce anything if rangeslider isn't set - - should not mutate layoutIn - - should set defaults if rangeslider is set to anything truthy - - should set defaults if rangeslider is requested - - should set defaults if rangeslider.visible is true - - should return early if *visible: false* - - should set defaults if properties are invalid - - should set autorange to true when range input is invalid - - should default 'bgcolor' to layout 'plot_bgcolor' - - Rangeslider yaxis options - - should be set one yaxis is present - - should set multiple yaxis with data are present - - should honor user settings - - Rangeslider anchored axes fixedrange - - should default to *true* when range slider is visible - - should honor user settings - - rangesliders in general - - should plot when only x data is provided - - should plot when only y data is provided - - should expand its range in accordance with new data arrays - - should not expand its range when range slider range is set - - should configure yaxis opts on relayout - - should update rangeslider x/y ranges when data changes even if main axes are not autoranged - - should be able to turn on rangeslider x/y autorange if initially specified - - should be able to turn on rangeslider x/y autorange implicitly by deleting x range - - Test Register: - Plotly.register - - should throw an error when no argument is given - - should work with a single module - - should work with an array of modules - - should throw an error when an invalid module is given - - should throw when if transform module is invalid (1) - - should throw when if transform module is invalid (2) - - should not throw when transform module is valid (1) - - should not throw when transform module is valid (2) - - should not throw when transform module is valid (3) - - should not reregister a trace module - Registry.getModule & Registry.traceIs: - - getModule should find the module for a type - - getModule should return false for types it doesn't know - - traceIs should find the categories for this type - - traceIs should not find other real categories - - traceIs should log on unrecognized trace typed - Registry.getTransformIndices & Registry.hasTransform: - - getTransformIndices returns an empty array if no transforms present - - getTransformIndices returns an empty array if none present - - getTransformIndices returns a array of indices if transform is present - - hasTransform returns false if no transforms present - - hasTransform returns false if none present - - hasTransform returns true if transform is present - - sankey tests - don't remove nodes if encountering no circularity - - removing a single self-pointing node - No warnings for missing nodes - - some nodes are not linked - sankey global defaults - - should not coerce trace opacity - sankey defaults - - 'Sankey' specification should have proper arrays where mandatory - - 'Sankey' specification should have proper types - - 'Sankey' layout dependent specification should have proper types - - 'line' specifications should yield the default values - - fills 'node' colors if not specified - - respects layout.colorway - - does not fill 'link' labels even if not specified - - preserves 'link' labels if specified - sankey calc - remove nodes if encountering circularity - - removing a single self-pointing node - - removing everything if detecting a circle - lifecycle methods - - Plotly.deleteTraces with two traces removes the deleted plot - - Plotly.plot does not show Sankey if 'visible' is false - - 'node' remains visible even if 'value' is very low - Test hover/click interactions: - - should show the correct hover labels - - should show the correct hover labels with the style provided in template - - should show the correct hover labels even if there is no link.label supplied - - should not show any labels if hovermode is false - - should not show node labels if node.hoverinfo is skip - - should not show node labels if node.hoverinfo is none - - should not show link labels if link.hoverinfo is skip - - should not show link labels if link.hoverinfo is none - - should not show labels if trace hoverinfo is skip and (node|link).hoverinfo is undefined - - should not show labels if trace hoverinfo is none and (node|link).hoverinfo is undefined - - should not show link labels if link.hoverinfo is skip - Test hover/click event data: - - should output correct click event data - - should output correct hover/unhover event data - - should not output hover/unhover event data when hovermode is false - - should not output hover/unhover event data when trace hoverinfo is skip - - should not output hover/unhover event data when node.hoverinfo is skip - - should not output hover/unhover event data when link.hoverinfo is skip - - emits a warning if node.pad is too large - - Scatter3D defaults - - should make marker.color inherit from line.color (scalar case) - - should make marker.color inherit from line.color (array case) - - should make line.color inherit from marker.color if scalar) - - should not make line.color inherit from marker.color if array - - should inherit layout.calendar - - should take its own calendars - - Test scatter - supplyDefaults - - should set visible to false when x and y are empty - - should set visible to false when x or y is empty - - should be visible using x0/dx if x is missing completely but y is present - - should be visible using y0/dy if y is missing completely but x is present - - should correctly assign 'hoveron' default - - should inherit layout.calendar - - should take its own calendars - selected / unselected attribute containers - - should fill in [un]selected.marker.opacity default when no other [un]selected is set - - should not fill in [un]selected.marker.opacity default when some other [un]selected is set - isBubble - - should return true when marker.size is an Array - - should return false when marker.size is an number - - should return false when marker.size is not defined - - should return false when marker is not defined - makeBubbleSizeFn - - should scale w.r.t. bubble diameter when sizemode=diameter - - should scale w.r.t. bubble area when sizemode=area - - should adjust scaling according to sizeref - - should adjust the small sizes according to sizemin - linePoints - - should pass along well-separated non-linear points - - should collapse straight lines to just their endpoints - - should not collapse straight lines if simplify is false - - should not collapse duplicate end points if simplify is false - - should separate out blanks, unless connectgaps is true - - should collapse a vertical cluster into 4 points - - should collapse a horizontal cluster into 4 points - - should use lineWidth to determine whether a cluster counts - - should clip extreme points without changing on-screen paths - - works when far off-screen points cross the viewport - - end-to-end scatter tests - - should add a plotly-customdata class to points with custom data - - adds "textpoint" class to scatter text points - - should remove all point and text nodes on blank data - - should keep layering correct as mode & fill change - - should reorder point and text nodes even when linked to ids (shuffle case) - - should reorder point and text nodes even when linked to ids (add/remove case) - - should smoothly add/remove nodes tags with *ids* during animations - - animates fillcolor - - clears fills tonext when either trace is emptied out - - correctly autoranges fill tonext traces across multiple subplots - - correctly autoranges fill tonext traces with only one point - - should work with typed arrays - - should update axis range accordingly on marker.size edits - - should update axis range according to visible edits - - should be able to start from visible:false - - should not error out when segment-less marker-less fill traces - - stacked area - - updates ranges correctly when traces are toggled - - can add/delete stack groups - - does not stack on date axes - - does not stack on category axes - - scatter hoverPoints - - should show 'hovertext' items when present, 'text' if not - - Test Scatter.style - - should style selected point marker opacity correctly - - should style selected point marker color correctly - - should style selected point marker size correctly - - should style selected point textfont correctly - - Test scatter *clipnaxis*: - - should show/hide point/text/errorbars in clipped and non-clipped layers - - event data - - should contain the correct fields - - Test scattergeo defaults - - should not slice lat if it it longer than lon - - should slice lon if it it longer than lat - - should not coerce lat and lon if locations is valid - - should make trace invisible if lon or lat is omitted and locations not given - - Test scattergeo calc - - should place lon/lat data in lonlat pairs - - should coerce numeric strings lon/lat data into numbers - - should set non-numeric values lon/lat pairs to BADNUM - - should fill array text (base case) - - should fill array text (invalid entry case) - - should fill array marker attributes (base case) - - should fill array marker attributes (invalid scale case) - - should fill marker attributes (symbol case) - - Test scattergeo hover - - should generate hover label info (base case) - - should generate hover label info (with trace name) - - should generate hover label info ('text' single value case) - - should generate hover label info ('hovertext' single value case) - - should generate hover label info ('hovertext' array case) - - should generate hover label with custom styling - - should generate hover label with arrayOk 'hoverinfo' settings - - scattergeo drawing - - should not throw an error with bad locations - - preserves order after hide/show - - scattermapbox defaults - - should not truncate 'lon' if longer than 'lat' - - should not truncate 'lat' if longer than 'lon' - - should set 'visible' to false if 'lat' and/or 'lon' has zero length - - should set 'marker.color' and 'marker.size' to first item if symbol is set to 'circle' - - should not fill *marker.line* in fullData while is not available - - scattermapbox convert - - should generate correct output for markers + circle bubbles traces - - should fill circle-opacity correctly - - should fill circle props correctly during selections - - should generate correct output for fill + markers + lines traces - - should generate correct output for markers + non-circle traces - - should generate correct output for text + lines traces - - should generate correct output for lines traces with trailing gaps - - should correctly convert 'textposition' to 'text-anchor' and 'text-offset' - - should generate correct output for markers + circle bubbles traces with repeated values - - should generate correct output for traces with only blank points - - @noCI scattermapbox hover - - should generate hover label info (base case) - - should generate hover label info (lon > 180 case) - - should skip over blank and non-string text items - - should generate hover label info (positive winding case) - - should generate hover label info (negative winding case) - - should generate hover label info (hoverinfo: 'lon' case) - - should generate hover label info (hoverinfo: 'lat' case) - - should generate hover label info (hoverinfo: 'text' + 'text' array case) - - should generate hover label info (hoverinfo: 'text' + 'hovertext' array case) - - should generate hover label ('marker.color' array case) - - should generate hover label ('marker.color' w/ colorscale case) - - should generate hover label ('hoverinfo' array case) - - @noCI Test plotly events on a scattermapbox plot: - click events - - should not be trigged when not on data points - - should contain the correct fields - modified click events - - should not be trigged when not on data points - - does not register right-clicks - hover events - - should contain the correct fields - unhover events - - should contain the correct fields - - Test scatterpolar trace defaults: - - should not truncate *r* when longer than *theta* - - should not truncate *theta* when longer than *r* - - should coerce *theta0* and *dtheta* when *theta* is not set - - should coerce *r0* and *dr* when *r* is not set - - Test scatterpolar hover: - - should generate correct hover labels base - - should generate correct hover labels (no labels - out of sector) - - should generate correct hover labels on a `thetaunit: radians` polar subplot - - should generate correct hover labels on log radial axis - - should generate correct hover labels on fills - - should generate correct hover labels on category axes - - should generate correct hover labels on a subplot with hole>0 - - should generate correct hover labels with custom text scalar - - should generate correct hover labels with custom text array - - Test scatterpolargl hover: - - should generate correct hover labels base - - should generate correct hover labels (no labels - out of sector) - - should generate correct hover labels on a `thetaunit: radians` polar subplot - - should generate correct hover labels on log radial axis - - should generate correct hover labels on category axes - - should generate correct hover labels with custom text scalar - - should generate correct hover labels with custom text array - - Test scatterpolargl interactions: - - @gl should be able to toggle from svg to gl - - @gl should be able to toggle from svg to gl (on graph with scattergl subplot) - - Test scatterpolargl autorange: - should return the same value as SVG scatter for ~small~ data - - @gl - case markers - - @gl - case lines - should return the approximative values for ~big~ data - - @gl - case scalar marker.size - - @gl - case array marker.size - - @gl - case mode:lines - - scatterternary defaults - - should allow one of 'a', 'b' or 'c' to be missing (base case) - - should allow one of 'a', 'b' or 'c' to be missing ('c' is missing case) - - should allow one of 'a', 'b' or 'c' to be missing ('b' is missing case) - - should allow one of 'a', 'b' or 'c' to be missing ('a' is missing case) - - should allow one of 'a', 'b' or 'c' to be missing ('b and 'c' are missing case) - - should allow one of 'a', 'b' or 'c' to be missing ('a and 'c' are missing case) - - should allow one of 'a', 'b' or 'c' to be missing ('a and 'b' are missing case) - - should allow one of 'a', 'b' or 'c' to be missing (all are missing case) - - should not truncate data arrays to the same length ('c' is shortest case) - - should not truncate data arrays to the same length ('a' is shortest case) - - should not truncate data arrays to the same length ('a' is shortest case) - - is set visible: false if a, b, or c is empty - - should include 'name' in 'hoverinfo' default if multi trace graph - - should not include 'name' in 'hoverinfo' default if single trace graph - - should correctly assign 'hoveron' default - - scatterternary calc - - should fill in missing component (case 'c') - - should fill in missing component (case 'b') - - should fill in missing component (case 'a') - - should skip over non-numeric values - - scatterternary plot and hover - - should put scatterternary trace in 'frontplot' node - - should generate one line path per trace - - should generate as many points as there are data points - - scatterternary hover - - should generate extra text field on hover - - Test scatterternary *cliponaxis* - - should show/hide point/text/errorbars in clipped and non-clipped layers - - Test search.js: - findBin - - should work on ascending arrays - - should work on decending arrays - - should treat a length-1 array as ascending - - Click-to-select - - selects a single data point when being clicked - clears entire selection when the last selected data point - - @flaky is clicked - - @flaky is clicked while add/subtract modifier keys are active - - @flaky cleanly clears and starts selections although add/subtract mode on - - @flaky supports adding to an existing selection - - @flaky supports subtracting from an existing selection - - @flaky can be used interchangeably with lasso/box select - - @gl works in a multi-trace plot - - @flaky is supported in pan/zoom mode - - @flaky retains selected points when switching between pan and zoom mode - - @gl is supported by scattergl in pan/zoom mode - - @flaky deals correctly with histogram's binning in the persistent selection case - - @flaky ignores clicks on boxes in a box trace type - is disabled when clickmode does not include 'select' - - @flaky and dragmode is select - - @flaky and dragmode is lasso - - @flaky and dragmode is pan - - @flaky and dragmode is zoom - is supported by - - @flaky trace type histrogram - - @flaky trace type box - - @flaky trace type violin - - @flaky trace type ohlc - - @flaky trace type candlestick - - @flaky trace type choropleth - - @flaky trace type scattergeo - - @flaky trace type scatterternary - - @flaky trace type scattercarpet - - @flaky trace type scatterpolar - - @noCI @gl trace type scatterpolargl - - @noCI @gl trace type splom - - @noCI @gl trace type scattermapbox - triggers 'plotly_selected' before 'plotly_click' - - @flaky for base plot cartesian - - @flaky for base plot geo - - @flaky for base plot ternary - - @flaky for base plot polar - - @noCI for base plot mapbox - - Test select box and lasso in general: - select events - - @flaky should trigger selecting/selected/deselect events - - @flaky should handle add/sub selection - lasso events - - @flaky should trigger selecting/selected/deselect events - - @flaky should set selected points in graph data - - @flaky should set selected points in full data - - @flaky should trigger selecting/selected/deselect events for touches - - @flaky should skip over non-visible traces - - @flaky should skip over BADNUM items - - @flaky scroll zoom should clear selection regions - - @flaky should select the right data with the corresponding select direction - - @flaky should cleanly clear and restart selections on double click when add/subtract mode on - - @flaky should clear selected points on double click only on pan/lasso modes - - @flaky should remember selection polygons from previous select/lasso mode - - Test select box and lasso per trace: - - @flaky should work on scatterternary traces - - @flaky should work on scattercarpet traces - - @noCI @flaky should work on scattermapbox traces - - @flaky should work on scattergeo traces - - @flaky should work on scatterpolar traces - - @flaky should work on barpolar traces - - @flaky should work on choropleth traces - - @flaky should work for bar traces - - @flaky should work for date/category traces - - @flaky should work for histogram traces - - @flaky should work for box traces - - @flaky should work for violin traces - - @flaky should work for ohlc traces - - @flaky should work for candlestick traces - - @flaky should work on traces with enabled transforms - - @flaky should work on scatter/bar traces with text nodes - - Test that selections persist: - - should persist for scatter - - should persist for box - - should persist for histogram - - Test shapes defaults: - - should skip non-array containers - - should make non-object item visible: false - - should provide the right defaults on all axis types - - Test shapes: - *shapeLowerLayer* - - has one node - - has as many *path* nodes as shapes in the lower layer - - should be able to get relayout - *shapeUpperLayer* - - has one node - - has as many *path* nodes as shapes in the upper layer - - should be able to get relayout - each *subplot* - - has one *shapelayer* - - has as many *path* nodes as shapes in the subplot - - should be able to get relayout - Plotly.relayout - - should be able to add a shape - - should be able to remove a shape - - should be able to remove all shapes - - can replace the shapes array - - should be able to update a shape layer - - shapes axis reference changes - - draws the right number of objects and updates clip-path correctly - - shapes edge cases - - falls back on shapeLowerLayer for below missing subplots - - shapes autosize - - should adapt to relayout calls - - should propagate axis autorange changes when axis ranges are set - - Test shapes: a plot with shapes and an overlaid axis - - should not throw an exception - - A path shape sized relative to data - - is expanding an auto-ranging axes - - A fixed size path shape - - is defined in pixel - - is expanding auto-ranging axes - - is being rendered correctly when linked to a date axis - - keeps its dimensions when plot is being resized - - is draggable - - being sized relative to data horizontally is getting narrower when being dragged to expand the x-axis - - being sized relative to data vertically is getting lower when being dragged to expand the y-axis - - A fixed size shape - - can be positioned relative to data - - can be positioned relative to the plotting area - - can be sized by pixel horizontally and relative to data vertically - - can be sized relative to data vertically and by pixel horizontally - - is being rendered correctly when linked to a date axis - - keeps its dimensions when plot is being resized - - is draggable - - being sized relative to data horizontally is getting narrower when being dragged to expand the x-axis - - being sized relative to data vertically is getting lower when being dragged to expand the y-axis - of type rect can be shrunken - - @flaky over direction n - - @flaky over direction s - - @flaky over direction w - - @flaky over direction e - - @flaky over direction nw - - @flaky over direction se - - @flaky over direction ne - - @flaky over direction sw - of type rect can be enlarged - - @flaky over direction n - - @flaky over direction s - - @flaky over direction w - - @flaky over direction e - - @flaky over direction nw - - @flaky over direction se - - @flaky over direction ne - - @flaky over direction sw - of type circle can be shrunken - - @flaky over direction n - - @flaky over direction s - - @flaky over direction w - - @flaky over direction e - - @flaky over direction nw - - @flaky over direction se - - @flaky over direction ne - - @flaky over direction sw - of type circle can be enlarged - - @flaky over direction n - - @flaky over direction s - - @flaky over direction w - - @flaky over direction e - - @flaky over direction nw - - @flaky over direction se - - @flaky over direction ne - - @flaky over direction sw - of type line - - @flaky can be moved by dragging the middle - - @flaky can be resized by dragging the start point - - @flaky can be resized by dragging the end point - is expanding an auto-ranging x-axis - to the left - - and is fully visible when being a rect with x0,x1=[5,25] - - and is fully visible when being a rect with x0,x1=[5,-25] - - and is fully visible when being a rect with x0,x1=[-5,25] - - and is fully visible when being a rect with x0,x1=[-5,-25] - - and is fully visible when being a circle with x0,x1=[5,25] - - and is fully visible when being a circle with x0,x1=[5,-25] - - and is fully visible when being a circle with x0,x1=[-5,25] - - and is fully visible when being a circle with x0,x1=[-5,-25] - - and is fully visible when being a line with x0,x1=[5,25] - - and is fully visible when being a line with x0,x1=[5,-25] - - and is fully visible when being a line with x0,x1=[-5,25] - - and is fully visible when being a line with x0,x1=[-5,-25] - to the right - - and is fully visible when being a rect with x0,x1=[5,25] - - and is fully visible when being a rect with x0,x1=[5,-25] - - and is fully visible when being a rect with x0,x1=[-5,25] - - and is fully visible when being a rect with x0,x1=[-5,-25] - - and is fully visible when being a circle with x0,x1=[5,25] - - and is fully visible when being a circle with x0,x1=[5,-25] - - and is fully visible when being a circle with x0,x1=[-5,25] - - and is fully visible when being a circle with x0,x1=[-5,-25] - - and is fully visible when being a line with x0,x1=[5,25] - - and is fully visible when being a line with x0,x1=[5,-25] - - and is fully visible when being a line with x0,x1=[-5,25] - - and is fully visible when being a line with x0,x1=[-5,-25] - is expanding an auto-ranging y-axis - to the bottom - - and is fully visible when being a rect with y0,y1=[5,25] - - and is fully visible when being a rect with y0,y1=[5,-25] - - and is fully visible when being a rect with y0,y1=[-5,25] - - and is fully visible when being a rect with y0,y1=[-5,-25] - - and is fully visible when being a circle with y0,y1=[5,25] - - and is fully visible when being a circle with y0,y1=[5,-25] - - and is fully visible when being a circle with y0,y1=[-5,25] - - and is fully visible when being a circle with y0,y1=[-5,-25] - - and is fully visible when being a line with y0,y1=[5,25] - - and is fully visible when being a line with y0,y1=[5,-25] - - and is fully visible when being a line with y0,y1=[-5,25] - - and is fully visible when being a line with y0,y1=[-5,-25] - to the top - - and is fully visible when being a rect with y0,y1=[5,25] - - and is fully visible when being a rect with y0,y1=[5,-25] - - and is fully visible when being a rect with y0,y1=[-5,25] - - and is fully visible when being a rect with y0,y1=[-5,-25] - - and is fully visible when being a circle with y0,y1=[5,25] - - and is fully visible when being a circle with y0,y1=[5,-25] - - and is fully visible when being a circle with y0,y1=[-5,25] - - and is fully visible when being a circle with y0,y1=[-5,-25] - - and is fully visible when being a line with y0,y1=[5,25] - - and is fully visible when being a line with y0,y1=[5,-25] - - and is fully visible when being a line with y0,y1=[-5,25] - - and is fully visible when being a line with y0,y1=[-5,-25] - - Test shapes - - @flaky linked to paper should be draggable - - @flaky linked to linear and log axes should be draggable - - @flaky linked to date and category axes should be draggable - - @flaky linked to paper should be resizeable over direction n - - @flaky linked to paper should be resizeable over direction s - - @flaky linked to paper should be resizeable over direction w - - @flaky linked to paper should be resizeable over direction e - - @flaky linked to paper should be resizeable over direction nw - - @flaky linked to paper should be resizeable over direction se - - @flaky linked to paper should be resizeable over direction ne - - @flaky linked to paper should be resizeable over direction sw - - @flaky linked to linear and log axes should be resizeable over direction n - - @flaky linked to linear and log axes should be resizeable over direction s - - @flaky linked to linear and log axes should be resizeable over direction w - - @flaky linked to linear and log axes should be resizeable over direction e - - @flaky linked to linear and log axes should be resizeable over direction nw - - @flaky linked to linear and log axes should be resizeable over direction se - - @flaky linked to linear and log axes should be resizeable over direction ne - - @flaky linked to linear and log axes should be resizeable over direction sw - - @flaky linked to date and category axes should be resizeable over direction n - - @flaky linked to date and category axes should be resizeable over direction s - - @flaky linked to date and category axes should be resizeable over direction w - - @flaky linked to date and category axes should be resizeable over direction e - - @flaky linked to date and category axes should be resizeable over direction nw - - @flaky linked to date and category axes should be resizeable over direction se - - @flaky linked to date and category axes should be resizeable over direction ne - - @flaky linked to date and category axes should be resizeable over direction sw - - @flaky Line shape linked to paper should be resizable by dragging the start point - - @flaky Line shape linked to paper should be resizable by dragging the end point - - @flaky Line shape linked to linear and log axes should be resizable by dragging the start point - - @flaky Line shape linked to linear and log axes should be resizable by dragging the end point - - @flaky Line shape linked to date and category axes should be resizable by dragging the start point - - @flaky Line shape linked to date and category axes should be resizable by dragging the end point - - sliders defaults - - should set 'visible' to false when no steps are present - - should not coerce currentvalue defaults unless currentvalue is visible - - should set the default values equal to the labels - - should skip over non-object steps - - should skip over steps with non-array 'args' field - - allows the `skip` method - - should keep ref to input update menu container - - sliders initialization - - does not set active on initial plot - - ugly internal manipulation of steps - - adds and removes slider steps gracefully - - sliders interactions - - positions sliders repeatably when they push margins - - should draw only visible sliders - - only draws visible steps - - should respond to mouse clicks - - should issue events on interaction - - Plotly.Snapshot - clone - - should create a themeTile, with width certain things stripped out - - should create a thumbnail for image export to the filewell - - should create a 3D thumbnail with limited attributes - - should create a custom sized Tile based on options - - should not touch the data or layout if you do not specify an existing tileClass - - should set the background parameter appropriately - toSVG - - should not return any nested svg tags of plots - - should not return any nested svg tags of annotations - - should force *visibility: visible* for text elements with *visibility: inherit* - should handle quoted style properties - - - marker-gradient case - - - legend with contour items case - - - colorbar case - - should adapt *viewBox* attribute under *scale* option - - Test splom trace defaults: - - should set `visible: false` dimensions-less traces - - should set `visible: false` to traces with showupperhalf, showlowerhalf, and diagonal.visible false - - still coerces partial visibilities even if all are false with transforms - - should set `visible: false` to values-less dimensions - - should work with only one dimensions - - should set `grid.xaxes` and `grid.yaxes` default using the number of dimensions - - should set `grid.xaxes` and `grid.yaxes` default using the number of dimensions (no upper half, no diagonal case) - - should set `grid.xaxes` and `grid.yaxes` default using the number of dimensions (no lower half, no diagonal case) - - should set `grid.xaxes` and `grid.yaxes` default using the number of dimensions (no upper half, no diagonal, set x|y axes case) - - should set `grid.xaxes` and `grid.yaxes` default using the number of dimensions (no lower half, no diagonal, set x|y axes case) - - should use special `grid.xside` and `grid.yside` defaults on splom w/o lower half generated grids - - should honor `grid.xaxes` and `grid.yaxes` settings - - should honor xaxis and yaxis settings - - should set axis title default using dimensions *label* - - should set axis title default using dimensions *label* (even visible false dimensions) - - should ignore (x|y)axes values beyond dimensions length - - should ignore (x|y)axes values beyond dimensions length (case 2) - - should ignore dimensions beyond (x|y)axes length - - should lead to correct axis auto type value - - should lead to correct axis auto type value (case 2) - - axis type in layout takes precedence over dimensions setting - - axis type setting should be skipped when dimension is not visible - - Test splom trace calc step: - - should skip dimensions with conflicting axis types - - Test splom interactions: - - @gl should destroy gl objects on Plots.cleanPlot - - @gl when hasOnlyLargeSploms, should create correct regl-line2d data for grid - - @gl should update properly in-and-out of hasOnlyLargeSploms regime - - @gl should correctly move axis layers when relayouting *grid.(x|y)side* - - @gl should work with typed arrays - - @gl should toggle trace correctly - - @noCI @gl should clear graph and replot when canvas and WebGL context dimensions do not match - - @gl should update axis arrangement on show(upper|lower)half + diagonal.visible restyles - - @gl should not fail when editing graph with visible:false traces - - Test splom update switchboard: - - @gl should trigger minimal sequence for axis range updates (large splom case) - - @gl should trigger minimal sequence for marker style updates - - Test splom hover: - - @gl should generate correct hover labels basic - - @gl should generate correct hover labels hovermode closest - - @gl should generate correct hover labels skipping over visible false dims - - @gl should generate correct hover labels on log axes - - @gl should generate correct hover labels on date axes - - Test splom drag: - - @gl should update scattermatrix ranges on pan - - Test splom select: - - @gl should emit correct event data and draw selection outlines - - @gl should redraw splom traces before scattergl trace (if any) - - @noCI @gl should behave correctly during select->dblclick->pan scenarios - - Test streamtube defaults - - should not set `visible: false` for traces with x,y,z,u,v,w arrays - - should set `visible: false` for traces missing x,y,z,u,v,w arrays - - should set `visible: false` for traces empty x,y,z,u,v,w arrays - - Test streamtube autorange - - @gl should add pad around tubes to make sure they fit on the scene - - Test streamtube starting positions defaults: - - @gl should cut xz at min-y and take all x/y/z pts on that plane except those on the edges - - @gl should take middle pt if mesh vector has length 2 - - @gl should take pt if mesh vector has length 1 - - Test streamtube interactions - - @gl overspecified meshgrid should return blank mesh grid - - @gl should add/clear gl objects correctly - - @gl should be able to restyle to a cone trace and back - - @noCI Test streamtube hover - - @gl should display hover labels - - @gl should display hover labels (multi-trace case) - - @gl should emit correct event data - - Test surface - supplyDefaults - - should set 'visible' to false if 'z' isn't provided - - should NOT fill 'x' and 'y' if not provided - - should coerce 'project' if contours or highlight lines are enabled - - should coerce contour style attributes if contours lines are enabled - - should coerce colorscale and colorbar attributes - - should coerce 'c' attributes with 'z' if 'c' isn't present - - should coerce 'c' attributes with 'c' values regardless of `'z' if 'c' is present - - should default 'c' attributes with if 'surfacecolor' is present - - should inherit layout.calendar - - should take its own calendars - - svg+text utils - convertToTspans - - checks for XSS attack in href - - checks for XSS attack in href (with plenty of white spaces) - - whitelists relative hrefs (interpreted as http) - - whitelists http hrefs - - whitelists https hrefs - - whitelists mailto hrefs - - drops XSS attacks in href - - accepts href and style in in any order and tosses other stuff - - allows encoded URIs in href - - accepts `target` with links and tries to translate it to `xlink:show` - - attaches onclick if popup is specified - - drops XSS attacks via popup script - - keeps query parameters in href - - allows basic spans - - ignores unquoted styles in spans - - allows quoted styles in spans - - ignores extra stuff after span styles - - escapes HTML entities in span styles - - decodes some HTML entities in text - - decodes some HTML entities in text (number case) - - decodes arbitrary decimal and hex number entities - - decodes arbitrary decimal and hex number entities (IE case) - - does not decode entities prematurely - - supports superscript by itself - - supports subscript by itself - - supports superscript and subscript together with normal text - - allows one to span
s - - allows one to span
s - - allows nested tags to break at
, eventually closed or not - - ignores bare closing tags - - ignores extra closing tags - - table initialization tests - table global defaults - - should not coerce trace opacity - - should use global font as label, tick and range font defaults - table defaults - - 'line' specification should yield a default color - - 'domain' specification should have a default - - '*.values' specification should have a default of an empty array - - 'columnwidth' specification should accept a numerical array - - 'columnwidth' specification should accept a string array (converted downstream) - - 'header' should be used with default values where attributes are not provided - - table - edge cases - - Works with more than one column - - Works with one column - - Does not error with zero columns - - Does not raise an error with zero lines - - should remove scroll glyph and capture zone when *staticPlot:true* - Rendering with partial attribute support - - `Plotly.plot` should render all the columns even if no cell contents were supplied yet - - `Plotly.plot` should render all columns even if no header contents were supplied yet - - `Plotly.plot` should render all the column headers even if not all header values were supplied - basic use and basic data restyling - - `Plotly.plot` should have proper fields on `gd.data` on initial rendering - - Calling `Plotly.plot` again should add the new table trace - - Calling `Plotly.restyle` with a string path should amend the preexisting table - - Calling `Plotly.restyle` for a `header.values` change should amend the preexisting one - - Calling `Plotly.relayout` with string should amend the preexisting table - - Calling `Plotly.relayout` with object should amend the preexisting table - more restyling tests with scenegraph queries - - Calling `Plotly.restyle` for a `header.values` change should amend the preexisting one - - makeTemplate - - does not template arrays - - does not modify the figure while extracting a template - - templates scalar array_ok keys but not when they are arrays - - does not template invalid keys but does template invalid values - - pulls the first unnamed array item as defaults, plus one item of each distinct name - - merges in the template that was already in the figure - - works on DOM element - - template interactions - - makes a new annotation or edits the existing one as necessary - - makes a new shape or edits the existing one as necessary - - validateTemplate - - returns undefined when the template matches precisely - - catches all classes of regular issue - - catches missing template.data - - catches missing template.layout - - ternary plots - with scatterternary trace(s) - - should be able to toggle trace visibility - - should be able to delete and add traces - - should be able to restyle - - should display to hover labels - - should respond to hover interactions by - - should respond to click interactions by - - should respond zoom drag interactions - static plots - - should not respond to drag - - should be able to reorder axis layers when relayout'ing *layer* - - should be able to relayout axis tickfont attributes - - should be able to relayout axis title attributes - - should be able to hide/show ticks and tick labels - - should render a-axis and c-axis with negative offsets - - ternary defaults - - should fill empty containers - - should coerce 'min' values to 0 and delete them for user data if they contradict - - should default 'title' to Component + _name - - should default 'gricolor' to 60% dark - - Test event property of interactions on a ternary plot: - click events - - should not be trigged when not on data points - - should contain the correct fields - modified click events - - should not be triggered when not on data points - - should not be triggered when not canceling context - - should contain the correct fields - - should not be triggered when not on data points - - should not be triggered when not canceling context - - should contain the correct fields - hover events - - should contain the correct fields - unhover events - - should contain the correct fields - - Plot title - - is centered horizontally and vertically above the plot by default - - can still be defined as `layout.title` to ensure backwards-compatibility - - can be updated via `relayout` - - can be placed at the left edge of the container - - can be placed at the right edge of the container - - can be placed at the center of the container - - can be placed at the left edge of the plot area - - can be placed at the right edge of the plot area - - can be placed at the center of the plot area - - can be placed at the top edge of the container - - can be placed at the bottom edge of the container - - can be placed in the vertical center of the container - - can be placed at the top edge of the plot area - - can be placed at the bottom edge of the plot area - - can be placed in the vertical center of the plot area - - provides a y 'auto' value putting title baseline in middle of top margin irrespective of `yref` - - with {xanchor: 'auto', x: 0, xref: 'container'} expected to be aligned start - - with {xanchor: 'auto', x: 0, xref: 'paper'} expected to be aligned start - - with {xanchor: 'auto', x: 0.3, xref: 'container'} expected to be aligned start - - with {xanchor: 'auto', x: 0.3, xref: 'paper'} expected to be aligned start - - with {xanchor: 'auto', x: 0.4, xref: 'container'} expected to be aligned middle - - with {xanchor: 'auto', x: 0.4, xref: 'paper'} expected to be aligned middle - - with {xanchor: 'auto', x: 0.5, xref: 'container'} expected to be aligned middle - - with {xanchor: 'auto', x: 0.5, xref: 'paper'} expected to be aligned middle - - with {xanchor: 'auto', x: 0.6, xref: 'container'} expected to be aligned middle - - with {xanchor: 'auto', x: 0.6, xref: 'paper'} expected to be aligned middle - - with {xanchor: 'auto', x: 0.7, xref: 'container'} expected to be aligned end - - with {xanchor: 'auto', x: 0.7, xref: 'paper'} expected to be aligned end - - with {xanchor: 'auto', x: 1, xref: 'container'} expected to be aligned end - - with {xanchor: 'auto', x: 1, xref: 'paper'} expected to be aligned end - - with {yanchor: 'auto', y: 0, yref: 'container'} expected to be aligned bottom - - with {yanchor: 'auto', y: 0, yref: 'paper'} expected to be aligned bottom - - with {yanchor: 'auto', y: 0.5, yref: 'container'} expected to be aligned middle - - with {yanchor: 'auto', y: 0.5, yref: 'paper'} expected to be aligned middle - - with {yanchor: 'auto', y: 1, yref: 'container'} expected to be aligned top - - with {yanchor: 'auto', y: 1, yref: 'paper'} expected to be aligned top - - {y: 'auto'} overrules {yanchor: 'auto'} to support behavior before chart title alignment was introduced - - can be placed x pixels away from left container edge - - can be placed x pixels away from left plot area edge - - can be placed x pixels away from right container edge - - can be placed x pixels away from right plot area edge - - figures out for itself which horizontal padding applies when {xanchor: 'auto'}container edge - - figures out for itself which horizontal padding applies when {xanchor: 'auto'}plot area edge - - mutes left padding for {xanchor: 'center'} - - mutes right padding for {xanchor: 'center'} - - mutes left padding when xanchor is right - - mutes right padding when xanchor is left - - can be placed x pixels below top container edge - - can be placed x pixels below top plot area edge - - can be placed x pixels above bottom container edge - - can be placed x pixels above bottom plot area edge - - figures out for itself which vertical padding applies when {yanchor: 'auto'}container edge - - figures out for itself which vertical padding applies when {yanchor: 'auto'}plot area edge - - mutes top padding for {yanchor: 'middle'} - - mutes bottom padding for {yanchor: 'middle'} - - mutes top padding when yanchor is bottom - - mutes bottom padding when yanchor is top - - Titles can be updated - - via `Plotly.relayout` by replacing the entire title objects - - via `Plotly.update` by replacing the entire title objects - - via `Plotly.relayout` by using attribute strings - - via `Plotly.update` by using attribute strings - - via `Plotly.relayout` despite passing title only as a string (backwards-compatibility) - - via `Plotly.update` despite passing title only as a string (backwards-compatibility) - - via `Plotly.relayout` despite passing title only as a string using string attributes (backwards-compatibility) - - via `Plotly.update` despite passing title only as a string using string attributes (backwards-compatibility) - - Titles support setting custom font properties - - through defining a `font` property in the respective title attribute - - through using the deprecated `titlefont` properties (backwards-compatibility) - - Title fonts can be updated - - via `Plotly.relayout` by replacing the entire title objects - - via `Plotly.update` by replacing the entire title objects - - via `Plotly.relayout` by using attribute strings - - via `Plotly.update` by using attribute strings - - via `Plotly.relayout` despite passing deprecated `titlefont` properties (backwards-compatibility) - - via `Plotly.update` despite passing deprecated `titlefont` properties (backwards-compatibility) - - via `Plotly.relayout` despite using string attributes representing the deprecated structure (backwards-compatibility) - - via `Plotly.update` despite using string attributes representing the deprecated structure (backwards-compatibility) - - via `Plotly.relayout` despite using string attributes replacing deprecated `titlefont` attributes (backwards-compatibility) - - via `Plotly.update` despite using string attributes replacing deprecated `titlefont` attributes (backwards-compatibility) - - Titles for multiple axes - - still support deprecated `title` and `titlefont` syntax (backwards-compatibility) - - can be updated using deprecated `title` and `titlefont` syntax (backwards-compatibility) - - Editable titles - - shows default titles semi-opaque with no hover effects - - has hover effects for blank titles - - has no hover effects for titles that used to be blank - - Plotly.toImage - - should be attached to Plotly - - should return a promise - - should throw error with unsupported file type - - should throw error with height and/or width < 1 - - should create img with proper height and width - - should create proper file type - - should strip *data:image* prefix when *imageDataOnly* is turned on - - should respond to *scale* option ( format png) - - should respond to *scale* option ( format jpeg) - - should respond to *scale* option ( format webp) - - should respond to *scale* option ( format svg) - - should accept data/layout/config figure object as input - - should accept graph div id as input - - should work on pages with  - - aggregate - - handles all funcs for numeric data - - handles all funcs except sum for date data - - handles all funcs except sum and avg for category data - - allows date and category sums, and category avg, with weird output - - can aggregate on an existing data array - - can handle case where aggregation array is missing - - handles median, mode, rms, stddev, change & range for numeric data - - handles ragged data - extra groups are ignored - - handles ragged data - groups is the shortest, others are ignored - - links fullData aggregations to userData via _index - - does not error out on bad *group* value - - filter transforms defaults: - - supplyTraceDefaults should coerce all attributes - - supplyTraceDefaults should not coerce attributes if enabled: false - - supplyTraceDefaults should coerce *target* as a strict / noBlank string - - filter transforms calc: - - filters should skip if *target* isn't present in trace - - filters should handle 3D *z* data - - should use the calendar from the target attribute if target is a string - - should use targetcalendar anyway if there is no matching calendar attribute - - should use targetcalendar if target is an array - - filters should handle geographical *lon* data - - filters should handle nested attributes - - filters should handle array on base trace attributes - - filters should skip if *enabled* is false - - filters should chain as AND (case 1) - - filters should chain as AND (case 2) - - should preserve gaps in data when `preservegaps` is turned on - - two filter transforms with `preservegaps: true` should commute - - two filter transforms with `preservegaps: false` should commute - - two filter transforms with different `preservegaps` values should not necessarily commute - filters should handle numeric values - - with operation *[]* - - with operation *[)* - - with operation *(]* - - with operation *()* - - with operation *)(* - - with operation *)[* - - with operation *](* - - with operation *][* - - with operation *{}* - - with operation *}{* - - should honored set axis type - filters should handle categories - - with operation *()* - - with operation *)(* - - with operation *{}* - - with operation *}{* - filters should handle dates - - with operation *=* - - with operation *!=* - - with operation *<* - - with operation *>* - - with operation *[]* - - with operation *)(* - - with operation *{}* - - with operation *}{* - - filters should handle ids - filters should handle array *target* values - - with numeric items - - with ragged items - longer target - - with ragged items - longer data - - with categorical items and *{}* - - with categorical items and *<* and *>=* - - with categorical items and *[]*, *][*, *()* and *)(* - - with dates items - - with multiple transforms (dates)  - - filter transforms interactions - - Plotly.plot should plot the transform trace - - Plotly.restyle should work - - Plotly.extendTraces should work - - Plotly.deleteTraces should work - - toggling trace visibility should work - - zooming in/out should not change filtered data - - should update axis categories - - should clear indexToPoints on removal - - groupby - one-to-many transforms: - - Plotly.plot should plot the transform traces - - Accepts deprecated object notation for styles - - Plotly.restyle should work - - Plotly.react should work - - Plotly.extendTraces should work - - Plotly.deleteTraces should work - - toggling trace visibility should work - many-to-many transforms - - varies the color for each expanded trace - symmetry/degeneracy testing of one-to-many transforms on arbitrary arrays where there is no grouping (implicit 1): - - Plotly.plot should plot the transform traces - - Plotly.plot should plot the transform traces - - Plotly.plot should plot the transform traces - - Plotly.plot should plot the transform traces - - Plotly.plot should plot the transform traces - grouping with basic, heterogenous and overridden attributes - - `data` preserves user supplied input but `gd._fullData` reflects the grouping - - passes with lots of attributes and heterogenous attrib presence - - passes with group styles partially overriding top level aesthetics - - passes extended tests with group styles partially overriding top level aesthetics - - passes with no explicit styling for the individual group - - passes with no explicit styling in the group transform at all - passes with no `groups` - - passes with no groups - - passes with empty groups - - passes with falsey groups - expanded trace coloring - - assigns unique colors to each group - - general transforms: - - passes through empty transforms - - does not transform traces with no length - - supplyTraceDefaults should supply the transform defaults - - supplyTraceDefaults should not bail if transform module is not found - - supplyTraceDefaults should honor global transforms - - supplyDataDefaults should apply the transform while - - user-defined transforms: - - should pass correctly arguments to transform methods - - handles `makesData` transforms when the incoming trace has no data - - multiple transforms: - - Plotly.plot should plot the transform traces - filter|aggregate|filter - - Plotly.plot should plot the transform traces - - Plotly.plot should plot the transform traces (reverse case) - - Plotly.restyle should work - - Plotly.extendTraces should work - - Plotly.deleteTraces should work - - toggling trace visibility should work - - executes filter and aggregate in the order given - - always executes groupby before aggregate - - invalid transforms - - ignores them - - multiple traces with transforms: - - Plotly.plot should plot the transform traces - - Plotly.restyle should work - - Plotly.extendTraces should work - - Plotly.deleteTraces should work - - toggling trace visibility should work - - restyle applied on transforms: - - should be able - - supplyDefaults with groupby + filter - - filter + groupby with blank target - - fiter + groupby - - groupby + filter - - groupby + groupby - - groupby + groupby + filter - - fiter + filter - - Test sort transform defaults: - - should coerce all attributes - - should skip unsettable attribute when `enabled: false` - - Test sort transform calc: - - should sort all array attributes (ascending case) - - should sort all array attributes (descending case) - - should sort via nested targets - - should sort via dates targets - - should sort via categorical targets - - should sort via custom targets - - should truncate transformed arrays to target array length (short target case) - - should truncate transformed arrays to target array length (long target case) - - Test sort transform interactions: - - should respond to restyle calls - - does not preserve event data `pointNumber` value - - should honor *categoryarray* when set - - Plots.transition (duration = 0) - - resolves only once the transition has completed - - emits plotly_transitioning on transition start - - emits plotly_transitioned on transition end - - transitions an annotation - - transitions an image - - transitions a shape - - transitions a transform - - transitions may be chained - - Plots.transition (duration = 20) - - resolves only once the transition has completed - - emits plotly_transitioning on transition start - - emits plotly_transitioned on transition end - - transitions an annotation - - transitions an image - - transitions a shape - - transitions a transform - - transitions may be chained - - update menus defaults - - should skip non-array containers - - should make non-object item visible: false - - should set 'visible' to false when no buttons are present - - should set non-object buttons visible: false - - should skip over buttons without array 'args' field - - allows the `skip` method with no args - - should keep ref to input update menu container - - should default 'bgcolor' to layout 'paper_bgcolor' - - should default 'type' to 'dropdown' - - should default 'direction' to 'down' - - should default 'showactive' to true - - update menus buttons - - creates button menus - - update menus initialization - - does not set active on initial plot - - update menus interactions - - should draw only visible menus - - should drop/fold buttons when clicking on header - - can set buttons visible or hidden - - should execute the API command when execute = true - - should not execute the API command when execute = false - - should emit an event on button click - - should still emit the event if method = skip - - should apply update on button click - - should update correctly on failed binding comparisons - - should change color on mouse over - - should relayout - - applies padding on all sides - - applies y padding on relayout - - update menus interaction with other components: - - draws buttons above sliders - - update menus interaction with scrollbox: - - scrollbox can be dragged - - scrollbox handles wheel events - - scrollbar can be dragged - - Plotly.validate - - should return undefined when no errors are found - - should report when data is not an array - - should report when a data trace is not an object - - should report when layout is not an object - - should report when trace is defaulted to not be visible - - should report when trace contains keys not part of the schema - - should report when trace contains keys that are not coerced - - should report when trace contains keys set to invalid values - - should work with info arrays - - should work with colorscale attributes - - should work with isLinkedToArray attributes - - should work with isSubplotObj attributes - - should work with attributes in registered transforms - - should catch input errors for attribute with dynamic defaults - - catches bad axes in grid definitions - - catches bad subplots in grid definitions - - should detect opposite axis range slider attributes - - should accept attributes that really end in a number - - should work with *trace* layout attributes - - understands histogram bin and autobin attributes - - understands histogram2d(contour) bin and autobin attributes - - Test violin defaults - - should set visible to false when x and y are empty - - should inherit layout.calendar - - should take its own calendars - - should not coerce point attributes when *points* is false - - should default *points* to suspectedoutliers when marker.outliercolor is set & valid - - should default *points* to suspectedoutliers when marker.line.outliercolor is set & valid - - should default *spanmode* to manual when *span* is set to an array - - should default *.visible attributes when one of their corresponding style attributes is set & valid - - should use violin style settings to default inner style attribute - - Test violin calc: - - should compute bandwidth and span based on the sample and *spanmode* - - should honor set bandwidth in span calculations - - should fill in scale-group stats - - handle multi-box / single-value case - - handle multi-value / single-but-unique-value case - - Test violin hover: - - should generate correct hover labels base - - should generate correct hover labels with mean - - should generate correct hover labels with overlaid violins - - should generate correct hover labels hoveron points | hovermode closest - - should generate correct hover labels hoveron points | hovermode x - - should generate correct hover labels hoveron violins+points | hovermode x (hover on violin only - same result as base) - - should generate correct hover labels hoveron violins+points | hovermode x (violin AND closest point) - - should generate correct hover labels text items on hover - - should generate correct hover labels only text items on hover - - should generate correct hover labels one-sided violin under hovermode closest - - should generate correct hover labels one-sided violin under hovermode y - - should generate correct hover labels single horizontal violin - - should generate correct hover labels multiple horizontal violins - - should generate correct hover labels multiple horizontal violins (under hovermode:closest) - - should generate correct hover labels hovering over single pt on horizontal violin should not rotate labels - KDE lines inside violin under *kde* hoveron flag - - should show in two-sided base case - - should show in one-sided positive case - - should show in one-sided negative case - - Test violin restyle: - - should be able to add/remove innner parts - -Chrome 70.0.3538 (Linux 0.0.0): Executed 1 of 3373 (skipped 3372) SUCCESS (0.758 secs / 0.696 secs) - -Chrome 70.0.3538 (Linux 0.0.0): Executed 1 of 3373 (skipped 3372) SUCCESS (0.758 secs / 0.696 secs) -TOTAL: 1 SUCCESS -