@d3plus/core 3.0.10 → 3.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1900,7 +1900,7 @@ This is a static method of [<code>Treemap</code>](#Treemap)
1900
1900
  ---
1901
1901
 
1902
1902
  <a name="Viz"></a>
1903
- #### **Viz** [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L86)
1903
+ #### **Viz** [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L95)
1904
1904
 
1905
1905
 
1906
1906
  This is a global class, and extends all of the methods and functionality of [<code>BaseClass</code>](#BaseClass).
@@ -1956,7 +1956,6 @@ This is a global class, and extends all of the methods and functionality of [<co
1956
1956
  * [.messageStyle([*value*])](#Viz.messageStyle) ↩︎
1957
1957
  * [.noDataHTML([*value*])](#Viz.noDataHTML) ↩︎
1958
1958
  * [.noDataMessage([*value*])](#Viz.noDataMessage) ↩︎
1959
- * [.resizeContainer(*selector*)](#Viz.resizeContainer) ↩︎
1960
1959
  * [.scrollContainer(*selector*)](#Viz.scrollContainer) ↩︎
1961
1960
  * [.select([*selector*])](#Viz.select) ↩︎
1962
1961
  * [.shape([*value*])](#Viz.shape) ↩︎
@@ -2017,7 +2016,7 @@ The behavior to be used when calculating the position and size of each shape's l
2017
2016
  This is a static method of [<code>Viz</code>](#Viz), and is chainable with other methods of this Class.
2018
2017
 
2019
2018
 
2020
- <a name="Viz.render" href="#Viz.render">#</a> Viz.**render**([*callback*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L615)
2019
+ <a name="Viz.render" href="#Viz.render">#</a> Viz.**render**([*callback*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L658)
2021
2020
 
2022
2021
  Draws the visualization given the specified configuration.
2023
2022
 
@@ -2025,7 +2024,7 @@ Draws the visualization given the specified configuration.
2025
2024
  This is a static method of [<code>Viz</code>](#Viz), and is chainable with other methods of this Class.
2026
2025
 
2027
2026
 
2028
- <a name="Viz.active" href="#Viz.active">#</a> Viz.**active**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L862)
2027
+ <a name="Viz.active" href="#Viz.active">#</a> Viz.**active**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L874)
2029
2028
 
2030
2029
  If *value* is specified, sets the active method to the specified function and returns the current class instance.
2031
2030
 
@@ -2033,7 +2032,7 @@ If *value* is specified, sets the active method to the specified function and re
2033
2032
  This is a static method of [<code>Viz</code>](#Viz), and is chainable with other methods of this Class.
2034
2033
 
2035
2034
 
2036
- <a name="Viz.aggs" href="#Viz.aggs">#</a> Viz.**aggs**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L879)
2035
+ <a name="Viz.aggs" href="#Viz.aggs">#</a> Viz.**aggs**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L891)
2037
2036
 
2038
2037
  If *value* is specified, sets the aggregation method for each key in the object and returns the current class instance.
2039
2038
 
@@ -2041,7 +2040,7 @@ If *value* is specified, sets the aggregation method for each key in the object
2041
2040
  This is a static method of [<code>Viz</code>](#Viz), and is chainable with other methods of this Class.
2042
2041
 
2043
2042
 
2044
- <a name="Viz.ariaHidden" href="#Viz.ariaHidden">#</a> Viz.**ariaHidden**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L891)
2043
+ <a name="Viz.ariaHidden" href="#Viz.ariaHidden">#</a> Viz.**ariaHidden**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L903)
2045
2044
 
2046
2045
  Sets the "aria-hidden" attribute of the containing SVG element. The default value is "false", but it you need to hide the SVG from screen readers set this property to "true".
2047
2046
 
@@ -2049,7 +2048,7 @@ Sets the "aria-hidden" attribute of the containing SVG element. The default valu
2049
2048
  This is a static method of [<code>Viz</code>](#Viz), and is chainable with other methods of this Class.
2050
2049
 
2051
2050
 
2052
- <a name="Viz.attribution" href="#Viz.attribution">#</a> Viz.**attribution**(*value*) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L901)
2051
+ <a name="Viz.attribution" href="#Viz.attribution">#</a> Viz.**attribution**(*value*) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L913)
2053
2052
 
2054
2053
  Sets text to be shown positioned absolute on top of the visualization in the bottom-right corner. This is most often used in Geomaps to display the copyright of map tiles. The text is rendered as HTML, so any valid HTML string will render as expected (eg. anchor links work).
2055
2054
 
@@ -2057,7 +2056,7 @@ Sets text to be shown positioned absolute on top of the visualization in the bot
2057
2056
  This is a static method of [<code>Viz</code>](#Viz), and is chainable with other methods of this Class.
2058
2057
 
2059
2058
 
2060
- <a name="Viz.attributionStyle" href="#Viz.attributionStyle">#</a> Viz.**attributionStyle**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L913)
2059
+ <a name="Viz.attributionStyle" href="#Viz.attributionStyle">#</a> Viz.**attributionStyle**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L925)
2061
2060
 
2062
2061
  If *value* is specified, sets the config method for the back button and returns the current class instance.
2063
2062
 
@@ -2065,7 +2064,7 @@ If *value* is specified, sets the config method for the back button and returns
2065
2064
  This is a static method of [<code>Viz</code>](#Viz), and is chainable with other methods of this Class.
2066
2065
 
2067
2066
 
2068
- <a name="Viz.backConfig" href="#Viz.backConfig">#</a> Viz.**backConfig**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L925)
2067
+ <a name="Viz.backConfig" href="#Viz.backConfig">#</a> Viz.**backConfig**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L937)
2069
2068
 
2070
2069
  If *value* is specified, sets the config method for the back button and returns the current class instance.
2071
2070
 
@@ -2073,7 +2072,7 @@ If *value* is specified, sets the config method for the back button and returns
2073
2072
  This is a static method of [<code>Viz</code>](#Viz), and is chainable with other methods of this Class.
2074
2073
 
2075
2074
 
2076
- <a name="Viz.cache" href="#Viz.cache">#</a> Viz.**cache**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L937)
2075
+ <a name="Viz.cache" href="#Viz.cache">#</a> Viz.**cache**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L949)
2077
2076
 
2078
2077
  Enables a lru cache that stores up to 5 previously loaded files/URLs. Helpful when constantly writing over the data array with a URL in the render function of a react component.
2079
2078
 
@@ -2081,7 +2080,7 @@ Enables a lru cache that stores up to 5 previously loaded files/URLs. Helpful wh
2081
2080
  This is a static method of [<code>Viz</code>](#Viz), and is chainable with other methods of this Class.
2082
2081
 
2083
2082
 
2084
- <a name="Viz.color" href="#Viz.color">#</a> Viz.**color**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L947)
2083
+ <a name="Viz.color" href="#Viz.color">#</a> Viz.**color**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L959)
2085
2084
 
2086
2085
  Defines the main color to be used for each data point in a visualization. Can be either an accessor function or a string key to reference in each data point. If a color value is returned, it will be used as is. If a string is returned, a unique color will be assigned based on the string.
2087
2086
 
@@ -2089,7 +2088,7 @@ Defines the main color to be used for each data point in a visualization. Can be
2089
2088
  This is a static method of [<code>Viz</code>](#Viz), and is chainable with other methods of this Class.
2090
2089
 
2091
2090
 
2092
- <a name="Viz.colorScale" href="#Viz.colorScale">#</a> Viz.**colorScale**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L959)
2091
+ <a name="Viz.colorScale" href="#Viz.colorScale">#</a> Viz.**colorScale**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L971)
2093
2092
 
2094
2093
  Defines the value to be used for a color scale. Can be either an accessor function or a string key to reference in each data point.
2095
2094
 
@@ -2097,7 +2096,7 @@ Defines the value to be used for a color scale. Can be either an accessor functi
2097
2096
  This is a static method of [<code>Viz</code>](#Viz), and is chainable with other methods of this Class.
2098
2097
 
2099
2098
 
2100
- <a name="Viz.colorScaleConfig" href="#Viz.colorScaleConfig">#</a> Viz.**colorScaleConfig**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L972)
2099
+ <a name="Viz.colorScaleConfig" href="#Viz.colorScaleConfig">#</a> Viz.**colorScaleConfig**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L984)
2101
2100
 
2102
2101
  A pass-through to the config method of ColorScale.
2103
2102
 
@@ -2105,7 +2104,7 @@ A pass-through to the config method of ColorScale.
2105
2104
  This is a static method of [<code>Viz</code>](#Viz), and is chainable with other methods of this Class.
2106
2105
 
2107
2106
 
2108
- <a name="Viz.colorScalePadding" href="#Viz.colorScalePadding">#</a> Viz.**colorScalePadding**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L984)
2107
+ <a name="Viz.colorScalePadding" href="#Viz.colorScalePadding">#</a> Viz.**colorScalePadding**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L996)
2109
2108
 
2110
2109
  Tells the colorScale whether or not to use the internal padding defined by the visualization in it's positioning. For example, d3plus-plot will add padding on the left so that the colorScale appears centered above the x-axis. By default, this padding is only applied on screens larger than 600 pixels wide.
2111
2110
 
@@ -2113,7 +2112,7 @@ Tells the colorScale whether or not to use the internal padding defined by the v
2113
2112
  This is a static method of [<code>Viz</code>](#Viz), and is chainable with other methods of this Class.
2114
2113
 
2115
2114
 
2116
- <a name="Viz.colorScalePosition" href="#Viz.colorScalePosition">#</a> Viz.**colorScalePosition**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L997)
2115
+ <a name="Viz.colorScalePosition" href="#Viz.colorScalePosition">#</a> Viz.**colorScalePosition**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1009)
2117
2116
 
2118
2117
  Defines which side of the visualization to anchor the color scale. Acceptable values are `"top"`, `"bottom"`, `"left"`, `"right"`, and `false`. A `false` value will cause the color scale to not be displayed, but will still color shapes based on the scale.
2119
2118
 
@@ -2121,7 +2120,7 @@ Defines which side of the visualization to anchor the color scale. Acceptable va
2121
2120
  This is a static method of [<code>Viz</code>](#Viz), and is chainable with other methods of this Class.
2122
2121
 
2123
2122
 
2124
- <a name="Viz.colorScaleMaxSize" href="#Viz.colorScaleMaxSize">#</a> Viz.**colorScaleMaxSize**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1010)
2123
+ <a name="Viz.colorScaleMaxSize" href="#Viz.colorScaleMaxSize">#</a> Viz.**colorScaleMaxSize**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1022)
2125
2124
 
2126
2125
  Sets the maximum pixel size for drawing the color scale: width for horizontal scales and height for vertical scales.
2127
2126
 
@@ -2129,7 +2128,7 @@ Sets the maximum pixel size for drawing the color scale: width for horizontal sc
2129
2128
  This is a static method of [<code>Viz</code>](#Viz), and is chainable with other methods of this Class.
2130
2129
 
2131
2130
 
2132
- <a name="Viz.data" href="#Viz.data">#</a> Viz.**data**(*data*, [*formatter*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1031)
2131
+ <a name="Viz.data" href="#Viz.data">#</a> Viz.**data**(*data*, [*formatter*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1043)
2133
2132
 
2134
2133
  Sets the primary data array to be used when drawing the visualization. The value passed should be an *Array* of objects or a *String* representing a filepath or URL to be loaded. The following filetypes are supported: `csv`, `tsv`, `txt`, and `json`.
2135
2134
 
@@ -2145,7 +2144,7 @@ If *data* is not specified, this method returns the current primary data array,
2145
2144
  This is a static method of [<code>Viz</code>](#Viz), and is chainable with other methods of this Class.
2146
2145
 
2147
2146
 
2148
- <a name="Viz.dataCutoff" href="#Viz.dataCutoff">#</a> Viz.**dataCutoff**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1055)
2147
+ <a name="Viz.dataCutoff" href="#Viz.dataCutoff">#</a> Viz.**dataCutoff**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1067)
2149
2148
 
2150
2149
  If the number of visible data points exceeds this number, the default hover behavior will be disabled (helpful for very large visualizations bogging down the DOM with opacity updates).
2151
2150
 
@@ -2153,7 +2152,7 @@ If the number of visible data points exceeds this number, the default hover beha
2153
2152
  This is a static method of [<code>Viz</code>](#Viz), and is chainable with other methods of this Class.
2154
2153
 
2155
2154
 
2156
- <a name="Viz.depth" href="#Viz.depth">#</a> Viz.**depth**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1065)
2155
+ <a name="Viz.depth" href="#Viz.depth">#</a> Viz.**depth**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1077)
2157
2156
 
2158
2157
  If *value* is specified, sets the depth to the specified number and returns the current class instance. The *value* should correspond with an index in the [groupBy](#groupBy) array.
2159
2158
 
@@ -2161,7 +2160,7 @@ If *value* is specified, sets the depth to the specified number and returns the
2161
2160
  This is a static method of [<code>Viz</code>](#Viz), and is chainable with other methods of this Class.
2162
2161
 
2163
2162
 
2164
- <a name="Viz.detectResize" href="#Viz.detectResize">#</a> Viz.**detectResize**(*value*) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1075)
2163
+ <a name="Viz.detectResize" href="#Viz.detectResize">#</a> Viz.**detectResize**(*value*) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1087)
2165
2164
 
2166
2165
  If the width and/or height of a Viz is not user-defined, it is determined by the size of it's parent element. When this method is set to `true`, the Viz will listen for the `window.onresize` event and adjust it's dimensions accordingly.
2167
2166
 
@@ -2169,7 +2168,7 @@ If the width and/or height of a Viz is not user-defined, it is determined by the
2169
2168
  This is a static method of [<code>Viz</code>](#Viz), and is chainable with other methods of this Class.
2170
2169
 
2171
2170
 
2172
- <a name="Viz.detectResizeDelay" href="#Viz.detectResizeDelay">#</a> Viz.**detectResizeDelay**(*value*) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1087)
2171
+ <a name="Viz.detectResizeDelay" href="#Viz.detectResizeDelay">#</a> Viz.**detectResizeDelay**(*value*) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1099)
2173
2172
 
2174
2173
  When resizing the browser window, this is the millisecond delay to trigger the resize event.
2175
2174
 
@@ -2177,7 +2176,7 @@ When resizing the browser window, this is the millisecond delay to trigger the r
2177
2176
  This is a static method of [<code>Viz</code>](#Viz), and is chainable with other methods of this Class.
2178
2177
 
2179
2178
 
2180
- <a name="Viz.detectVisible" href="#Viz.detectVisible">#</a> Viz.**detectVisible**(*value*) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1099)
2179
+ <a name="Viz.detectVisible" href="#Viz.detectVisible">#</a> Viz.**detectVisible**(*value*) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1111)
2181
2180
 
2182
2181
  Toggles whether or not the Viz should try to detect if it visible in the current viewport. When this method is set to `true`, the Viz will only be rendered when it has entered the viewport either through scrolling or if it's display or visibility is changed.
2183
2182
 
@@ -2185,7 +2184,7 @@ Toggles whether or not the Viz should try to detect if it visible in the current
2185
2184
  This is a static method of [<code>Viz</code>](#Viz), and is chainable with other methods of this Class.
2186
2185
 
2187
2186
 
2188
- <a name="Viz.detectVisibleInterval" href="#Viz.detectVisibleInterval">#</a> Viz.**detectVisibleInterval**(*value*) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1111)
2187
+ <a name="Viz.detectVisibleInterval" href="#Viz.detectVisibleInterval">#</a> Viz.**detectVisibleInterval**(*value*) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1123)
2189
2188
 
2190
2189
  The interval, in milliseconds, for checking if the visualization is visible on the page.
2191
2190
 
@@ -2193,7 +2192,7 @@ The interval, in milliseconds, for checking if the visualization is visible on t
2193
2192
  This is a static method of [<code>Viz</code>](#Viz), and is chainable with other methods of this Class.
2194
2193
 
2195
2194
 
2196
- <a name="Viz.discrete" href="#Viz.discrete">#</a> Viz.**discrete**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1123)
2195
+ <a name="Viz.discrete" href="#Viz.discrete">#</a> Viz.**discrete**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1135)
2197
2196
 
2198
2197
  If *value* is specified, sets the discrete accessor to the specified method name (usually an axis) and returns the current class instance.
2199
2198
 
@@ -2201,7 +2200,7 @@ If *value* is specified, sets the discrete accessor to the specified method name
2201
2200
  This is a static method of [<code>Viz</code>](#Viz), and is chainable with other methods of this Class.
2202
2201
 
2203
2202
 
2204
- <a name="Viz.downloadButton" href="#Viz.downloadButton">#</a> Viz.**downloadButton**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1133)
2203
+ <a name="Viz.downloadButton" href="#Viz.downloadButton">#</a> Viz.**downloadButton**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1145)
2205
2204
 
2206
2205
  Shows a button that allows for downloading the current visualization.
2207
2206
 
@@ -2209,7 +2208,7 @@ Shows a button that allows for downloading the current visualization.
2209
2208
  This is a static method of [<code>Viz</code>](#Viz), and is chainable with other methods of this Class.
2210
2209
 
2211
2210
 
2212
- <a name="Viz.downloadConfig" href="#Viz.downloadConfig">#</a> Viz.**downloadConfig**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1145)
2211
+ <a name="Viz.downloadConfig" href="#Viz.downloadConfig">#</a> Viz.**downloadConfig**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1157)
2213
2212
 
2214
2213
  Sets specific options of the saveElement function used when downloading the visualization.
2215
2214
 
@@ -2217,7 +2216,7 @@ Sets specific options of the saveElement function used when downloading the visu
2217
2216
  This is a static method of [<code>Viz</code>](#Viz), and is chainable with other methods of this Class.
2218
2217
 
2219
2218
 
2220
- <a name="Viz.downloadPosition" href="#Viz.downloadPosition">#</a> Viz.**downloadPosition**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1157)
2219
+ <a name="Viz.downloadPosition" href="#Viz.downloadPosition">#</a> Viz.**downloadPosition**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1169)
2221
2220
 
2222
2221
  Defines which control group to add the download button into.
2223
2222
 
@@ -2225,7 +2224,7 @@ Defines which control group to add the download button into.
2225
2224
  This is a static method of [<code>Viz</code>](#Viz), and is chainable with other methods of this Class.
2226
2225
 
2227
2226
 
2228
- <a name="Viz.duration" href="#Viz.duration">#</a> Viz.**duration**([*ms*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1169)
2227
+ <a name="Viz.duration" href="#Viz.duration">#</a> Viz.**duration**([*ms*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1181)
2229
2228
 
2230
2229
  If *ms* is specified, sets the animation duration to the specified number and returns the current class instance. If *ms* is not specified, returns the current animation duration.
2231
2230
 
@@ -2233,7 +2232,7 @@ If *ms* is specified, sets the animation duration to the specified number and re
2233
2232
  This is a static method of [<code>Viz</code>](#Viz), and is chainable with other methods of this Class.
2234
2233
 
2235
2234
 
2236
- <a name="Viz.filter" href="#Viz.filter">#</a> Viz.**filter**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1179)
2235
+ <a name="Viz.filter" href="#Viz.filter">#</a> Viz.**filter**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1191)
2237
2236
 
2238
2237
  If *value* is specified, sets the filter to the specified function and returns the current class instance.
2239
2238
 
@@ -2241,7 +2240,7 @@ If *value* is specified, sets the filter to the specified function and returns t
2241
2240
  This is a static method of [<code>Viz</code>](#Viz), and is chainable with other methods of this Class.
2242
2241
 
2243
2242
 
2244
- <a name="Viz.fontFamily" href="#Viz.fontFamily">#</a> Viz.**fontFamily**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1189)
2243
+ <a name="Viz.fontFamily" href="#Viz.fontFamily">#</a> Viz.**fontFamily**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1201)
2245
2244
 
2246
2245
  If *value* is specified, sets the filter to the specified function and returns the current class instance.
2247
2246
 
@@ -2249,7 +2248,7 @@ If *value* is specified, sets the filter to the specified function and returns t
2249
2248
  This is a static method of [<code>Viz</code>](#Viz), and is chainable with other methods of this Class.
2250
2249
 
2251
2250
 
2252
- <a name="Viz.groupBy" href="#Viz.groupBy">#</a> Viz.**groupBy**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1225)
2251
+ <a name="Viz.groupBy" href="#Viz.groupBy">#</a> Viz.**groupBy**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1237)
2253
2252
 
2254
2253
  Defines the mapping between data and shape. The value can be a String matching a key in each data point (default is "id"), or an accessor Function that returns a unique value for each data point. Additionally, an Array of these values may be provided if the visualization supports nested hierarchies.
2255
2254
 
@@ -2257,7 +2256,7 @@ Defines the mapping between data and shape. The value can be a String matching a
2257
2256
  This is a static method of [<code>Viz</code>](#Viz), and is chainable with other methods of this Class.
2258
2257
 
2259
2258
 
2260
- <a name="Viz.height" href="#Viz.height">#</a> Viz.**height**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1252)
2259
+ <a name="Viz.height" href="#Viz.height">#</a> Viz.**height**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1264)
2261
2260
 
2262
2261
  If *value* is specified, sets the overall height to the specified number and returns the current class instance.
2263
2262
 
@@ -2265,7 +2264,7 @@ If *value* is specified, sets the overall height to the specified number and ret
2265
2264
  This is a static method of [<code>Viz</code>](#Viz), and is chainable with other methods of this Class.
2266
2265
 
2267
2266
 
2268
- <a name="Viz.hiddenColor" href="#Viz.hiddenColor">#</a> Viz.**hiddenColor**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1262)
2267
+ <a name="Viz.hiddenColor" href="#Viz.hiddenColor">#</a> Viz.**hiddenColor**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1274)
2269
2268
 
2270
2269
  Defines the color used for legend shapes when the corresponding grouping is hidden from display (by clicking on the legend).
2271
2270
 
@@ -2273,7 +2272,7 @@ Defines the color used for legend shapes when the corresponding grouping is hidd
2273
2272
  This is a static method of [<code>Viz</code>](#Viz), and is chainable with other methods of this Class.
2274
2273
 
2275
2274
 
2276
- <a name="Viz.hiddenOpacity" href="#Viz.hiddenOpacity">#</a> Viz.**hiddenOpacity**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1274)
2275
+ <a name="Viz.hiddenOpacity" href="#Viz.hiddenOpacity">#</a> Viz.**hiddenOpacity**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1286)
2277
2276
 
2278
2277
  Defines the opacity used for legend labels when the corresponding grouping is hidden from display (by clicking on the legend).
2279
2278
 
@@ -2281,7 +2280,7 @@ Defines the opacity used for legend labels when the corresponding grouping is hi
2281
2280
  This is a static method of [<code>Viz</code>](#Viz), and is chainable with other methods of this Class.
2282
2281
 
2283
2282
 
2284
- <a name="Viz.hover" href="#Viz.hover">#</a> Viz.**hover**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1287)
2283
+ <a name="Viz.hover" href="#Viz.hover">#</a> Viz.**hover**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1299)
2285
2284
 
2286
2285
  If *value* is specified, sets the hover method to the specified function and returns the current class instance.
2287
2286
 
@@ -2289,7 +2288,7 @@ If *value* is specified, sets the hover method to the specified function and ret
2289
2288
  This is a static method of [<code>Viz</code>](#Viz), and is chainable with other methods of this Class.
2290
2289
 
2291
2290
 
2292
- <a name="Viz.label" href="#Viz.label">#</a> Viz.**label**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1322)
2291
+ <a name="Viz.label" href="#Viz.label">#</a> Viz.**label**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1334)
2293
2292
 
2294
2293
  If *value* is specified, sets the label accessor to the specified function or string and returns the current class instance.
2295
2294
 
@@ -2297,7 +2296,7 @@ If *value* is specified, sets the label accessor to the specified function or st
2297
2296
  This is a static method of [<code>Viz</code>](#Viz), and is chainable with other methods of this Class.
2298
2297
 
2299
2298
 
2300
- <a name="Viz.legend" href="#Viz.legend">#</a> Viz.**legend**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1334)
2299
+ <a name="Viz.legend" href="#Viz.legend">#</a> Viz.**legend**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1346)
2301
2300
 
2302
2301
  If *value* is specified, toggles the legend based on the specified boolean and returns the current class instance.
2303
2302
 
@@ -2305,7 +2304,7 @@ If *value* is specified, toggles the legend based on the specified boolean and r
2305
2304
  This is a static method of [<code>Viz</code>](#Viz), and is chainable with other methods of this Class.
2306
2305
 
2307
2306
 
2308
- <a name="Viz.legendConfig" href="#Viz.legendConfig">#</a> Viz.**legendConfig**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1346)
2307
+ <a name="Viz.legendConfig" href="#Viz.legendConfig">#</a> Viz.**legendConfig**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1358)
2309
2308
 
2310
2309
  If *value* is specified, the object is passed to the legend's config method.
2311
2310
 
@@ -2313,7 +2312,7 @@ If *value* is specified, the object is passed to the legend's config method.
2313
2312
  This is a static method of [<code>Viz</code>](#Viz), and is chainable with other methods of this Class.
2314
2313
 
2315
2314
 
2316
- <a name="Viz.legendFilterInvert" href="#Viz.legendFilterInvert">#</a> Viz.**legendFilterInvert**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1358)
2315
+ <a name="Viz.legendFilterInvert" href="#Viz.legendFilterInvert">#</a> Viz.**legendFilterInvert**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1370)
2317
2316
 
2318
2317
  Defines the click functionality of categorical legend squares. When set to false, clicking will hide that category and shift+clicking will solo that category. When set to true, clicking with solo that category and shift+clicking will hide that category.
2319
2318
 
@@ -2321,7 +2320,7 @@ Defines the click functionality of categorical legend squares. When set to false
2321
2320
  This is a static method of [<code>Viz</code>](#Viz), and is chainable with other methods of this Class.
2322
2321
 
2323
2322
 
2324
- <a name="Viz.legendPadding" href="#Viz.legendPadding">#</a> Viz.**legendPadding**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1371)
2323
+ <a name="Viz.legendPadding" href="#Viz.legendPadding">#</a> Viz.**legendPadding**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1383)
2325
2324
 
2326
2325
  Tells the legend whether or not to use the internal padding defined by the visualization in it's positioning. For example, d3plus-plot will add padding on the left so that the legend appears centered underneath the x-axis. By default, this padding is only applied on screens larger than 600 pixels wide.
2327
2326
 
@@ -2329,7 +2328,7 @@ Tells the legend whether or not to use the internal padding defined by the visua
2329
2328
  This is a static method of [<code>Viz</code>](#Viz), and is chainable with other methods of this Class.
2330
2329
 
2331
2330
 
2332
- <a name="Viz.legendPosition" href="#Viz.legendPosition">#</a> Viz.**legendPosition**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1384)
2331
+ <a name="Viz.legendPosition" href="#Viz.legendPosition">#</a> Viz.**legendPosition**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1396)
2333
2332
 
2334
2333
  Defines which side of the visualization to anchor the legend. Expected values are `"top"`, `"bottom"`, `"left"`, and `"right"`.
2335
2334
 
@@ -2337,7 +2336,7 @@ Defines which side of the visualization to anchor the legend. Expected values ar
2337
2336
  This is a static method of [<code>Viz</code>](#Viz), and is chainable with other methods of this Class.
2338
2337
 
2339
2338
 
2340
- <a name="Viz.legendSort" href="#Viz.legendSort">#</a> Viz.**legendSort**(*value*) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1397)
2339
+ <a name="Viz.legendSort" href="#Viz.legendSort">#</a> Viz.**legendSort**(*value*) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1409)
2341
2340
 
2342
2341
  A JavaScript [sort comparator function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort) used to sort the legend.
2343
2342
 
@@ -2345,7 +2344,7 @@ A JavaScript [sort comparator function](https://developer.mozilla.org/en-US/docs
2345
2344
  This is a static method of [<code>Viz</code>](#Viz), and is chainable with other methods of this Class.
2346
2345
 
2347
2346
 
2348
- <a name="Viz.legendTooltip" href="#Viz.legendTooltip">#</a> Viz.**legendTooltip**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1407)
2347
+ <a name="Viz.legendTooltip" href="#Viz.legendTooltip">#</a> Viz.**legendTooltip**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1419)
2349
2348
 
2350
2349
  If *value* is specified, sets the config method for the legend tooltip and returns the current class instance.
2351
2350
 
@@ -2353,7 +2352,7 @@ If *value* is specified, sets the config method for the legend tooltip and retur
2353
2352
  This is a static method of [<code>Viz</code>](#Viz), and is chainable with other methods of this Class.
2354
2353
 
2355
2354
 
2356
- <a name="Viz.loadingHTML" href="#Viz.loadingHTML">#</a> Viz.**loadingHTML**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1419)
2355
+ <a name="Viz.loadingHTML" href="#Viz.loadingHTML">#</a> Viz.**loadingHTML**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1431)
2357
2356
 
2358
2357
  Sets the inner HTML of the status message that is displayed when loading AJAX requests and displaying errors. Must be a valid HTML string or a function that, when passed this Viz instance, returns a valid HTML string.
2359
2358
 
@@ -2361,7 +2360,7 @@ Sets the inner HTML of the status message that is displayed when loading AJAX re
2361
2360
  This is a static method of [<code>Viz</code>](#Viz), and is chainable with other methods of this Class.
2362
2361
 
2363
2362
 
2364
- <a name="Viz.loadingMessage" href="#Viz.loadingMessage">#</a> Viz.**loadingMessage**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1431)
2363
+ <a name="Viz.loadingMessage" href="#Viz.loadingMessage">#</a> Viz.**loadingMessage**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1443)
2365
2364
 
2366
2365
  Toggles the visibility of the status message that is displayed when loading AJAX requests and displaying errors.
2367
2366
 
@@ -2369,7 +2368,7 @@ Toggles the visibility of the status message that is displayed when loading AJAX
2369
2368
  This is a static method of [<code>Viz</code>](#Viz), and is chainable with other methods of this Class.
2370
2369
 
2371
2370
 
2372
- <a name="Viz.messageMask" href="#Viz.messageMask">#</a> Viz.**messageMask**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1443)
2371
+ <a name="Viz.messageMask" href="#Viz.messageMask">#</a> Viz.**messageMask**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1455)
2373
2372
 
2374
2373
  Sets the color of the mask used underneath the status message that is displayed when loading AJAX requests and displaying errors. Additionally, `false` will turn off the mask completely.
2375
2374
 
@@ -2377,7 +2376,7 @@ Sets the color of the mask used underneath the status message that is displayed
2377
2376
  This is a static method of [<code>Viz</code>](#Viz), and is chainable with other methods of this Class.
2378
2377
 
2379
2378
 
2380
- <a name="Viz.messageStyle" href="#Viz.messageStyle">#</a> Viz.**messageStyle**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1455)
2379
+ <a name="Viz.messageStyle" href="#Viz.messageStyle">#</a> Viz.**messageStyle**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1467)
2381
2380
 
2382
2381
  Defines the CSS style properties for the status message that is displayed when loading AJAX requests and displaying errors.
2383
2382
 
@@ -2385,7 +2384,7 @@ Defines the CSS style properties for the status message that is displayed when l
2385
2384
  This is a static method of [<code>Viz</code>](#Viz), and is chainable with other methods of this Class.
2386
2385
 
2387
2386
 
2388
- <a name="Viz.noDataHTML" href="#Viz.noDataHTML">#</a> Viz.**noDataHTML**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1467)
2387
+ <a name="Viz.noDataHTML" href="#Viz.noDataHTML">#</a> Viz.**noDataHTML**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1479)
2389
2388
 
2390
2389
  Sets the inner HTML of the status message that is displayed when no data is supplied to the visualization. Must be a valid HTML string or a function that, when passed this Viz instance, returns a valid HTML string.
2391
2390
 
@@ -2393,7 +2392,7 @@ Sets the inner HTML of the status message that is displayed when no data is supp
2393
2392
  This is a static method of [<code>Viz</code>](#Viz), and is chainable with other methods of this Class.
2394
2393
 
2395
2394
 
2396
- <a name="Viz.noDataMessage" href="#Viz.noDataMessage">#</a> Viz.**noDataMessage**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1479)
2395
+ <a name="Viz.noDataMessage" href="#Viz.noDataMessage">#</a> Viz.**noDataMessage**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1491)
2397
2396
 
2398
2397
  Toggles the visibility of the status message that is displayed when no data is supplied to the visualization.
2399
2398
 
@@ -2401,14 +2400,6 @@ Toggles the visibility of the status message that is displayed when no data is s
2401
2400
  This is a static method of [<code>Viz</code>](#Viz), and is chainable with other methods of this Class.
2402
2401
 
2403
2402
 
2404
- <a name="Viz.resizeContainer" href="#Viz.resizeContainer">#</a> Viz.**resizeContainer**(*selector*) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1491)
2405
-
2406
- If using resize detection, this method allow a custom override of the element to which the resize detection function gets attached.
2407
-
2408
-
2409
- This is a static method of [<code>Viz</code>](#Viz), and is chainable with other methods of this Class.
2410
-
2411
-
2412
2403
  <a name="Viz.scrollContainer" href="#Viz.scrollContainer">#</a> Viz.**scrollContainer**(*selector*) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/charts/Viz.js#L1503)
2413
2404
 
2414
2405
  If using scroll or visibility detection, this method allow a custom override of the element to which the scroll detection function gets attached.
@@ -221,6 +221,19 @@ import mouseleave from "./events/mouseleave.js";
221
221
  import mousemoveLegend from "./events/mousemove.legend.js";
222
222
  import mousemoveShape from "./events/mousemove.shape.js";
223
223
  import touchstartBody from "./events/touchstart.body.js";
224
+ function debounce(func, delay) {
225
+ var timeout;
226
+ return function() {
227
+ for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
228
+ args[_key] = arguments[_key];
229
+ }
230
+ var context = this;
231
+ clearTimeout(timeout);
232
+ timeout = setTimeout(function() {
233
+ return func.apply(context, args);
234
+ }, delay);
235
+ };
236
+ }
224
237
  /**
225
238
  * Default padding logic that will return false if the screen is less than 600 pixels wide.
226
239
  * @private
@@ -379,7 +392,10 @@ var Viz = /*#__PURE__*/ function(BaseClass) {
379
392
  "mousemove.legend": mousemoveLegend.bind(_this)
380
393
  };
381
394
  _this._queue = [];
382
- _this._resizeContainer = typeof window === "undefined" ? "" : window;
395
+ _this._resizeObserver = new ResizeObserver(debounce(function() {
396
+ _this._setSVGSize();
397
+ _this.render(_this._callback);
398
+ }, _this._detectResizeDelay));
383
399
  _this._scrollContainer = typeof window === "undefined" ? "" : window;
384
400
  _this._shape = constant("Rect");
385
401
  _this._shapes = [];
@@ -716,6 +732,30 @@ var Viz = /*#__PURE__*/ function(BaseClass) {
716
732
  },
717
733
  {
718
734
  /**
735
+ * Detects width and height and sets SVG properties
736
+ * @private
737
+ */ key: "_setSVGSize",
738
+ value: function _setSVGSize() {
739
+ var display = this._select.style("display");
740
+ this._select.style("display", "none");
741
+ var _getSize = _sliced_to_array(getSize(this._select.node().parentNode), 2), w = _getSize[0], h = _getSize[1];
742
+ w -= parseFloat(this._select.style("border-left-width"), 10);
743
+ w -= parseFloat(this._select.style("border-right-width"), 10);
744
+ h -= parseFloat(this._select.style("border-top-width"), 10);
745
+ h -= parseFloat(this._select.style("border-bottom-width"), 10);
746
+ this._select.style("display", display);
747
+ if (this._autoWidth) {
748
+ this.width(w);
749
+ this._select.style("width", "".concat(this._width, "px")).attr("width", "".concat(this._width, "px"));
750
+ }
751
+ if (this._autoHeight) {
752
+ this.height(h);
753
+ this._select.style("height", "".concat(this._height, "px")).attr("height", "".concat(this._height, "px"));
754
+ }
755
+ }
756
+ },
757
+ {
758
+ /**
719
759
  @memberof Viz
720
760
  @desc Draws the visualization given the specified configuration.
721
761
  @param {Function} [*callback*] An optional callback function that, if passed, will be called after animation is complete.
@@ -723,6 +763,7 @@ var Viz = /*#__PURE__*/ function(BaseClass) {
723
763
  */ key: "render",
724
764
  value: function render(callback) {
725
765
  var _this = this;
766
+ this._callback = callback;
726
767
  // Resets margins and padding
727
768
  this._margin = {
728
769
  bottom: 0,
@@ -742,29 +783,11 @@ var Viz = /*#__PURE__*/ function(BaseClass) {
742
783
  var svg = parent.select(".d3plus-viz").size() ? parent.select(".d3plus-viz") : parent.append("svg");
743
784
  this.select(svg.node());
744
785
  }
745
- /** detects width and height and sets SVG properties */ function setSVGSize() {
746
- var display = this._select.style("display");
747
- this._select.style("display", "none");
748
- var _getSize = _sliced_to_array(getSize(this._select.node().parentNode), 2), w = _getSize[0], h = _getSize[1];
749
- w -= parseFloat(this._select.style("border-left-width"), 10);
750
- w -= parseFloat(this._select.style("border-right-width"), 10);
751
- h -= parseFloat(this._select.style("border-top-width"), 10);
752
- h -= parseFloat(this._select.style("border-bottom-width"), 10);
753
- this._select.style("display", display);
754
- if (this._autoWidth) {
755
- this.width(w);
756
- this._select.style("width", "".concat(this._width, "px")).attr("width", "".concat(this._width, "px"));
757
- }
758
- if (this._autoHeight) {
759
- this.height(h);
760
- this._select.style("height", "".concat(this._height, "px")).attr("height", "".concat(this._height, "px"));
761
- }
762
- }
763
786
  // Calculates the width and/or height of the Viz based on the this._select, if either has not been defined.
764
787
  if ((!this._width || !this._height) && (!this._detectVisible || inViewport(this._select.node()))) {
765
788
  this._autoWidth = this._width === undefined;
766
789
  this._autoHeight = this._height === undefined;
767
- setSVGSize.bind(this)();
790
+ this._setSVGSize();
768
791
  }
769
792
  this._select.attr("class", "d3plus-viz").attr("aria-hidden", this._ariaHidden).attr("aria-labelledby", "".concat(this._uuid, "-title ").concat(this._uuid, "-desc")).attr("role", "img").attr("xmlns", "http://www.w3.org/2000/svg").attr("xmlns:xlink", "http://www.w3.org/1999/xlink").transition().duration(this._duration).style("width", this._width !== undefined ? "".concat(this._width, "px") : undefined).style("height", this._height !== undefined ? "".concat(this._height, "px") : undefined).attr("width", this._width !== undefined ? "".concat(this._width, "px") : undefined).attr("height", this._height !== undefined ? "".concat(this._height, "px") : undefined);
770
793
  // sets "position: relative" on the SVG parent if currently undefined
@@ -790,7 +813,6 @@ var Viz = /*#__PURE__*/ function(BaseClass) {
790
813
  this._resizePoll = clearTimeout(this._resizePoll);
791
814
  this._scrollPoll = clearTimeout(this._scrollPoll);
792
815
  select(this._scrollContainer).on("scroll.".concat(this._uuid), null);
793
- select(this._resizeContainer).on("resize.".concat(this._uuid), null);
794
816
  if (this._detectVisible && this._select.style("visibility") === "hidden") {
795
817
  this._visiblePoll = setInterval(function() {
796
818
  if (_this._select.style("visibility") !== "hidden") {
@@ -869,14 +891,9 @@ var Viz = /*#__PURE__*/ function(BaseClass) {
869
891
  if (_this._select.attr("opacity") === "0") _this._select.transition().duration(_this._duration).attr("opacity", 1);
870
892
  }
871
893
  if (_this._detectResize && (_this._autoWidth || _this._autoHeight)) {
872
- select(_this._resizeContainer).on("resize.".concat(_this._uuid), function() {
873
- _this._resizePoll = clearTimeout(_this._resizePoll);
874
- _this._resizePoll = setTimeout(function() {
875
- _this._resizePoll = clearTimeout(_this._resizePoll);
876
- setSVGSize.bind(_this)();
877
- _this.render(callback);
878
- }, _this._detectResizeDelay);
879
- });
894
+ _this._resizeObserver.observe(_this._select.node().parentNode);
895
+ } else {
896
+ _this._resizeObserver.unobserve(_this._select.node().parentNode);
880
897
  }
881
898
  if (callback) setTimeout(callback, _this._duration + 100);
882
899
  });
@@ -1513,17 +1530,6 @@ If *data* is not specified, this method returns the current primary data array,
1513
1530
  {
1514
1531
  /**
1515
1532
  @memberof Viz
1516
- @desc If using resize detection, this method allow a custom override of the element to which the resize detection function gets attached.
1517
- @param {String|HTMLElement} *selector*
1518
- @chainable
1519
- */ key: "resizeContainer",
1520
- value: function resizeContainer(_) {
1521
- return arguments.length ? (this._resizeContainer = _, this) : this._resizeContainer;
1522
- }
1523
- },
1524
- {
1525
- /**
1526
- @memberof Viz
1527
1533
  @desc If using scroll or visibility detection, this method allow a custom override of the element to which the scroll detection function gets attached.
1528
1534
  @param {String|HTMLElement} *selector*
1529
1535
  @chainable
@@ -1,4 +1,5 @@
1
- import { min } from "d3-array";
1
+ import { min, rollup } from "d3-array";
2
+ import { merge } from "@d3plus/data";
2
3
  import { elem } from "@d3plus/dom";
3
4
  /**
4
5
  @function _drawColorScale
@@ -6,7 +7,11 @@ import { elem } from "@d3plus/dom";
6
7
  @private
7
8
  */ export default function() {
8
9
  var _this = this;
9
- var data = this._data;
10
+ var data = Array.from(rollup(this._data, function(leaves) {
11
+ return merge(leaves, _this._aggs);
12
+ }, function(d, i) {
13
+ return "".concat(_this._time ? _this._time(d, i) : "all", "-").concat(_this._ids(d, i).join("_"));
14
+ }).values());
10
15
  var position = this._colorScalePosition.bind(this)(this.config());
11
16
  if (![
12
17
  false,