@d3plus/core 3.1.1 → 3.1.3

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.
Files changed (167) hide show
  1. package/README.md +5092 -5092
  2. package/es/index.js +2 -0
  3. package/es/index.js.map +1 -0
  4. package/es/src/charts/AreaPlot.js +2 -0
  5. package/es/src/charts/AreaPlot.js.map +1 -0
  6. package/es/src/charts/BarChart.js +2 -0
  7. package/es/src/charts/BarChart.js.map +1 -0
  8. package/es/src/charts/BoxWhisker.js +2 -0
  9. package/es/src/charts/BoxWhisker.js.map +1 -0
  10. package/es/src/charts/BumpChart.js +2 -0
  11. package/es/src/charts/BumpChart.js.map +1 -0
  12. package/es/src/charts/Donut.js +2 -0
  13. package/es/src/charts/Donut.js.map +1 -0
  14. package/es/src/charts/Geomap.js +2 -0
  15. package/es/src/charts/Geomap.js.map +1 -0
  16. package/es/src/charts/LinePlot.js +2 -0
  17. package/es/src/charts/LinePlot.js.map +1 -0
  18. package/es/src/charts/Matrix.js +2 -0
  19. package/es/src/charts/Matrix.js.map +1 -0
  20. package/es/src/charts/Network.js +2 -0
  21. package/es/src/charts/Network.js.map +1 -0
  22. package/es/src/charts/Pack.js +2 -0
  23. package/es/src/charts/Pack.js.map +1 -0
  24. package/es/src/charts/Pie.js +2 -0
  25. package/es/src/charts/Pie.js.map +1 -0
  26. package/es/src/charts/Plot.js +2 -0
  27. package/es/src/charts/Plot.js.map +1 -0
  28. package/es/src/charts/Priestley.js +2 -0
  29. package/es/src/charts/Priestley.js.map +1 -0
  30. package/es/src/charts/Radar.js +2 -0
  31. package/es/src/charts/Radar.js.map +1 -0
  32. package/es/src/charts/RadialMatrix.js +2 -0
  33. package/es/src/charts/RadialMatrix.js.map +1 -0
  34. package/es/src/charts/Rings.js +2 -0
  35. package/es/src/charts/Rings.js.map +1 -0
  36. package/es/src/charts/Sankey.js +2 -0
  37. package/es/src/charts/Sankey.js.map +1 -0
  38. package/es/src/charts/StackedArea.js +2 -0
  39. package/es/src/charts/StackedArea.js.map +1 -0
  40. package/es/src/charts/Tree.js +2 -0
  41. package/es/src/charts/Tree.js.map +1 -0
  42. package/es/src/charts/Treemap.js +2 -0
  43. package/es/src/charts/Treemap.js.map +1 -0
  44. package/es/src/charts/Viz.js +2 -0
  45. package/es/src/charts/Viz.js.map +1 -0
  46. package/es/src/charts/drawSteps/drawAttribution.js +2 -0
  47. package/es/src/charts/drawSteps/drawAttribution.js.map +1 -0
  48. package/es/src/charts/drawSteps/drawBack.js +2 -0
  49. package/es/src/charts/drawSteps/drawBack.js.map +1 -0
  50. package/es/src/charts/drawSteps/drawColorScale.js +2 -0
  51. package/es/src/charts/drawSteps/drawColorScale.js.map +1 -0
  52. package/es/src/charts/drawSteps/drawLegend.js +2 -0
  53. package/es/src/charts/drawSteps/drawLegend.js.map +1 -0
  54. package/es/src/charts/drawSteps/drawSubtitle.js +2 -0
  55. package/es/src/charts/drawSteps/drawSubtitle.js.map +1 -0
  56. package/es/src/charts/drawSteps/drawTimeline.js +2 -0
  57. package/es/src/charts/drawSteps/drawTimeline.js.map +1 -0
  58. package/es/src/charts/drawSteps/drawTitle.js +2 -0
  59. package/es/src/charts/drawSteps/drawTitle.js.map +1 -0
  60. package/es/src/charts/drawSteps/drawTotal.js +2 -0
  61. package/es/src/charts/drawSteps/drawTotal.js.map +1 -0
  62. package/es/src/charts/drawSteps/zoomControls.js +2 -0
  63. package/es/src/charts/drawSteps/zoomControls.js.map +1 -0
  64. package/es/src/charts/events/click.legend.js +2 -0
  65. package/es/src/charts/events/click.legend.js.map +1 -0
  66. package/es/src/charts/events/click.shape.js +2 -0
  67. package/es/src/charts/events/click.shape.js.map +1 -0
  68. package/es/src/charts/events/mouseenter.js +2 -0
  69. package/es/src/charts/events/mouseenter.js.map +1 -0
  70. package/es/src/charts/events/mouseleave.js +2 -0
  71. package/es/src/charts/events/mouseleave.js.map +1 -0
  72. package/es/src/charts/events/mousemove.legend.js +2 -0
  73. package/es/src/charts/events/mousemove.legend.js.map +1 -0
  74. package/es/src/charts/events/mousemove.shape.js +2 -0
  75. package/es/src/charts/events/mousemove.shape.js.map +1 -0
  76. package/es/src/charts/events/touchstart.body.js +2 -0
  77. package/es/src/charts/events/touchstart.body.js.map +1 -0
  78. package/es/src/charts/helpers/matrixData.js +2 -0
  79. package/es/src/charts/helpers/matrixData.js.map +1 -0
  80. package/es/src/charts/helpers/tileAttributions.js +2 -0
  81. package/es/src/charts/helpers/tileAttributions.js.map +1 -0
  82. package/es/src/charts/index.js +2 -0
  83. package/es/src/charts/index.js.map +1 -0
  84. package/es/src/charts/plotBuffers/Bar.js +2 -0
  85. package/es/src/charts/plotBuffers/Bar.js.map +1 -0
  86. package/es/src/charts/plotBuffers/Box.js +2 -0
  87. package/es/src/charts/plotBuffers/Box.js.map +1 -0
  88. package/es/src/charts/plotBuffers/Circle.js +2 -0
  89. package/es/src/charts/plotBuffers/Circle.js.map +1 -0
  90. package/es/src/charts/plotBuffers/Line.js +2 -0
  91. package/es/src/charts/plotBuffers/Line.js.map +1 -0
  92. package/es/src/charts/plotBuffers/Rect.js +2 -0
  93. package/es/src/charts/plotBuffers/Rect.js.map +1 -0
  94. package/es/src/charts/plotBuffers/discreteBuffer.js +2 -0
  95. package/es/src/charts/plotBuffers/discreteBuffer.js.map +1 -0
  96. package/es/src/charts/plotBuffers/numericBuffer.js +2 -0
  97. package/es/src/charts/plotBuffers/numericBuffer.js.map +1 -0
  98. package/es/src/components/Axis.js +2 -0
  99. package/es/src/components/Axis.js.map +1 -0
  100. package/es/src/components/AxisBottom.js +2 -0
  101. package/es/src/components/AxisBottom.js.map +1 -0
  102. package/es/src/components/AxisLeft.js +2 -0
  103. package/es/src/components/AxisLeft.js.map +1 -0
  104. package/es/src/components/AxisRight.js +2 -0
  105. package/es/src/components/AxisRight.js.map +1 -0
  106. package/es/src/components/AxisTop.js +2 -0
  107. package/es/src/components/AxisTop.js.map +1 -0
  108. package/es/src/components/ColorScale.js +2 -0
  109. package/es/src/components/ColorScale.js.map +1 -0
  110. package/es/src/components/Legend.js +2 -0
  111. package/es/src/components/Legend.js.map +1 -0
  112. package/es/src/components/Message.js +2 -0
  113. package/es/src/components/Message.js.map +1 -0
  114. package/es/src/components/TextBox.js +2 -0
  115. package/es/src/components/TextBox.js.map +1 -0
  116. package/es/src/components/Timeline.js +2 -0
  117. package/es/src/components/Timeline.js.map +1 -0
  118. package/es/src/components/Tooltip.js +2 -0
  119. package/es/src/components/Tooltip.js.map +1 -0
  120. package/es/src/components/index.js +2 -0
  121. package/es/src/components/index.js.map +1 -0
  122. package/es/src/shapes/Area.js +2 -0
  123. package/es/src/shapes/Area.js.map +1 -0
  124. package/es/src/shapes/Bar.js +2 -0
  125. package/es/src/shapes/Bar.js.map +1 -0
  126. package/es/src/shapes/Box.js +2 -0
  127. package/es/src/shapes/Box.js.map +1 -0
  128. package/es/src/shapes/Circle.js +2 -0
  129. package/es/src/shapes/Circle.js.map +1 -0
  130. package/es/src/shapes/Image.js +2 -0
  131. package/es/src/shapes/Image.js.map +1 -0
  132. package/es/src/shapes/Line.js +2 -0
  133. package/es/src/shapes/Line.js.map +1 -0
  134. package/es/src/shapes/Path.js +2 -0
  135. package/es/src/shapes/Path.js.map +1 -0
  136. package/es/src/shapes/Rect.js +2 -0
  137. package/es/src/shapes/Rect.js.map +1 -0
  138. package/es/src/shapes/Shape.js +2 -0
  139. package/es/src/shapes/Shape.js.map +1 -0
  140. package/es/src/shapes/Whisker.js +2 -0
  141. package/es/src/shapes/Whisker.js.map +1 -0
  142. package/es/src/shapes/index.js +2 -0
  143. package/es/src/shapes/index.js.map +1 -0
  144. package/es/src/utils/AccessorFn.js +2 -0
  145. package/es/src/utils/AccessorFn.js.map +1 -0
  146. package/es/src/utils/BaseClass.js +2 -0
  147. package/es/src/utils/BaseClass.js.map +1 -0
  148. package/es/src/utils/D3plusConfig.js +2 -0
  149. package/es/src/utils/D3plusConfig.js.map +1 -0
  150. package/es/src/utils/RESET.js +2 -0
  151. package/es/src/utils/RESET.js.map +1 -0
  152. package/es/src/utils/accessor.js +2 -0
  153. package/es/src/utils/accessor.js.map +1 -0
  154. package/es/src/utils/configPrep.js +2 -0
  155. package/es/src/utils/configPrep.js.map +1 -0
  156. package/es/src/utils/constant.js +2 -0
  157. package/es/src/utils/constant.js.map +1 -0
  158. package/es/src/utils/getProp.js +2 -0
  159. package/es/src/utils/getProp.js.map +1 -0
  160. package/es/src/utils/index.js +2 -0
  161. package/es/src/utils/index.js.map +1 -0
  162. package/package.json +8 -8
  163. package/umd/d3plus-core.full.js +4197 -507
  164. package/umd/d3plus-core.full.js.map +1 -1
  165. package/umd/d3plus-core.full.min.js +792 -765
  166. package/umd/d3plus-core.js +1 -1
  167. package/umd/d3plus-core.min.js +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/charts/Viz.ts"],"sourcesContent":["import {group, max, merge as arrayMerge, min, range, rollup} from \"d3-array\";\nimport {brush} from \"d3-brush\";\nimport {color} from \"d3-color\";\nimport {select} from \"d3-selection\";\nimport {scaleOrdinal} from \"d3-scale\";\nimport {zoom} from \"d3-zoom\";\n\nimport {colorAssign, colorContrast, colorDefaults} from \"@d3plus/color\";\nimport {addToQueue, merge, unique} from \"@d3plus/data\";\nimport {assign, date, getSize, inViewport} from \"@d3plus/dom\";\nimport {formatAbbreviate} from \"@d3plus/format\";\nimport type {DataPoint} from \"@d3plus/data\";\nimport {fontFamily, fontFamilyStringify} from \"@d3plus/text\";\n\nimport {\n ColorScale,\n Legend,\n TextBox,\n Timeline,\n Tooltip,\n} from \"../components/index.js\";\nimport {accessor, BaseClass, constant} from \"../utils/index.js\";\n// import {Rect} from \"../shape/index.js\";\n\nimport Message from \"../components/Message.js\";\n\nimport drawBack from \"./drawSteps/drawBack.js\";\nimport drawColorScale from \"./drawSteps/drawColorScale.js\";\nimport {default as drawLegend, legendLabel} from \"./drawSteps/drawLegend.js\";\nimport drawSubtitle from \"./drawSteps/drawSubtitle.js\";\nimport drawTimeline from \"./drawSteps/drawTimeline.js\";\nimport drawTitle from \"./drawSteps/drawTitle.js\";\nimport drawTotal from \"./drawSteps/drawTotal.js\";\n\nimport zoomControls from \"./drawSteps/zoomControls.js\";\nimport drawAttribution from \"./drawSteps/drawAttribution.js\";\n\nimport clickShape from \"./events/click.shape.js\";\nimport clickLegend from \"./events/click.legend.js\";\nimport mouseenter from \"./events/mouseenter.js\";\nimport mouseleave from \"./events/mouseleave.js\";\nimport mousemoveLegend from \"./events/mousemove.legend.js\";\nimport mousemoveShape from \"./events/mousemove.shape.js\";\nimport touchstartBody from \"./events/touchstart.body.js\";\n\nfunction debounce(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n func: (...args: any[]) => void,\n delay: number,\n): (...args: unknown[]) => void {\n let timeout: ReturnType<typeof setTimeout>;\n return function (this: unknown, ...args: unknown[]) {\n const context = this;\n clearTimeout(timeout);\n timeout = setTimeout(() => func.apply(context, args), delay);\n };\n}\n\n/**\n * Default padding logic that will return false if the screen is less than 600 pixels wide.\n * @private\n */\nfunction defaultPadding(): boolean {\n return typeof window !== \"undefined\" ? window.innerWidth > 600 : true;\n}\n\n/**\n * Turns an array of values into a list string.\n * @private\n */\nfunction listify(n: DataPoint[keyof DataPoint][]): string {\n return n.reduce<string>(\n (str: string, item: DataPoint[keyof DataPoint], i: number) => {\n if (!i) str += item;\n else if (i === n.length - 1 && i === 1) str += ` and ${item}`;\n else if (i === n.length - 1) str += `, and ${item}`;\n else str += `, ${item}`;\n return str;\n },\n \"\",\n );\n}\n\n/**\n * A function that introspects the `d` Data Object for internally nested\n * d3plus data and indices, runs the accessor function on that user data.\n * @param {Function} acc Accessor function to use.\n * @param {Object} d Data Object\n * @param {Number} i Index of Data Object in Array\n * @private\n */\nfunction accessorFetch(\n acc: (d: DataPoint, i: number) => DataPoint[keyof DataPoint],\n d: DataPoint,\n i: number,\n): DataPoint[keyof DataPoint] {\n while (d.__d3plus__ && d.data) {\n d = d.data as DataPoint;\n i = d.i as number;\n }\n return acc(d, i);\n}\n\n/**\n Minimal LRU cache backed by a Map (insertion-order iteration enables O(1) eviction).\n Only .get() and .set() are used by Viz.\n @private\n*/\nclass LRU {\n private _cap: number;\n private _map: Map<string, unknown>;\n\n constructor(capacity: number) {\n this._cap = capacity;\n this._map = new Map();\n }\n get(key: string): unknown {\n if (!this._map.has(key)) return undefined;\n const val = this._map.get(key);\n this._map.delete(key);\n this._map.set(key, val);\n return val;\n }\n set(key: string, val: unknown): void {\n this._map.delete(key);\n if (this._map.size >= this._cap)\n this._map.delete(this._map.keys().next().value!);\n this._map.set(key, val);\n }\n}\n\n/**\n Creates an x/y plot based on an array of data. See [this example](https://d3plus.org/examples/d3plus-treemap/getting-started/) for help getting started using the treemap generator.\n*/\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport default class Viz extends (BaseClass as any) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [key: string]: any;\n\n /**\n Invoked when creating a new class instance, and sets any default parameters.\n @private\n */\n constructor() {\n super();\n\n this._aggs = {};\n this._ariaHidden = true;\n this._attribution = false;\n const attributionBg = \"rgba(255, 255, 255, 0.75)\";\n this._attributionStyle = {\n background: attributionBg,\n border: \"1px solid rgba(0, 0, 0, 0.25)\",\n color: colorContrast(attributionBg),\n display: \"block\",\n font: `400 11px/11px ${fontFamilyStringify(fontFamily)}`,\n margin: \"5px\",\n opacity: 0.75,\n padding: \"4px 6px 3px\",\n };\n this._backClass = new TextBox()\n .on(\"click\", () => {\n if (this._history.length) this.config(this._history.pop()).render();\n else (this.depth(this._drawDepth - 1) as this).filter(false);\n this.render();\n })\n .on(\"mousemove\", () =>\n this._backClass.select().style(\"cursor\", \"pointer\"),\n );\n this._backConfig = {\n fontSize: 10,\n padding: 5,\n resize: false,\n };\n this._cache = true;\n\n this._color = (d: DataPoint, i: number) => this._groupBy[0](d, i);\n this._colorDefaults = {\n ...colorDefaults,\n scale: scaleOrdinal().range(colorDefaults.scale.range()),\n };\n this._colorScaleClass = new ColorScale();\n this._colorScaleConfig = {\n axisConfig: {\n rounding: \"inside\",\n },\n scale: \"jenks\",\n };\n this._colorScalePadding = defaultPadding;\n this._colorScalePosition = () =>\n this._width > this._height * 1.5 ? \"right\" : \"bottom\";\n this._colorScaleMaxSize = 600;\n\n this._data = [];\n this._dataCutoff = 100;\n this._detectResize = true;\n this._detectResizeDelay = 400;\n this._detectVisible = true;\n this._detectVisibleInterval = 1000;\n this._downloadButton = false;\n this._downloadConfig = {type: \"png\"};\n this._downloadPosition = \"top\";\n this._duration = 600;\n this._fontFamily = fontFamily;\n this._hidden = [];\n this._hiddenColor = constant(\"#aaa\");\n this._hiddenOpacity = constant(0.5);\n this._history = [];\n this._groupBy = [accessor(\"id\")];\n\n this._legend = (config: Record<string, unknown>, arr: DataPoint[]) => {\n const maxGrouped = max(arr, (d: DataPoint, i: number) => {\n const id = this._groupBy[this._legendDepth].bind(this)(d, i);\n return id instanceof Array ? id.length : 1;\n });\n return arr.length > 1 && (maxGrouped ?? 0) <= 2;\n };\n this._legendClass = new Legend();\n this._legendConfig = {\n label: legendLabel.bind(this),\n shapeConfig: {\n ariaLabel: legendLabel.bind(this),\n labelConfig: {\n fontColor: undefined,\n fontResize: false,\n padding: 0,\n },\n },\n };\n this._legendFilterInvert = constant(false);\n this._legendPadding = defaultPadding;\n this._legendPosition = () =>\n this._width > this._height * 1.5 ? \"right\" : \"bottom\";\n this._legendSort = (a: DataPoint, b: DataPoint) =>\n this._drawLabel(a).localeCompare(this._drawLabel(b));\n this._legendTooltip = {};\n\n this._loadingHTML = () => `\n <div style=\"left: 50%; top: 50%; position: absolute; transform: translate(-50%, -50%);\">\n <strong>${this._translate(\"Loading Visualization\")}</strong>\n <sub style=\"bottom: 0; display: block; line-height: 1; margin-top: 5px;\"><a href=\"https://d3plus.org\" target=\"_blank\">${this._translate(\n \"Powered by D3plus\",\n )}</a></sub>\n </div>`;\n\n this._loadingMessage = true;\n this._lrucache = new LRU(10);\n this._messageClass = new Message();\n this._messageMask = \"rgba(0, 0, 0, 0.05)\";\n this._messageStyle = {\n bottom: \"0\",\n left: \"0\",\n position: \"absolute\",\n right: \"0\",\n \"text-align\": \"center\",\n top: \"0\",\n };\n\n this._noDataHTML = () => `\n <div style=\"left: 50%; top: 50%; position: absolute; transform: translate(-50%, -50%);\">\n <strong>${this._translate(\"No Data Available\")}</strong>\n </div>`;\n\n this._noDataMessage = true;\n this._on = {\n \"click.shape\": clickShape.bind(this),\n \"click.legend\": clickLegend.bind(this),\n mouseenter: mouseenter.bind(this),\n mouseleave: mouseleave.bind(this),\n \"mousemove.shape\": mousemoveShape.bind(this),\n \"mousemove.legend\": mousemoveLegend.bind(this),\n };\n this._queue = [];\n this._resizeObserver = new ResizeObserver(\n debounce((entries: ResizeObserverEntry[]) => {\n const {width, height} = entries[0]!.contentRect;\n if (\n ((width !== this._width && this._autoWidth) || (height !== this._height && this._autoHeight)) &&\n width &&\n height\n ) {\n this._setSVGSize(width, height);\n if (!this._callback) this.render();\n }\n }, this._detectResizeDelay),\n );\n this._scrollContainer = typeof window === \"undefined\" ? \"\" : window;\n this._shape = constant(\"Rect\");\n this._shapes = [];\n this._shapeConfig = {\n ariaLabel: (d: DataPoint, i: number) => this._drawLabel(d, i),\n fill: (d: DataPoint, i: number) => {\n while (d.__d3plus__ && d.data) {\n d = d.data as DataPoint;\n i = d.i as number;\n }\n if (this._colorScale) {\n const c = this._colorScale(d, i);\n if (c !== undefined && c !== null) {\n const scale = this._colorScaleClass._colorScale;\n const colors = this._colorScaleClass.color();\n if (!scale)\n return colors instanceof Array\n ? colors[colors.length - 1]\n : colors;\n else if (!scale.domain().length)\n return scale.range()[scale.range().length - 1];\n return scale(c);\n }\n }\n const c = this._color(d, i);\n if (color(c)) return c;\n return colorAssign(\n typeof c === \"string\" ? c : JSON.stringify(c),\n this._colorDefaults,\n );\n },\n labelConfig: {\n fontColor: (d: DataPoint, i: number) => {\n const c =\n typeof this._shapeConfig.fill === \"function\"\n ? this._shapeConfig.fill(d, i)\n : this._shapeConfig.fill;\n return colorContrast(c);\n },\n },\n opacity: constant(1),\n stroke: (d: DataPoint, i: number) => {\n const c =\n typeof this._shapeConfig.fill === \"function\"\n ? this._shapeConfig.fill(d, i)\n : this._shapeConfig.fill;\n return color(c)!.darker(0.25);\n },\n role: \"presentation\",\n strokeWidth: constant(0),\n };\n this._solo = [];\n\n this._subtitleClass = new TextBox();\n this._subtitleConfig = {\n ariaHidden: true,\n fontSize: 12,\n padding: 5,\n resize: false,\n textAnchor: \"middle\",\n };\n this._subtitlePadding = defaultPadding;\n\n this._svgDesc = \"\";\n this._svgTitle = \"\";\n\n this._timeline = true;\n this._timelineClass = new Timeline().align(\"end\");\n this._timelineConfig = {\n padding: 5,\n };\n this._timelinePadding = defaultPadding;\n\n this._threshold = constant(0.0001);\n this._thresholdKey = undefined;\n this._thresholdName = () => this._translate(\"Values\");\n\n this._titleClass = new TextBox();\n this._titleConfig = {\n ariaHidden: true,\n fontSize: 16,\n padding: 5,\n resize: false,\n textAnchor: \"middle\",\n };\n this._titlePadding = defaultPadding;\n\n this._tooltip = constant(true);\n this._tooltipClass = new Tooltip();\n this._tooltipConfig = {\n pointerEvents: \"none\",\n titleStyle: {\n \"max-width\": \"200px\",\n },\n };\n\n this._totalClass = new TextBox();\n this._totalConfig = {\n fontSize: 10,\n padding: 5,\n resize: false,\n textAnchor: \"middle\",\n };\n this._totalFormat = (d: number) =>\n `${this._translate(\"Total\")}: ${formatAbbreviate(d, this._locale)}`;\n this._totalPadding = defaultPadding;\n\n this._zoom = false;\n this._zoomBehavior = zoom();\n this._zoomBrush = brush();\n this._zoomBrushHandleSize = 1;\n this._zoomBrushHandleStyle = {\n fill: \"#444\",\n };\n this._zoomBrushSelectionStyle = {\n fill: \"#777\",\n \"stroke-width\": 0,\n };\n const zoomBg = \"rgba(255, 255, 255, 0.75)\";\n this._zoomControlStyle = {\n background: zoomBg,\n border: \"1px solid rgba(0, 0, 0, 0.75)\",\n color: colorContrast(zoomBg),\n display: \"block\",\n font: `900 15px/21px ${fontFamilyStringify(fontFamily)}`,\n height: \"20px\",\n margin: \"5px\",\n opacity: 0.75,\n padding: 0,\n \"text-align\": \"center\",\n width: \"20px\",\n };\n const zoomActiveBg = \"rgba(0, 0, 0, 0.75)\";\n this._zoomControlStyleActive = {\n background: zoomActiveBg,\n color: colorContrast(zoomActiveBg),\n opacity: 1,\n };\n this._zoomControlStyleHover = {\n cursor: \"pointer\",\n opacity: 1,\n };\n this._zoomFactor = 2;\n this._zoomMax = 16;\n this._zoomPadding = 20;\n this._zoomPan = true;\n this._zoomScroll = true;\n }\n\n /**\n Called by draw before anything is drawn. Formats the data and performs preparations for draw.\n @private\n */\n _preDraw(): void {\n const that = this;\n // based on the groupBy, determine the draw depth and current depth id\n this._drawDepth =\n this._depth !== void 0\n ? min([this._depth >= 0 ? this._depth : 0, this._groupBy.length - 1])\n : this._groupBy.length - 1;\n\n // Returns the current unique ID for a data point, coerced to a String.\n this._id = (d: DataPoint, i: number) => {\n const groupByDrawDepth = accessorFetch(\n this._groupBy[this._drawDepth],\n d,\n i,\n );\n return typeof groupByDrawDepth === \"number\"\n ? `${groupByDrawDepth}`\n : groupByDrawDepth;\n };\n\n // Returns an array of the current unique groupBy ID for a data point, coerced to Strings.\n this._ids = (d: DataPoint, i: number) =>\n this._groupBy\n .map(\n (g: (d: DataPoint, i: number) => DataPoint[keyof DataPoint]) =>\n `${accessorFetch(g, d, i)}`,\n )\n .filter(Boolean);\n\n this._drawLabel = (\n d: DataPoint,\n i: number,\n depth: number = this._drawDepth,\n ) => {\n if (!d) return \"\";\n while (d.__d3plus__ && d.data) {\n d = d.data as DataPoint;\n i = d.i as number;\n }\n if (d._isAggregation) {\n return `${this._thresholdName(d, i)} < ${formatAbbreviate(\n (d._threshold as number) * 100,\n this._locale,\n )}%`;\n }\n if (this._label && depth === this._drawDepth)\n return `${this._label(d, i)}`;\n const l = that._ids(d, i).slice(0, depth + 1);\n const n =\n l.reverse().find((ll: string) => !((ll as unknown) instanceof Array)) ||\n l[l.length - 1];\n return n instanceof Array ? listify(n) : `${n}`;\n };\n\n // set the default timeFilter if it has not been specified\n if (this._time && !this._timeFilter && this._data.length) {\n const dates = this._data.map(this._time).map(date);\n const d = this._data[0],\n i = 0;\n\n if (\n this._discrete &&\n `_${this._discrete}` in this &&\n this[`_${this._discrete}`](d, i) === this._time(d, i)\n ) {\n this._timeFilter = () => true;\n } else {\n const latestTime = +max(dates)!;\n this._timeFilter = (d: DataPoint, i: number) =>\n +date(this._time(d, i))! === latestTime;\n }\n }\n\n this._filteredData = [];\n this._legendData = [];\n let flatData: DataPoint[] = [];\n if (this._data.length) {\n flatData = this._timeFilter\n ? this._data.filter(this._timeFilter)\n : this._data;\n if (this._filter) flatData = flatData.filter(this._filter);\n const nestKeys: ((\n d: DataPoint,\n i: number,\n ) => DataPoint[keyof DataPoint])[] = [];\n for (let i = 0; i <= this._drawDepth; i++)\n nestKeys.push(this._groupBy[i]);\n if (this._discrete && `_${this._discrete}` in this)\n nestKeys.push(this[`_${this._discrete}`]);\n if (this._discrete && `_${this._discrete}2` in this)\n nestKeys.push(this[`_${this._discrete}2`]);\n\n const tree = rollup(\n flatData,\n (leaves: DataPoint[]) => {\n const index = this._data.indexOf(leaves[0]);\n const shape = this._shape(leaves[0], index);\n const id = this._id(leaves[0], index);\n\n const d = merge(leaves, this._aggs);\n\n if (\n !this._hidden.includes(id) &&\n (!this._solo.length || this._solo.includes(id))\n ) {\n if (!this._discrete && shape === \"Line\")\n this._filteredData = this._filteredData.concat(leaves);\n else this._filteredData.push(d);\n }\n this._legendData.push(d);\n },\n ...nestKeys,\n );\n\n this._filteredData = this._thresholdFunction(this._filteredData, tree);\n }\n\n // overrides the hoverOpacity of shapes if data is larger than cutoff\n const uniqueIds = group(this._filteredData, this._id).size;\n if (uniqueIds > this._dataCutoff) {\n if (this._userHover === undefined)\n this._userHover = this._shapeConfig.hoverOpacity || 0.5;\n if (this._userDuration === undefined)\n this._userDuration = this._shapeConfig.duration || 600;\n this._shapeConfig.hoverOpacity = 1;\n this._shapeConfig.duration = 0;\n } else if (this._userHover !== undefined) {\n this._shapeConfig.hoverOpacity = this._userHover;\n this._shapeConfig.duration = this._userDuration;\n }\n\n if (this._noDataMessage && !this._filteredData.length) {\n this._messageClass.render({\n container: this._select.node().parentNode,\n html: this._noDataHTML(this),\n mask: false,\n style: this._messageStyle,\n });\n this._select.transition().duration(this._duration).attr(\"opacity\", 0);\n }\n }\n\n /**\n Called by render once all checks are passed.\n @private\n */\n _draw(): void {\n // Sanitizes user input for legendPosition and colorScalePosition\n let legendPosition = this._legendPosition.bind(this)(this.config());\n if (![false, \"top\", \"bottom\", \"left\", \"right\"].includes(legendPosition))\n legendPosition = \"bottom\";\n let colorScalePosition = this._colorScalePosition.bind(this)(this.config());\n if (![false, \"top\", \"bottom\", \"left\", \"right\"].includes(colorScalePosition))\n colorScalePosition = \"bottom\";\n\n // Draws legend and colorScale if they are positioned \"left\" or \"right\"\n if (legendPosition === \"left\" || legendPosition === \"right\")\n drawLegend.bind(this)(this._legendData);\n if (\n colorScalePosition === \"left\" ||\n colorScalePosition === \"right\" ||\n colorScalePosition === false\n )\n drawColorScale.bind(this)();\n\n // Draws all of the top/bottom UI elements\n drawBack.bind(this)();\n drawTitle.bind(this)(this._filteredData);\n drawSubtitle.bind(this)(this._filteredData);\n drawTotal.bind(this)(this._filteredData);\n drawTimeline.bind(this)(this._filteredData);\n\n // Draws legend and colorScale if they are positioned \"top\" or \"bottom\"\n if (legendPosition === \"top\" || legendPosition === \"bottom\")\n drawLegend.bind(this)(this._legendData);\n if (colorScalePosition === \"top\" || colorScalePosition === \"bottom\")\n drawColorScale.bind(this)();\n\n this._shapes = [];\n\n // Draws a container and zoomGroup to test functionality.\n // this._testGroup = this._select.selectAll(\"g.d3plus-viz-testGroup\").data([0]);\n // const enterTest = this._testGroup.enter().append(\"g\").attr(\"class\", \"d3plus-viz-testGroup\")\n // .merge(this._testGroup);\n // this._testGroup = enterTest.merge(this._testGroup);\n // const bgHeight = this._height - this._margin.top - this._margin.bottom;\n // const bgWidth = this._width - this._margin.left - this._margin.right;\n // new Rect()\n // .data([{id: \"background\"}])\n // .select(this._testGroup.node())\n // .x(bgWidth / 2 + this._margin.left)\n // .y(bgHeight / 2 + this._margin.top)\n // .width(bgWidth)\n // .height(bgHeight)\n // .fill(\"#ccc\")\n // .render();\n\n // this._zoomGroup = this._select.selectAll(\"g.d3plus-viz-zoomGroup\").data([0]);\n // const enter = this._zoomGroup.enter().append(\"g\").attr(\"class\", \"d3plus-viz-zoomGroup\")\n // .merge(this._zoomGroup);\n\n // this._zoomGroup = enter.merge(this._zoomGroup);\n // const testConfig = {\n // on: {\n // click: this._on[\"click.shape\"],\n // mouseenter: this._on.mouseenter,\n // mouseleave: this._on.mouseleave,\n // mousemove: this._on[\"mousemove.shape\"]\n // }\n // };\n\n // const testWidth = 50;\n // this._shapes.push(new Rect()\n // .config(this._shapeConfig)\n // .config(configPrep.bind(this)(testConfig))\n // .data(this._filteredData)\n // .label(\"Test Label\")\n // .select(this._zoomGroup.node())\n // .id(this._id)\n // .x(d => {\n // if (!d.x) d.x = Math.random() * bgWidth;\n // return d.x;\n // })\n // .y(d => {\n // if (!d.y) d.y = Math.random() * bgHeight;\n // return d.y;\n // })\n // .width(testWidth)\n // .height(testWidth)\n // .render());\n }\n\n /**\n * Applies the threshold algorithm according to the type of chart used.\n * @param {Array} data The data to process.\n * @private\n */\n _thresholdFunction(data: DataPoint[], _tree?: unknown): DataPoint[] {\n return data;\n }\n\n /**\n * Detects width and height and sets SVG properties\n * @private\n */\n _setSVGSize(width?: number, height?: number): void {\n let [w, h] =\n width && height\n ? [width, height]\n : getSize(this._select.node().parentNode);\n w! -= parseFloat(this._select.style(\"border-left-width\"));\n w! -= parseFloat(this._select.style(\"border-right-width\"));\n h! -= parseFloat(this._select.style(\"border-top-width\"));\n h! -= parseFloat(this._select.style(\"border-bottom-width\"));\n \n if (this._autoWidth && this._width !== w) {\n this.width(w);\n this._select\n .style(\"width\", `${this._width}px`)\n .attr(\"width\", `${this._width}px`);\n }\n if (this._autoHeight && this._height !== h) {\n this.height(h);\n this._select\n .style(\"height\", `${this._height}px`)\n .attr(\"height\", `${this._height}px`);\n }\n }\n\n /**\n Draws the visualization given the specified configuration.\n @param callback Optional callback invoked after rendering completes.\n */\n render(callback?: () => void): this {\n this._callback = callback;\n // Resets margins and padding\n this._margin = {bottom: 0, left: 0, right: 0, top: 0};\n this._padding = {bottom: 0, left: 0, right: 0, top: 0};\n\n // Appends a fullscreen SVG to the BODY if a container has not been provided through .select().\n if (\n this._select === void 0 ||\n this._select.node().tagName.toLowerCase() !== \"svg\"\n ) {\n const parent =\n this._select === void 0\n ? select(\"body\")\n .insert(\"div\", \"#d3plus-portal\")\n .style(\"height\", \"100dvh\")\n .style(\"width\", \"100%\")\n .style(\"min-height\", \"150px\")\n : this._select;\n const svg = parent.select(\".d3plus-viz\").size()\n ? parent.select(\".d3plus-viz\")\n : parent.append(\"svg\");\n this.select(svg.node());\n }\n\n // Calculates the width and/or height of the Viz based on the this._select, if either has not been defined.\n if (\n (!this._width || !this._height) &&\n (!this._detectVisible || inViewport(this._select.node()))\n ) {\n this._autoWidth = this._width === undefined;\n this._autoHeight = this._height === undefined;\n this._setSVGSize();\n }\n\n const parent = select(this._select.node().parentNode);\n\n this._select\n .attr(\"class\", \"d3plus-viz\")\n .attr(\"aria-hidden\", this._ariaHidden)\n .attr(\"aria-labelledby\", `${this._uuid}-title ${this._uuid}-desc`)\n .attr(\"role\", \"img\")\n .attr(\"xmlns\", \"http://www.w3.org/2000/svg\")\n .attr(\"xmlns:xlink\", \"http://www.w3.org/1999/xlink\")\n .style(\"position\", \"absolute\")\n .style(\"top\", parent.style(\"padding-top\"))\n .style(\"left\", parent.style(\"padding-left\"))\n .transition()\n .duration(this._duration)\n .style(\n \"width\",\n this._width !== undefined ? `${this._width}px` : undefined,\n )\n .style(\n \"height\",\n this._height !== undefined ? `${this._height}px` : undefined,\n )\n .attr(\"width\", this._width !== undefined ? `${this._width}px` : undefined)\n .attr(\n \"height\",\n this._height !== undefined ? `${this._height}px` : undefined,\n );\n\n // sets \"position: relative\" on the SVG parent if currently undefined\n const position = parent.style(\"position\");\n if (position === \"static\") parent.style(\"position\", \"relative\");\n parent.style(\"font-family\", fontFamilyStringify(this._fontFamily));\n\n // sets initial opacity to 1, if it has not already been set\n if (this._select.attr(\"opacity\") === null) this._select.attr(\"opacity\", 1);\n\n // Updates the <title> tag if already exists else creates a new <title> tag on this.select.\n const svgTitle = this._select.selectAll(\"title\").data([0]);\n const svgTitleEnter = svgTitle\n .enter()\n .append(\"title\")\n .attr(\"id\", `${this._uuid}-title`);\n svgTitle.merge(svgTitleEnter).text(this._svgTitle);\n\n // Updates the <desc> tag if already exists else creates a new <desc> tag on this.select.\n const svgDesc = this._select.selectAll(\"desc\").data([0]);\n const svgDescEnter = svgDesc\n .enter()\n .append(\"desc\")\n .attr(\"id\", `${this._uuid}-desc`);\n svgDesc.merge(svgDescEnter).text(this._svgDesc);\n\n this._visiblePoll = clearInterval(this._visiblePoll);\n this._resizePoll = clearTimeout(this._resizePoll);\n this._scrollPoll = clearTimeout(this._scrollPoll);\n select(this._scrollContainer).on(`scroll.${this._uuid}`, null);\n if (this._detectVisible && this._select.style(\"visibility\") === \"hidden\") {\n this._visiblePoll = setInterval(() => {\n if (this._select.style(\"visibility\") !== \"hidden\") {\n this._visiblePoll = clearInterval(this._visiblePoll);\n this.render(callback);\n }\n }, this._detectVisibleInterval);\n } else if (\n this._detectVisible &&\n this._select.style(\"display\") === \"none\"\n ) {\n this._visiblePoll = setInterval(() => {\n if (this._select.style(\"display\") !== \"none\") {\n this._visiblePoll = clearInterval(this._visiblePoll);\n this.render(callback);\n }\n }, this._detectVisibleInterval);\n } else if (this._detectVisible && !inViewport(this._select.node())) {\n select(this._scrollContainer).on(`scroll.${this._uuid}`, () => {\n if (!this._scrollPoll) {\n this._scrollPoll = setTimeout(() => {\n if (inViewport(this._select.node())) {\n select(this._scrollContainer).on(`scroll.${this._uuid}`, null);\n this.render(callback);\n }\n this._scrollPoll = clearTimeout(this._scrollPoll);\n }, this._detectVisibleInterval);\n }\n });\n } else {\n const promises: Promise<void>[] = [];\n\n this._queue.forEach(\n (\n p: [\n (...args: unknown[]) => void,\n string,\n ((data: unknown) => unknown) | undefined,\n string,\n ],\n ) => {\n const cache = this._cache\n ? this._lrucache.get(`${p[3]}_${p[1]}`)\n : undefined;\n if (!cache) {\n promises.push(\n new Promise<void>(resolve => {\n p[0](p[1], p[2], p[3], (err: unknown) => {\n if (err) console.error(err);\n resolve();\n });\n }),\n );\n } else this[`_${p[3]}`] = p[2] ? p[2](cache) : cache;\n },\n );\n this._queue = [];\n\n if (this._loadingMessage && promises.length) {\n this._messageClass.render({\n container: this._select.node().parentNode,\n html: this._loadingHTML(this),\n mask: this._filteredData ? this._messageMask : false,\n style: this._messageStyle,\n });\n }\n\n Promise.all(promises).then(() => {\n // creates a data table as DOM elements inside of the SVG for accessibility\n // only if this._ariaHidden is set to true\n const columns =\n this._data instanceof Array && this._data.length > 0\n ? Object.keys(this._data[0])\n : [];\n const svgTable = this._select\n .selectAll(\"g.data-table\")\n .data(\n !this._ariaHidden &&\n this._data instanceof Array &&\n this._data.length\n ? [0]\n : [],\n );\n const svgTableEnter = svgTable\n .enter()\n .append(\"g\")\n .attr(\"class\", \"data-table\")\n .attr(\"role\", \"table\");\n svgTable.exit().remove();\n const rows = svgTable\n .merge(svgTableEnter)\n .selectAll(\"text\")\n .data(\n this._data instanceof Array ? range(0, this._data.length + 1) : [],\n );\n rows.exit().remove();\n const cells = rows\n .merge(rows.enter().append(\"text\").attr(\"role\", \"row\"))\n .selectAll(\"tspan\")\n .data((d: number, i: number) =>\n columns.map((c: string) => ({\n role: i ? \"cell\" : \"columnheader\",\n text: i ? this._data[i - 1][c] : c,\n })),\n );\n cells.exit().remove();\n cells\n .merge(cells.enter().append(\"tspan\"))\n .attr(\"role\", (d: {role: string; text: string}) => d.role)\n .attr(\"dy\", \"-1000px\")\n .html((d: {role: string; text: string}) => d.text);\n\n // finishes the draw cycle\n this._preDraw();\n this._draw();\n zoomControls.bind(this)();\n drawAttribution.bind(this)();\n\n if (\n this._messageClass._isVisible &&\n (!this._noDataMessage || this._filteredData.length)\n ) {\n this._messageClass.hide();\n if (this._select.attr(\"opacity\") === \"0\")\n this._select\n .transition()\n .duration(this._duration)\n .attr(\"opacity\", 1);\n }\n\n if (this._detectResize && (this._autoWidth || this._autoHeight)) {\n this._resizeObserver.observe(this._select.node().parentNode);\n } else {\n this._resizeObserver.unobserve(this._select.node().parentNode);\n }\n\n if (callback)\n setTimeout(() => {\n callback();\n this._callback = undefined;\n }, this._duration + 100);\n });\n }\n\n // Attaches touchstart event listener to the BODY to hide the tooltip when the user touches any element without data\n select(\"body\").on(`touchstart.${this._uuid}`, touchstartBody.bind(this));\n\n return this;\n }\n\n /**\n Tears down the visualization: disconnects the ResizeObserver and removes DOM event listeners. Call this when unmounting to avoid memory leaks.\n */\n destroy(): this {\n this._resizeObserver.disconnect();\n this._tooltipClass.data([]).render();\n select(\"body\").on(`touchstart.${this._uuid}`, null);\n return this;\n }\n\n /**\n The active callback function for highlighting shapes.\n*/\n active(\n _?: ((d: DataPoint, i: number) => boolean) | false,\n ): this | ((d: DataPoint, i: number) => boolean) | false {\n this._active = _;\n\n if (this._shapeConfig.activeOpacity !== 1) {\n this._shapes.forEach((s: {active: (...args: unknown[]) => unknown}) => s.active(_));\n if (this._legend) this._legendClass.active(_);\n }\n\n return this;\n }\n\n /**\n Custom aggregation methods for each data key.\n*/\n aggs(_?: Record<string, unknown>): this | Record<string, unknown> {\n return arguments.length\n ? ((this._aggs = assign(this._aggs, _!)), this)\n : this._aggs;\n }\n\n /**\n The \"aria-hidden\" attribute of the containing SVG element. The default value is \"false\", but if you need to hide the SVG from screen readers set this property to \"true\".\n*/\n ariaHidden(_?: boolean): this | boolean {\n return arguments.length ? ((this._ariaHidden = _), this) : this._ariaHidden;\n }\n\n /**\n 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).\n*/\n attribution(_?: string | boolean): this | string | boolean {\n return arguments.length\n ? ((this._attribution = _), this)\n : this._attribution;\n }\n\n /**\n Configuration object for the attribution style.\n*/\n attributionStyle(\n _?: Record<string, unknown>,\n ): this | Record<string, unknown> {\n return arguments.length\n ? ((this._attributionStyle = assign(this._attributionStyle, _!)), this)\n : this._attributionStyle;\n }\n\n /**\n Configuration object for the back button.\n*/\n backConfig(_?: Record<string, unknown>): this | Record<string, unknown> {\n return arguments.length\n ? ((this._backConfig = assign(this._backConfig, _!)), this)\n : this._backConfig;\n }\n\n /**\n 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.\n*/\n cache(_?: boolean): this | boolean {\n return arguments.length ? ((this._cache = _), this) : this._cache;\n }\n\n /**\n 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.\n*/\n color(\n _?:\n | string\n | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint])\n | false,\n ):\n | this\n | string\n | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint])\n | false {\n return arguments.length\n ? ((this._color = !_ || typeof _ === \"function\" ? _ : accessor(_)), this)\n : this._color;\n }\n\n /**\n 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.\n*/\n colorScale(\n _?:\n | string\n | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint])\n | false,\n ):\n | this\n | string\n | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint])\n | false {\n return arguments.length\n ? ((this._colorScale = !_ || typeof _ === \"function\" ? _ : accessor(_)),\n this)\n : this._colorScale;\n }\n\n /**\n A pass-through to the config method of ColorScale.\n*/\n colorScaleConfig(\n _?: Record<string, unknown>,\n ): this | Record<string, unknown> {\n return arguments.length\n ? ((this._colorScaleConfig = assign(this._colorScaleConfig, _!)), this)\n : this._colorScaleConfig;\n }\n\n /**\n 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.\n*/\n colorScalePadding(\n _?: boolean | (() => boolean),\n ): this | boolean | (() => boolean) {\n return arguments.length\n ? ((this._colorScalePadding = typeof _ === \"function\" ? _ : constant(_)),\n this)\n : this._colorScalePadding;\n }\n\n /**\n 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.\n*/\n colorScalePosition(\n _?: string | boolean | (() => string | boolean),\n ): this | string | boolean | (() => string | boolean) {\n return arguments.length\n ? ((this._colorScalePosition = typeof _ === \"function\" ? _ : constant(_)),\n this)\n : this._colorScalePosition;\n }\n\n /**\n The maximum pixel size for drawing the color scale: width for horizontal scales and height for vertical scales.\n*/\n colorScaleMaxSize(_?: number): this | number {\n return arguments.length\n ? ((this._colorScaleMaxSize = _), this)\n : this._colorScaleMaxSize;\n }\n\n /**\n The primary data array used to draw 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`.\n\nIf your data URL needs specific headers to be set, an Object with \"url\" and \"headers\" keys may also be passed.\n\nAdditionally, a custom formatting function can be passed as a second argument to this method. This custom function will be passed the data that has been loaded, as long as there are no errors. This function should return the final array of obejcts to be used as the primary data array. For example, some JSON APIs return the headers split from the data values to save bandwidth. These would need be joined using a custom formatter.\n\nIf you would like to specify certain configuration options based on the yet-to-be-loaded data, you can also return a full `config` object from the data formatter (including the new `data` array as a key in the object).\n\nDefaults to an empty array (`[]`).\n @param f The data array or a URL string to load data from.\n */\n data(\n _?: DataPoint[] | string | {url: string; headers: Record<string, string>},\n f?: (data: DataPoint[]) => DataPoint[] | Record<string, unknown>,\n ): this | DataPoint[] {\n if (arguments.length) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n addToQueue.bind(this as any)(_ as any, f, \"data\");\n this._hidden = [];\n this._solo = [];\n if (\n this._userData &&\n JSON.stringify(_) !== JSON.stringify(this._userData)\n ) {\n this._timeFilter = false;\n this._timelineSelection = false;\n }\n this._userData = _;\n return this;\n }\n return this._data;\n }\n\n /**\n 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).\n*/\n dataCutoff(_?: number): this | number {\n return arguments.length ? ((this._dataCutoff = _), this) : this._dataCutoff;\n }\n\n /**\n The current depth of the visualization. The value should correspond with an index in the [groupBy](#groupBy) array.\n*/\n depth(_?: number): this | number {\n return arguments.length ? ((this._depth = _), this) : this._depth;\n }\n\n /**\n 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.\n*/\n detectResize(_?: boolean): this | boolean {\n return arguments.length\n ? ((this._detectResize = _), this)\n : this._detectResize;\n }\n\n /**\n When resizing the browser window, this is the millisecond delay to trigger the resize event.\n*/\n detectResizeDelay(_?: number): this | number {\n return arguments.length\n ? ((this._detectResizeDelay = _), this)\n : this._detectResizeDelay;\n }\n\n /**\n 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.\n*/\n detectVisible(_?: boolean): this | boolean {\n return arguments.length\n ? ((this._detectVisible = _), this)\n : this._detectVisible;\n }\n\n /**\n The interval, in milliseconds, for checking if the visualization is visible on the page.\n*/\n detectVisibleInterval(_?: number): this | number {\n return arguments.length\n ? ((this._detectVisibleInterval = _), this)\n : this._detectVisibleInterval;\n }\n\n /**\n If *value* is specified, sets the discrete accessor to the specified method name (usually an axis) and returns the current class instance.\n*/\n discrete(_?: string): this | string {\n return arguments.length ? ((this._discrete = _), this) : this._discrete;\n }\n\n /**\n Shows a button that allows for downloading the current visualization.\n*/\n downloadButton(_?: boolean): this | boolean {\n return arguments.length\n ? ((this._downloadButton = _), this)\n : this._downloadButton;\n }\n\n /**\n Sets specific options of the saveElement function used when downloading the visualization.\n*/\n downloadConfig(_?: Record<string, unknown>): this | Record<string, unknown> {\n return arguments.length\n ? ((this._downloadConfig = assign(this._downloadConfig, _!)), this)\n : this._downloadConfig;\n }\n\n /**\n Defines which control group to add the download button into.\n*/\n downloadPosition(_?: string): this | string {\n return arguments.length\n ? ((this._downloadPosition = _), this)\n : this._downloadPosition;\n }\n\n /**\n The animation duration in milliseconds.\n*/\n duration(_?: number): this | number {\n return arguments.length ? ((this._duration = _), this) : this._duration;\n }\n\n /**\n A filter function applied to the data before drawing.\n*/\n filter(\n _?: ((d: DataPoint, i: number) => boolean) | false,\n ): this | ((d: DataPoint, i: number) => boolean) | false {\n return arguments.length ? ((this._filter = _), this) : this._filter;\n }\n\n /**\n The font family used throughout the visualization.\n*/\n fontFamily(_?: string | string[]): this | string | string[] {\n if (arguments.length) {\n const labelConfig = {fontFamily: _};\n\n const axisConfig = {titleConfig: labelConfig, shapeConfig: {labelConfig}};\n\n this.shapeConfig({labelConfig});\n this.colorScaleConfig({axisConfig});\n\n [\"axis\", \"column\", \"row\", \"timeline\", \"x\", \"y\", \"x2\", \"y2\"].forEach(\n (axis: string) => {\n const method = `${axis}Config`;\n if (this[method]) this[method](axisConfig);\n },\n );\n [\"back\", \"title\", \"total\", \"subtitle\"].forEach((label: string) => {\n const method = `${label}Config`;\n if (this[method]) this[method](labelConfig);\n });\n\n this.tooltipConfig({\n tooltipStyle: {\"font-family\": fontFamilyStringify(_!)},\n });\n\n this._fontFamily = _;\n return this;\n }\n return this._fontFamily;\n }\n\n /**\n 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.\n*/\n groupBy(\n _?:\n | string\n | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint])\n | (string | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint]))[],\n ): this | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint])[] {\n if (!arguments.length) return this._groupBy;\n this._groupByRaw = _;\n const arr: (string | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint]))[] =\n _ instanceof Array ? _ : [_!];\n return (\n (this._groupBy = arr.map(\n (\n k: string | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint]),\n ) => {\n if (typeof k === \"function\") return k;\n else {\n if (!this._aggs[k]) {\n this._aggs[k] = (\n a: DataPoint[],\n c: (d: DataPoint) => DataPoint[keyof DataPoint],\n ) => {\n const v = unique(a.map(c));\n return v.length === 1 ? v[0] : v;\n };\n }\n return accessor(k);\n }\n },\n )),\n this\n );\n }\n\n /**\n The overall height of the visualization in pixels.\n*/\n height(_?: number): this | number {\n return arguments.length ? ((this._height = _), this) : this._height;\n }\n\n /**\n Defines the color used for legend shapes when the corresponding grouping is hidden from display (by clicking on the legend).\n*/\n hiddenColor(\n _?: string | ((d: DataPoint, i: number) => string),\n ): this | string | ((d: DataPoint, i: number) => string) {\n return arguments.length\n ? ((this._hiddenColor = typeof _ === \"function\" ? _ : constant(_)), this)\n : this._hiddenColor;\n }\n\n /**\n Defines the opacity used for legend labels when the corresponding grouping is hidden from display (by clicking on the legend).\n*/\n hiddenOpacity(\n _?: number | ((d: DataPoint, i: number) => number),\n ): this | number | ((d: DataPoint, i: number) => number) {\n return arguments.length\n ? ((this._hiddenOpacity = typeof _ === \"function\" ? _ : constant(_)),\n this)\n : this._hiddenOpacity;\n }\n\n /**\n The hover callback function for highlighting shapes on mouseover.\n*/\n hover(_?: ((d: DataPoint, i: number) => boolean) | false): this {\n let hoverFunction = (this._hover = _);\n\n if (this._shapeConfig.hoverOpacity !== 1 && _ !== undefined) {\n if (typeof _ === \"function\") {\n let shapeData = arrayMerge(\n this._shapes.map((s: {data: () => DataPoint[]}) => s.data()),\n );\n shapeData = shapeData.concat(this._legendClass.data());\n const activeData = _ ? (shapeData as DataPoint[]).filter(_ as (d: DataPoint) => boolean) : [];\n\n let activeIds: string[] = [];\n (activeData.map(this._ids) as string[][]).forEach((ids: string[]) => {\n for (let x = 1; x <= ids.length; x++) {\n activeIds.push(JSON.stringify(ids.slice(0, x)));\n }\n });\n activeIds = activeIds.filter(\n (id: string, i: number) => activeIds.indexOf(id) === i,\n );\n\n if (activeIds.length)\n hoverFunction = (d: DataPoint, i: number) =>\n activeIds.includes(JSON.stringify(this._ids(d, i)));\n }\n\n this._shapes.forEach((s: {hover: (...args: unknown[]) => unknown}) => s.hover(hoverFunction));\n if (this._legend) this._legendClass.hover(hoverFunction);\n }\n\n return this;\n }\n\n /**\n Accessor function or string key for the label of each data point.\n*/\n label(\n _?: string | ((d: DataPoint, i: number) => string),\n ): this | string | ((d: DataPoint, i: number) => string) {\n return arguments.length\n ? ((this._label = typeof _ === \"function\" ? _ : constant(_)), this)\n : this._label;\n }\n\n /**\n Whether to display the legend.\n*/\n legend(\n _?:\n | boolean\n | ((config: Record<string, unknown>, arr: DataPoint[]) => boolean),\n ):\n | this\n | boolean\n | ((config: Record<string, unknown>, arr: DataPoint[]) => boolean) {\n return arguments.length\n ? ((this._legend = typeof _ === \"function\" ? _ : constant(_)), this)\n : this._legend;\n }\n\n /**\n Configuration object passed to the legend's config method.\n*/\n legendConfig(_?: Record<string, unknown>): this | Record<string, unknown> {\n return arguments.length\n ? ((this._legendConfig = assign(this._legendConfig, _!)), this)\n : this._legendConfig;\n }\n\n /**\n 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.\n*/\n legendFilterInvert(\n _?: boolean | (() => boolean),\n ): this | boolean | (() => boolean) {\n return arguments.length\n ? ((this._legendFilterInvert = typeof _ === \"function\" ? _ : constant(_)),\n this)\n : this._legendFilterInvert;\n }\n\n /**\n 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.\n*/\n legendPadding(\n _?: boolean | (() => boolean),\n ): this | boolean | (() => boolean) {\n return arguments.length\n ? ((this._legendPadding = typeof _ === \"function\" ? _ : constant(_)),\n this)\n : this._legendPadding;\n }\n\n /**\n Defines which side of the visualization to anchor the legend. Expected values are `\"top\"`, `\"bottom\"`, `\"left\"`, and `\"right\"`.\n*/\n legendPosition(_?: string | (() => string)): this | string | (() => string) {\n return arguments.length\n ? ((this._legendPosition = typeof _ === \"function\" ? _ : constant(_)),\n this)\n : this._legendPosition;\n }\n\n /**\n A JavaScript [sort comparator function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort) used to sort the legend.\n*/\n legendSort(\n _?: (a: DataPoint, b: DataPoint) => number,\n ): this | ((a: DataPoint, b: DataPoint) => number) {\n return arguments.length ? ((this._legendSort = _), this) : this._legendSort;\n }\n\n /**\n Configuration object for the legend tooltip.\n*/\n legendTooltip(_?: Record<string, unknown>): this | Record<string, unknown> {\n return arguments.length\n ? ((this._legendTooltip = assign(this._legendTooltip, _!)), this)\n : this._legendTooltip;\n }\n\n /**\n The inner HTML of the status message 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.\n*/\n loadingHTML(\n _?: string | ((viz: Viz) => string),\n ): this | string | ((viz: Viz) => string) {\n return arguments.length\n ? ((this._loadingHTML = typeof _ === \"function\" ? _ : constant(_)), this)\n : this._loadingHTML;\n }\n\n /**\n Toggles the visibility of the status message that is displayed when loading AJAX requests and displaying errors.\n*/\n loadingMessage(_?: boolean): this | boolean {\n return arguments.length\n ? ((this._loadingMessage = _), this)\n : this._loadingMessage;\n }\n\n /**\n The color of the mask displayed underneath the status message when loading AJAX requests and displaying errors. Set to `false` to turn off the mask completely.\n*/\n messageMask(_?: string | boolean): this | string | boolean {\n return arguments.length\n ? ((this._messageMask = _), this)\n : this._messageMask;\n }\n\n /**\n Defines the CSS style properties for the status message that is displayed when loading AJAX requests and displaying errors.\n*/\n messageStyle(_?: Record<string, unknown>): this | Record<string, unknown> {\n return arguments.length\n ? ((this._messageStyle = assign(this._messageStyle, _!)), this)\n : this._messageStyle;\n }\n\n /**\n The inner HTML of the status message 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.\n*/\n noDataHTML(\n _?: string | ((viz: Viz) => string),\n ): this | string | ((viz: Viz) => string) {\n return arguments.length\n ? ((this._noDataHTML = typeof _ === \"function\" ? _ : constant(_)), this)\n : this._noDataHTML;\n }\n\n /**\n Toggles the visibility of the status message that is displayed when no data is supplied to the visualization.\n*/\n noDataMessage(_?: boolean): this | boolean {\n return arguments.length\n ? ((this._noDataMessage = _), this)\n : this._noDataMessage;\n }\n\n /**\n If using scroll or visibility detection, this method allow a custom override of the element to which the scroll detection function gets attached.\n*/\n scrollContainer(\n _?: string | HTMLElement | Window,\n ): this | string | HTMLElement | Window {\n return arguments.length\n ? ((this._scrollContainer = _), this)\n : this._scrollContainer;\n }\n\n /**\n The SVG container element as a d3 selector or DOM element. Defaults to `undefined`.\n*/\n select(_?: string | HTMLElement): this | ReturnType<typeof select> {\n return arguments.length\n ? ((this._select = select(_! as string)), this)\n : this._select;\n }\n\n /**\n Changes the primary shape used to represent each data point in a visualization. Not all visualizations support changing shapes, this method can be provided the String name of a D3plus shape class (for example, \"Rect\" or \"Circle\"), or an accessor Function that returns the String class name to be used for each individual data point.\n*/\n shape(\n _?: string | ((d: DataPoint, i: number) => string),\n ): this | string | ((d: DataPoint, i: number) => string) {\n return arguments.length\n ? ((this._shape = typeof _ === \"function\" ? _ : constant(_)), this)\n : this._shape;\n }\n\n /**\n Configuration object with key/value pairs applied as method calls on each shape.\n*/\n shapeConfig(_?: Record<string, unknown>): this | Record<string, unknown> {\n return arguments.length\n ? ((this._shapeConfig = assign(this._shapeConfig, _!)), this)\n : this._shapeConfig;\n }\n\n /**\n Accessor function or string for the visualization's subtitle.\n*/\n subtitle(\n _?: string | ((data: DataPoint[]) => string),\n ): this | string | ((data: DataPoint[]) => string) {\n return arguments.length\n ? ((this._subtitle = typeof _ === \"function\" ? _ : constant(_)), this)\n : this._subtitle;\n }\n\n /**\n Configuration object for the subtitle.\n*/\n subtitleConfig(_?: Record<string, unknown>): this | Record<string, unknown> {\n return arguments.length\n ? ((this._subtitleConfig = assign(this._subtitleConfig, _!)), this)\n : this._subtitleConfig;\n }\n\n /**\n Tells the subtitle 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 subtitle appears centered above the x-axis. By default, this padding is only applied on screens larger than 600 pixels wide.\n*/\n subtitlePadding(\n _?: boolean | (() => boolean),\n ): this | boolean | (() => boolean) {\n return arguments.length\n ? ((this._subtitlePadding = typeof _ === \"function\" ? _ : constant(_)),\n this)\n : this._subtitlePadding;\n }\n\n /**\n The description text for the SVG `<desc>` element, used for accessibility.\n*/\n svgDesc(_?: string): this | string {\n return arguments.length ? ((this._svgDesc = _), this) : this._svgDesc;\n }\n\n /**\n The title text for the SVG `<title>` element, used for accessibility.\n*/\n svgTitle(_?: string): this | string {\n return arguments.length ? ((this._svgTitle = _), this) : this._svgTitle;\n }\n\n /**\n The threshold value for bucketing small data points together.\n*/\n threshold(\n _?: number | ((data: DataPoint[]) => number),\n ): this | number | ((data: DataPoint[]) => number) {\n if (arguments.length) {\n if (typeof _ === \"function\") {\n this._threshold = _;\n } else if (isFinite(_!) && !isNaN(_!)) {\n this._threshold = constant(_! * 1);\n }\n return this;\n } else return this._threshold;\n }\n\n /**\n Accessor for the value used in the threshold algorithm.\n @param key The data key used to group values for thresholding.\n*/\n thresholdKey(\n key?: string | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint]),\n ): this | string | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint]) {\n if (arguments.length) {\n if (typeof key === \"function\") {\n this._thresholdKey = key;\n } else {\n this._thresholdKey = accessor(key!);\n }\n return this;\n } else return this._thresholdKey;\n }\n\n /**\n The label displayed for bucketed threshold items.\n*/\n thresholdName(\n _?: string | ((d: DataPoint, i: number) => string),\n ): this | string | ((d: DataPoint, i: number) => string) {\n return arguments.length\n ? ((this._thresholdName = typeof _ === \"function\" ? _ : constant(_)),\n this)\n : this._thresholdName;\n }\n\n /**\n Accessor function or string key for the time dimension of each data point.\n*/\n time(\n _?:\n | string\n | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint])\n | false,\n ):\n | this\n | string\n | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint])\n | false {\n if (arguments.length) {\n if (typeof _ === \"function\") {\n this._time = _;\n } else if (_) {\n this._time = accessor(_);\n if (!this._aggs[_]) {\n this._aggs[_] = (\n a: DataPoint[],\n c: (d: DataPoint) => DataPoint[keyof DataPoint],\n ) => {\n const v = unique(a.map(c));\n return v.length === 1 ? v[0] : v;\n };\n }\n if (\n this._userTime &&\n JSON.stringify(_) !== JSON.stringify(this._userTime)\n ) {\n this._timeFilter = false;\n this._timelineSelection = false;\n }\n this._userTime = _;\n } else {\n this._time = undefined;\n this._userTime = undefined;\n this._timeFilter = false;\n this._timelineSelection = false;\n }\n return this;\n } else return this._time;\n }\n\n /**\n A filter function that limits which time periods are shown.\n*/\n timeFilter(\n _?: ((d: DataPoint, i: number) => boolean) | false,\n ): this | ((d: DataPoint, i: number) => boolean) | false {\n return arguments.length ? ((this._timeFilter = _), this) : this._timeFilter;\n }\n\n /**\n Whether to display the timeline.\n*/\n timeline(_?: boolean): this | boolean {\n return arguments.length ? ((this._timeline = _), this) : this._timeline;\n }\n\n /**\n Configuration object for the timeline.\n*/\n timelineConfig(_?: Record<string, unknown>): this | Record<string, unknown> {\n return arguments.length\n ? ((this._timelineConfig = assign(this._timelineConfig, _!)), this)\n : this._timelineConfig;\n }\n\n /**\n The starting time or range for the timeline. Can be a single Date/String, or an Array of 2 values representing the min and max.\n*/\n timelineDefault(_?: Date | string | (Date | string)[]): this | Date[] {\n if (arguments.length) {\n if (!(_ instanceof Array)) _ = [_!, _!];\n this._timelineDefault = (_ as (Date | string)[])\n .map(d => date(d as string | number | false))\n .filter((d): d is Date => d !== false);\n return this;\n } else return this._timelineDefault;\n }\n\n /**\n Tells the timeline 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 timeline appears centered underneath the x-axis. By default, this padding is only applied on screens larger than 600 pixels wide.\n*/\n timelinePadding(\n _?: boolean | (() => boolean),\n ): this | boolean | (() => boolean) {\n return arguments.length\n ? ((this._timelinePadding = typeof _ === \"function\" ? _ : constant(_)),\n this)\n : this._timelinePadding;\n }\n\n /**\n Accessor function or string for the visualization's title.\n*/\n title(\n _?: string | ((data: DataPoint[]) => string),\n ): this | string | ((data: DataPoint[]) => string) {\n return arguments.length\n ? ((this._title = typeof _ === \"function\" ? _ : constant(_)), this)\n : this._title;\n }\n\n /**\n Configuration object for the title.\n*/\n titleConfig(_?: Record<string, unknown>): this | Record<string, unknown> {\n return arguments.length\n ? ((this._titleConfig = assign(this._titleConfig, _!)), this)\n : this._titleConfig;\n }\n\n /**\n Tells the title 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 title appears centered above the x-axis. By default, this padding is only applied on screens larger than 600 pixels wide.\n*/\n titlePadding(\n _?: boolean | (() => boolean),\n ): this | boolean | (() => boolean) {\n return arguments.length\n ? ((this._titlePadding = typeof _ === \"function\" ? _ : constant(_)), this)\n : this._titlePadding;\n }\n\n /**\n Whether to display tooltips on hover.\n*/\n tooltip(\n _?: boolean | ((d: DataPoint, i: number) => boolean),\n ): this | boolean | ((d: DataPoint, i: number) => boolean) {\n return arguments.length\n ? ((this._tooltip = typeof _ === \"function\" ? _ : constant(_)), this)\n : this._tooltip;\n }\n\n /**\n Configuration object for the tooltip.\n*/\n tooltipConfig(_?: Record<string, unknown>): this | Record<string, unknown> {\n return arguments.length\n ? ((this._tooltipConfig = assign(this._tooltipConfig, _!)), this)\n : this._tooltipConfig;\n }\n\n /**\n Accessor function or string key for the total value displayed in the visualization.\n*/\n total(\n _?: boolean | string | ((d: DataPoint, i: number) => number),\n ): this | boolean | string | ((d: DataPoint, i: number) => number) {\n if (arguments.length) {\n if (typeof _ === \"function\") this._total = _;\n else if (_) this._total = accessor(_ as string);\n else this._total = false;\n return this;\n } else return this._total;\n }\n\n /**\n Configuration object for the total bar.\n*/\n totalConfig(_?: Record<string, unknown>): this | Record<string, unknown> {\n return arguments.length\n ? ((this._totalConfig = assign(this._totalConfig, _!)), this)\n : this._totalConfig;\n }\n\n /**\n Formatter function for the value in the total bar.\n*/\n totalFormat(_?: (d: number) => string): this | ((d: number) => string) {\n return arguments.length\n ? ((this._totalFormat = _), this)\n : this._totalFormat;\n }\n\n /**\n Tells the total 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 total appears centered above the x-axis. By default, this padding is only applied on screens larger than 600 pixels wide.\n*/\n totalPadding(\n _?: boolean | (() => boolean),\n ): this | boolean | (() => boolean) {\n return arguments.length\n ? ((this._totalPadding = typeof _ === \"function\" ? _ : constant(_)), this)\n : this._totalPadding;\n }\n\n /**\n The overall width of the visualization in pixels.\n*/\n width(_?: number): this | number {\n return arguments.length ? ((this._width = _), this) : this._width;\n }\n\n /**\n Toggles the ability to zoom/pan the visualization. Certain parameters for zooming are required to be hooked up on a visualization by visualization basis.\n*/\n zoom(_?: boolean): this | boolean {\n return arguments.length ? ((this._zoom = _), this) : this._zoom;\n }\n\n /**\n The pixel stroke-width of the zoom brush area.\n*/\n zoomBrushHandleSize(_?: number): this | number {\n return arguments.length\n ? ((this._zoomBrushHandleSize = _), this)\n : this._zoomBrushHandleSize;\n }\n\n /**\n An object containing CSS key/value pairs that is used to style the outer handle area of the zoom brush. Passing `false` will remove all default styling.\n*/\n zoomBrushHandleStyle(\n _?: Record<string, unknown> | false,\n ): this | Record<string, unknown> | false {\n return arguments.length\n ? ((this._zoomBrushHandleStyle = _), this)\n : this._zoomBrushHandleStyle;\n }\n\n /**\n An object containing CSS key/value pairs that is used to style the inner selection area of the zoom brush. Passing `false` will remove all default styling.\n*/\n zoomBrushSelectionStyle(\n _?: Record<string, unknown> | false,\n ): this | Record<string, unknown> | false {\n return arguments.length\n ? ((this._zoomBrushSelectionStyle = _), this)\n : this._zoomBrushSelectionStyle;\n }\n\n /**\n An object containing CSS key/value pairs that is used to style each zoom control button (`.zoom-in`, `.zoom-out`, `.zoom-reset`, and `.zoom-brush`). Passing `false` will remove all default styling.\n*/\n zoomControlStyle(\n _?: Record<string, unknown> | false,\n ): this | Record<string, unknown> | false {\n return arguments.length\n ? ((this._zoomControlStyle = _), this)\n : this._zoomControlStyle;\n }\n\n /**\n An object containing CSS key/value pairs that is used to style each zoom control button when active (`.zoom-in`, `.zoom-out`, `.zoom-reset`, and `.zoom-brush`). Passing `false` will remove all default styling.\n*/\n zoomControlStyleActive(\n _?: Record<string, unknown> | false,\n ): this | Record<string, unknown> | false {\n return arguments.length\n ? ((this._zoomControlStyleActive = _), this)\n : this._zoomControlStyleActive;\n }\n\n /**\n An object containing CSS key/value pairs that is used to style each zoom control button on hover (`.zoom-in`, `.zoom-out`, `.zoom-reset`, and `.zoom-brush`). Passing `false` will remove all default styling.\n*/\n zoomControlStyleHover(\n _?: Record<string, unknown> | false,\n ): this | Record<string, unknown> | false {\n return arguments.length\n ? ((this._zoomControlStyleHover = _), this)\n : this._zoomControlStyleHover;\n }\n\n /**\n The multiplier that is used in with the control buttons when zooming in and out.\n*/\n zoomFactor(_?: number): this | number {\n return arguments.length ? ((this._zoomFactor = _), this) : this._zoomFactor;\n }\n\n /**\n The max zoom scale.\n*/\n zoomMax(_?: number): this | number {\n return arguments.length ? ((this._zoomMax = _), this) : this._zoomMax;\n }\n\n /**\n Toggles panning.\n*/\n zoomPan(_?: boolean): this | boolean {\n return arguments.length ? ((this._zoomPan = _), this) : this._zoomPan;\n }\n\n /**\n A pixel value to be used to pad all sides of a zoomed area.\n*/\n zoomPadding(_?: number): this | number {\n return arguments.length\n ? ((this._zoomPadding = _), this)\n : this._zoomPadding;\n }\n\n /**\n Toggles scroll zooming.\n*/\n zoomScroll(_?: boolean): this | boolean {\n return arguments.length ? ((this._zoomScroll = _), this) : this._zoomScroll;\n }\n}\n"],"names":["group","max","merge","arrayMerge","min","range","rollup","brush","color","select","scaleOrdinal","zoom","colorAssign","colorContrast","colorDefaults","addToQueue","unique","assign","date","getSize","inViewport","formatAbbreviate","fontFamily","fontFamilyStringify","ColorScale","Legend","TextBox","Timeline","Tooltip","accessor","BaseClass","constant","Message","drawBack","drawColorScale","default","drawLegend","legendLabel","drawSubtitle","drawTimeline","drawTitle","drawTotal","zoomControls","drawAttribution","clickShape","clickLegend","mouseenter","mouseleave","mousemoveLegend","mousemoveShape","touchstartBody","debounce","func","delay","timeout","args","context","clearTimeout","setTimeout","apply","defaultPadding","window","innerWidth","listify","n","reduce","str","item","i","length","accessorFetch","acc","d","__d3plus__","data","LRU","capacity","_cap","_map","Map","get","key","has","undefined","val","delete","set","size","keys","next","value","Viz","_aggs","_ariaHidden","_attribution","attributionBg","_attributionStyle","background","border","display","font","margin","opacity","padding","_backClass","on","_history","config","pop","render","depth","_drawDepth","filter","style","_backConfig","fontSize","resize","_cache","_color","_groupBy","_colorDefaults","scale","_colorScaleClass","_colorScaleConfig","axisConfig","rounding","_colorScalePadding","_colorScalePosition","_width","_height","_colorScaleMaxSize","_data","_dataCutoff","_detectResize","_detectResizeDelay","_detectVisible","_detectVisibleInterval","_downloadButton","_downloadConfig","type","_downloadPosition","_duration","_fontFamily","_hidden","_hiddenColor","_hiddenOpacity","_legend","arr","maxGrouped","id","_legendDepth","bind","Array","_legendClass","_legendConfig","label","shapeConfig","ariaLabel","labelConfig","fontColor","fontResize","_legendFilterInvert","_legendPadding","_legendPosition","_legendSort","a","b","_drawLabel","localeCompare","_legendTooltip","_loadingHTML","_translate","_loadingMessage","_lrucache","_messageClass","_messageMask","_messageStyle","bottom","left","position","right","top","_noDataHTML","_noDataMessage","_on","_queue","_resizeObserver","ResizeObserver","entries","contentRect","width","height","_autoWidth","_autoHeight","_setSVGSize","_callback","_scrollContainer","_shape","_shapes","_shapeConfig","fill","_colorScale","c","colors","domain","JSON","stringify","stroke","darker","role","strokeWidth","_solo","_subtitleClass","_subtitleConfig","ariaHidden","textAnchor","_subtitlePadding","_svgDesc","_svgTitle","_timeline","_timelineClass","align","_timelineConfig","_timelinePadding","_threshold","_thresholdKey","_thresholdName","_titleClass","_titleConfig","_titlePadding","_tooltip","_tooltipClass","_tooltipConfig","pointerEvents","titleStyle","_totalClass","_totalConfig","_totalFormat","_locale","_totalPadding","_zoom","_zoomBehavior","_zoomBrush","_zoomBrushHandleSize","_zoomBrushHandleStyle","_zoomBrushSelectionStyle","zoomBg","_zoomControlStyle","zoomActiveBg","_zoomControlStyleActive","_zoomControlStyleHover","cursor","_zoomFactor","_zoomMax","_zoomPadding","_zoomPan","_zoomScroll","_preDraw","that","_depth","_id","groupByDrawDepth","_ids","map","g","Boolean","_isAggregation","_label","l","slice","reverse","find","ll","_time","_timeFilter","dates","_discrete","latestTime","_filteredData","_legendData","flatData","_filter","nestKeys","push","tree","leaves","index","indexOf","shape","includes","concat","_thresholdFunction","uniqueIds","_userHover","hoverOpacity","_userDuration","duration","container","_select","node","parentNode","html","mask","transition","attr","_draw","legendPosition","colorScalePosition","_tree","w","h","parseFloat","callback","_margin","_padding","tagName","toLowerCase","parent","insert","svg","append","_uuid","svgTitle","selectAll","svgTitleEnter","enter","text","svgDesc","svgDescEnter","_visiblePoll","clearInterval","_resizePoll","_scrollPoll","setInterval","promises","forEach","p","cache","Promise","resolve","err","console","error","all","then","columns","Object","svgTable","svgTableEnter","exit","remove","rows","cells","_isVisible","hide","observe","unobserve","destroy","disconnect","active","_","_active","activeOpacity","s","aggs","arguments","attribution","attributionStyle","backConfig","colorScale","colorScaleConfig","colorScalePadding","colorScaleMaxSize","f","_userData","_timelineSelection","dataCutoff","detectResize","detectResizeDelay","detectVisible","detectVisibleInterval","discrete","downloadButton","downloadConfig","downloadPosition","titleConfig","axis","method","tooltipConfig","tooltipStyle","groupBy","_groupByRaw","k","v","hiddenColor","hiddenOpacity","hover","hoverFunction","_hover","shapeData","activeData","activeIds","ids","x","legend","legendConfig","legendFilterInvert","legendPadding","legendSort","legendTooltip","loadingHTML","loadingMessage","messageMask","messageStyle","noDataHTML","noDataMessage","scrollContainer","subtitle","_subtitle","subtitleConfig","subtitlePadding","threshold","isFinite","isNaN","thresholdKey","thresholdName","time","_userTime","timeFilter","timeline","timelineConfig","timelineDefault","_timelineDefault","timelinePadding","title","_title","titlePadding","tooltip","total","_total","totalConfig","totalFormat","totalPadding","zoomBrushHandleSize","zoomBrushHandleStyle","zoomBrushSelectionStyle","zoomControlStyle","zoomControlStyleActive","zoomControlStyleHover","zoomFactor","zoomMax","zoomPan","zoomPadding","zoomScroll"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAQA,KAAK,EAAEC,GAAG,EAAEC,SAASC,UAAU,EAAEC,GAAG,EAAEC,KAAK,EAAEC,MAAM,QAAO,WAAW;AAC7E,SAAQC,KAAK,QAAO,WAAW;AAC/B,SAAQC,KAAK,QAAO,WAAW;AAC/B,SAAQC,MAAM,QAAO,eAAe;AACpC,SAAQC,YAAY,QAAO,WAAW;AACtC,SAAQC,IAAI,QAAO,UAAU;AAE7B,SAAQC,WAAW,EAAEC,aAAa,EAAEC,aAAa,QAAO,gBAAgB;AACxE,SAAQC,UAAU,EAAEb,KAAK,EAAEc,MAAM,QAAO,eAAe;AACvD,SAAQC,MAAM,EAAEC,IAAI,EA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AAC5G,WAAW;YAC7E;;;YAEA;;AAEF,GACEsM,KAAAA;mBAAAA,SAAAA,QAAQ1F,CAAU;gBAChB,OAAOK,UAAUxS,MAAM,GAAI,CAAA,AAAC,IAAI,CAACwL,QAAQ,GAAG2G,GAAI,IAAI,AAAD,IAAK,IAAI,CAAC3G,QAAQ;YACvE;;;YAEA;;AAEF,GACEsM,KAAAA;mBAAAA,SAAAA,QAAQ3F,CAAW;gBACjB,OAAOK,UAAUxS,MAAM,GAAI,CAAA,AAAC,IAAI,CAAC0L,QAAQ,GAAGyG,GAAI,IAAI,AAAD,IAAK,IAAI,CAACzG,QAAQ;YACvE;;;YAEA;;AAEF,GACEqM,KAAAA;mBAAAA,SAAAA,YAAY5F,CAAU;gBACpB,OAAOK,UAAUxS,MAAM,GAClB,CAAA,AAAC,IAAI,CAACyL,YAAY,GAAG0G,GAAI,IAAI,AAAD,IAC7B,IAAI,CAAC1G,YAAY;YACvB;;;YAEA;;AAEF,GACEuM,KAAAA;mBAAAA,SAAAA,WAAW7F,CAAW;gBACpB,OAAOK,UAAUxS,MAAM,GAAI,CAAA,AAAC,IAAI,CAAC2L,WAAW,GAAGwG,GAAI,IAAI,AAAD,IAAK,IAAI,CAACxG,WAAW;YAC7E;;;WAlyDmBrK;EAAa7D;AAJlC;;AAEA,GACA,8DAA8D;AAC9D,SAAqB6D,iBAmyDpB"}
@@ -12,3 +12,5 @@ import { stylize } from "@d3plus/dom";
12
12
  attr.exit().remove();
13
13
  attr = attr.merge(attrEnter).style("position", "absolute").html(this._attribution).style("right", "".concat(this._margin.right, "px")).style("bottom", "".concat(this._margin.bottom, "px")).call(stylize, this._attributionStyle);
14
14
  }
15
+
16
+ //# sourceMappingURL=drawAttribution.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/charts/drawSteps/drawAttribution.ts"],"sourcesContent":["import {select} from \"d3-selection\";\nimport {stylize} from \"@d3plus/dom\";\nimport type Viz from \"../Viz.js\";\n\n/**\n @name _drawAttribution\n Draws absolute positioned attribution text.\n @private\n*/\nexport default function (this: Viz): void {\n let attr: ReturnType<typeof select> = select(this._select.node().parentNode)\n .selectAll(\"div.d3plus-attribution\")\n .data(this._attribution ? [0] : []) as unknown as ReturnType<typeof select>;\n\n const attrEnter = attr\n .enter()\n .append(\"div\")\n .attr(\"class\", \"d3plus-attribution\");\n\n attr.exit().remove();\n\n attr = attr\n .merge(attrEnter as unknown as ReturnType<typeof select>)\n .style(\"position\", \"absolute\")\n .html(this._attribution)\n .style(\"right\", `${this._margin.right}px`)\n .style(\"bottom\", `${this._margin.bottom}px`)\n .call(stylize as never, this._attributionStyle);\n}\n"],"names":["select","stylize","attr","_select","node","parentNode","selectAll","data","_attribution","attrEnter","enter","append","exit","remove","merge","style","html","_margin","right","bottom","call","_attributionStyle"],"mappings":"AAAA,SAAQA,MAAM,QAAO,eAAe;AACpC,SAAQC,OAAO,QAAO,cAAc;AAGpC;;;;AAIA,GACA,eAAe;IACb,IAAIC,OAAkCF,OAAO,IAAI,CAACG,OAAO,CAACC,IAAI,GAAGC,UAAU,EACxEC,SAAS,CAAC,0BACVC,IAAI,CAAC,IAAI,CAACC,YAAY,GAAG;QAAC;KAAE,GAAG,EAAE;IAEpC,IAAMC,YAAYP,KACfQ,KAAK,GACLC,MAAM,CAAC,OACPT,IAAI,CAAC,SAAS;IAEjBA,KAAKU,IAAI,GAAGC,MAAM;IAElBX,OAAOA,KACJY,KAAK,CAACL,WACNM,KAAK,CAAC,YAAY,YAClBC,IAAI,CAAC,IAAI,CAACR,YAAY,EACtBO,KAAK,CAAC,SAAS,AAAC,GAAqB,OAAnB,IAAI,CAACE,OAAO,CAACC,KAAK,EAAC,OACrCH,KAAK,CAAC,UAAU,AAAC,GAAsB,OAApB,IAAI,CAACE,OAAO,CAACE,MAAM,EAAC,OACvCC,IAAI,CAACnB,SAAkB,IAAI,CAACoB,iBAAiB;AAClD"}
@@ -20,3 +20,5 @@ import { elem } from "@d3plus/dom";
20
20
  ] : []).select(backGroup).config(this._backConfig).render();
21
21
  this._margin.top += visible ? this._backClass.fontSize()() + this._backClass.padding()() * 2 : 0;
22
22
  }
23
+
24
+ //# sourceMappingURL=drawBack.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/charts/drawSteps/drawBack.ts"],"sourcesContent":["import {elem} from \"@d3plus/dom\";\nimport type Viz from \"../Viz.js\";\n\n/**\n Draws a back button if there are states in this._history.\n @private\n*/\nexport default function (this: Viz): void {\n const visible = this._history.length;\n\n const backGroup = elem(\"g.d3plus-viz-back\", {\n parent: this._select,\n duration: this._duration,\n update: {transform: `translate(${this._margin.left}, ${this._margin.top})`},\n }).node();\n\n this._backClass\n .data(visible ? [{text: `← ${this._translate(\"Back\")}`, x: 0, y: 0}] : [])\n .select(backGroup)\n .config(this._backConfig)\n .render();\n\n this._margin.top += visible\n ? this._backClass.fontSize()() + this._backClass.padding()() * 2\n : 0;\n}\n"],"names":["elem","visible","_history","length","backGroup","parent","_select","duration","_duration","update","transform","_margin","left","top","node","_backClass","data","text","_translate","x","y","select","config","_backConfig","render","fontSize","padding"],"mappings":"AAAA,SAAQA,IAAI,QAAO,cAAc;AAGjC;;;AAGA,GACA,eAAe;IACb,IAAMC,UAAU,IAAI,CAACC,QAAQ,CAACC,MAAM;IAEpC,IAAMC,YAAYJ,KAAK,qBAAqB;QAC1CK,QAAQ,IAAI,CAACC,OAAO;QACpBC,UAAU,IAAI,CAACC,SAAS;QACxBC,QAAQ;YAACC,WAAW,AAAC,aAAkC,OAAtB,IAAI,CAACC,OAAO,CAACC,IAAI,EAAC,MAAqB,OAAjB,IAAI,CAACD,OAAO,CAACE,GAAG,EAAC;QAAE;IAC5E,GAAGC,IAAI;IAEP,IAAI,CAACC,UAAU,CACZC,IAAI,CAACf,UAAU;QAAC;YAACgB,MAAM,AAAC,KAA4B,OAAxB,IAAI,CAACC,UAAU,CAAC;YAAWC,GAAG;YAAGC,GAAG;QAAC;KAAE,GAAG,EAAE,EACxEC,MAAM,CAACjB,WACPkB,MAAM,CAAC,IAAI,CAACC,WAAW,EACvBC,MAAM;IAET,IAAI,CAACb,OAAO,CAACE,GAAG,IAAIZ,UAChB,IAAI,CAACc,UAAU,CAACU,QAAQ,OAAO,IAAI,CAACV,UAAU,CAACW,OAAO,OAAO,IAC7D;AACN"}
@@ -71,3 +71,5 @@ import { elem } from "@d3plus/dom";
71
71
  }
72
72
  }
73
73
  }
74
+
75
+ //# sourceMappingURL=drawColorScale.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/charts/drawSteps/drawColorScale.ts"],"sourcesContent":["import {min, rollup} from \"d3-array\";\nimport {merge} from \"@d3plus/data\";\nimport type {DataPoint, MergedDataPoint} from \"@d3plus/data\";\nimport {elem} from \"@d3plus/dom\";\nimport type Viz from \"../Viz.js\";\n\n/**\n Renders the color scale if this._colorScale is not falsey.\n @private\n*/\nexport default function (this: Viz): void {\n const data = Array.from(\n rollup(\n this._data,\n (leaves: DataPoint[]) => merge(leaves, this._aggs),\n (d: DataPoint, i: number) =>\n `${this._time ? this._time(d, i) : \"all\"}-${this._ids(d, i).join(\"_\")}`,\n ).values(),\n );\n\n let position = this._colorScalePosition.bind(this)(this.config());\n if (![false, \"top\", \"bottom\", \"left\", \"right\"].includes(position))\n position = \"bottom\";\n const wide = [\"top\", \"bottom\"].includes(position);\n const showColorScale = this._colorScale && position;\n const padding = this._colorScalePadding()\n ? this._padding\n : {top: 0, right: 0, bottom: 0, left: 0};\n\n const availableWidth =\n this._width -\n (this._margin.left + this._margin.right + padding.left + padding.right);\n\n const width = wide\n ? min([this._colorScaleMaxSize, availableWidth])\n : this._width - (this._margin.left + this._margin.right);\n\n const availableHeight =\n this._height -\n (this._margin.bottom + this._margin.top + padding.bottom + padding.top);\n\n const height = !wide\n ? min([this._colorScaleMaxSize, availableHeight])\n : this._height - (this._margin.bottom + this._margin.top);\n\n const transform = {\n opacity: position ? 1 : 0,\n transform: `translate(${\n wide\n ? this._margin.left + padding.left + (availableWidth - width) / 2\n : this._margin.left\n }, ${\n wide\n ? this._margin.top\n : this._margin.top + padding.top + (availableHeight - height) / 2\n })`,\n };\n\n const scaleGroup = elem(\"g.d3plus-viz-colorScale\", {\n condition: showColorScale && !this._colorScaleConfig.select,\n enter: transform,\n parent: this._select,\n duration: this._duration,\n update: transform,\n }).node();\n\n if (this._colorScale) {\n const scaleData = data.filter((d: MergedDataPoint, i: number) => {\n const c = this._colorScale(d as unknown as DataPoint, i);\n return c !== undefined && c !== null;\n });\n\n this._colorScaleClass\n .align(\n (\n {bottom: \"end\", left: \"start\", right: \"end\", top: \"start\"} as Record<\n string,\n string\n >\n )[position] || \"bottom\",\n )\n .duration(this._duration)\n .data(scaleData)\n .height(height)\n .locale(this._locale)\n .orient(position)\n .select(scaleGroup)\n .value(this._colorScale)\n .width(width)\n .config(this._colorScaleConfig)\n .render();\n\n if (showColorScale) {\n const scaleBounds = this._colorScaleClass.outerBounds();\n if (!this._colorScaleConfig.select && scaleBounds.height) {\n if (wide)\n this._margin[position] +=\n scaleBounds.height + this._legendClass.padding() * 2;\n else\n this._margin[position] +=\n scaleBounds.width + this._legendClass.padding() * 2;\n }\n }\n }\n}\n"],"names":["min","rollup","merge","elem","data","Array","from","_data","leaves","_aggs","d","i","_time","_ids","join","values","position","_colorScalePosition","bind","config","includes","wide","showColorScale","_colorScale","padding","_colorScalePadding","_padding","top","right","bottom","left","availableWidth","_width","_margin","width","_colorScaleMaxSize","availableHeight","_height","height","transform","opacity","scaleGroup","condition","_colorScaleConfig","select","enter","parent","_select","duration","_duration","update","node","scaleData","filter","c","undefined","_colorScaleClass","align","locale","_locale","orient","value","render","scaleBounds","outerBounds","_legendClass"],"mappings":"AAAA,SAAQA,GAAG,EAAEC,MAAM,QAAO,WAAW;AACrC,SAAQC,KAAK,QAAO,eAAe;AAEnC,SAAQC,IAAI,QAAO,cAAc;AAGjC;;;AAGA,GACA,eAAe;;IACb,IAAMC,OAAOC,MAAMC,IAAI,CACrBL,OACE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,CAACtC,WAAW,EACtBW,KAAK,CAACA,OACNf,MAAM,CAAC,IAAI,CAACwB,iBAAiB,EAC7BmB,MAAM;QAET,IAAIxC,gBAAgB;YAClB,IAAMyC,cAAc,IAAI,CAACP,gBAAgB,CAACQ,WAAW;YACrD,IAAI,CAAC,IAAI,CAACrB,iBAAiB,CAACC,MAAM,IAAImB,YAAYzB,MAAM,EAAE;gBACxD,IAAIjB,MACF,IAAI,CAACY,OAAO,CAACjB,SAAS,IACpB+C,YAAYzB,MAAM,GAAG,IAAI,CAAC2B,YAAY,CAACzC,OAAO,KAAK;qBAErD,IAAI,CAACS,OAAO,CAACjB,SAAS,IACpB+C,YAAY7B,KAAK,GAAG,IAAI,CAAC+B,YAAY,CAACzC,OAAO,KAAK;YACxD;QACF;IACF;AACF"}
@@ -118,3 +118,5 @@ var legendAttrs = [
118
118
  else this._margin[position] += legendBounds.width + this._legendClass.padding() * 2;
119
119
  }
120
120
  }
121
+
122
+ //# sourceMappingURL=drawLegend.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/charts/drawSteps/drawLegend.ts"],"sourcesContent":["import {rollup} from \"d3-array\";\nimport {merge} from \"@d3plus/data\";\nimport type {DataPoint} from \"@d3plus/data\";\nimport {elem} from \"@d3plus/dom\";\nimport {configPrep} from \"../../utils/index.js\";\nimport type {VizContext} from \"../../utils/configPrep.js\";\nimport type Viz from \"../Viz.js\";\n\nconst legendAttrs = [\"fill\", \"opacity\", \"texture\"];\n\n/**\n Default label function for the legend.\n @private\n*/\nexport function legendLabel(this: Viz, d: DataPoint, i: number): string {\n return this._drawLabel(d, i, this._legendDepth);\n}\n\n/**\n Renders the legend if this._legend is not falsy.\n @private\n*/\nexport default function (this: Viz, data: DataPoint[] = []): void {\n const legendData: DataPoint[] = [];\n\n const getAttr = (d: DataPoint, i: number, attr: string): string => {\n const shape = this._shape(d, i);\n if (attr === \"fill\" && shape === \"Line\") attr = \"stroke\";\n const value =\n this._shapeConfig[shape] && this._shapeConfig[shape][attr]\n ? this._shapeConfig[shape][attr]\n : this._shapeConfig[attr];\n return typeof value === \"function\" ? value.bind(this)(d, i) : value;\n };\n\n const fill = (d: DataPoint, i: number): string =>\n legendAttrs.map(a => getAttr(d, i, a)).join(\"_\");\n\n const rollupData = this._colorScale\n ? data.filter(\n (d: DataPoint, i: number) => this._colorScale(d, i) === undefined,\n )\n : data;\n rollup(\n rollupData,\n (leaves: DataPoint[]) =>\n legendData.push(merge(leaves, this._aggs) as DataPoint),\n fill,\n );\n\n legendData.sort(this._legendSort);\n\n const labels = legendData.map((d: DataPoint, i: number) =>\n this._ids(d, i).slice(0, this._drawDepth + 1),\n );\n this._legendDepth = 0;\n for (let x = 0; x <= this._drawDepth; x++) {\n const values = labels.map((l: string[]) => l[x]);\n if (\n !values.some((v: string | string[]) => v instanceof Array) &&\n Array.from(new Set(values)).length === legendData.length\n ) {\n this._legendDepth = x;\n break;\n }\n }\n\n const hidden = (d: DataPoint, i: number): boolean => {\n let id = this._id(d, i);\n if (id instanceof Array) id = id[0];\n return (\n this._hidden.includes(id) ||\n (this._solo.length && !this._solo.includes(id))\n );\n };\n\n const legendBounds = this._legendClass.outerBounds();\n const config = this.config();\n let position = this._legendPosition.bind(this)(config);\n if (![false, \"top\", \"bottom\", \"left\", \"right\"].includes(position))\n position = \"bottom\";\n const wide = [\"top\", \"bottom\"].includes(position);\n const padding = this._legendPadding()\n ? this._padding\n : {top: 0, right: 0, bottom: 0, left: 0};\n const transform = {\n transform: `translate(${\n wide ? this._margin.left + padding.left : this._margin.left\n }, ${wide ? this._margin.top : this._margin.top + padding.top})`,\n };\n const visible = this._legend.bind(this)(config, legendData);\n\n const legendGroup = elem(\"g.d3plus-viz-legend\", {\n condition: visible && !this._legendConfig.select,\n enter: transform,\n parent: this._select,\n duration: this._duration,\n update: transform,\n }).node();\n\n this._legendClass\n .id(fill)\n .align(wide ? \"center\" : position)\n .direction(wide ? \"row\" : \"column\")\n .duration(this._duration)\n .data(visible ? legendData : [])\n .height(\n wide\n ? this._height - (this._margin.bottom + this._margin.top)\n : this._height -\n (this._margin.bottom +\n this._margin.top +\n padding.bottom +\n padding.top),\n )\n .locale(this._locale)\n .parent(this)\n .select(legendGroup)\n .shape((d: DataPoint, i: number) =>\n this._shape(d, i) === \"Circle\" ? \"Circle\" : \"Rect\",\n )\n .verticalAlign(!wide ? \"middle\" : position)\n .width(\n wide\n ? this._width -\n (this._margin.left +\n this._margin.right +\n padding.left +\n padding.right)\n : this._width - (this._margin.left + this._margin.right),\n )\n .shapeConfig(configPrep.bind(this as unknown as VizContext)(this._shapeConfig, \"legend\"))\n .shapeConfig({\n fill: (d: DataPoint, i: number) =>\n hidden(d, i) ? this._hiddenColor(d, i) : getAttr(d, i, \"fill\"),\n labelConfig: {\n fontOpacity: (d: DataPoint, i: number) =>\n hidden(d, i) ? this._hiddenOpacity(d, i) : 1,\n },\n })\n .config(this._legendConfig)\n .render();\n\n if (!this._legendConfig.select && legendBounds.height) {\n if (wide)\n this._margin[position] +=\n legendBounds.height + this._legendClass.padding() * 2;\n else\n this._margin[position] +=\n legendBounds.width + this._legendClass.padding() * 2;\n }\n}\n"],"names":["rollup","merge","elem","configPrep","legendAttrs","legendLabel","d","i","_drawLabel","_legendDepth","values","labels","map","l","x","some","v","Array","from","Set","length","legendData","data","getAttr","attr","shape","_shape","value","_shapeConfig","bind","fill","a","join","rollupData","_colorScale","filter","undefined","leaves","push","_aggs","sort","_legendSort","_ids","slice","_drawDepth","hidden","id","_id","_hidden","includes","_solo","legendBounds","_legendClass","outerBounds","config","position","_legendPosition","wide","padding","_legendPadding","_padding","top","right","bottom","left","transform","_margin","visible","_legend","legendGroup","condition","_legendConfig","select","enter","parent","_select","duration","_duration","update","node","align","direction","height","_height","locale","_locale","verticalAlign","width","_width","shapeConfig","_hiddenColor","labelConfig","fontOpacity","_hiddenOpacity","render"],"mappings":";;;;;;;;AAAA,SAAQA,MAAM,QAAO,WAAW;AAChC,SAAQC,KAAK,QAAO,eAA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AACE,OAAO,CAACJ,KAAK,GAClBJ,QAAQM,IAAI,GACZN,QAAQI,KAAK,AAAD,IAChB,IAAI,CAAC0B,MAAM,GAAI,CAAA,IAAI,CAACtB,OAAO,CAACF,IAAI,GAAG,IAAI,CAACE,OAAO,CAACJ,KAAK,AAAD,GAEzD2B,WAAW,CAACtF,WAAW0B,IAAI,CAAC,IAAI,EAA2B,IAAI,CAACD,YAAY,EAAE,WAC9E6D,WAAW,CAAC;QACX3D,MAAM,SAANA,KAAOxB,GAAcC;mBACnBsC,OAAOvC,GAAGC,KAAK,OAAKmF,YAAY,CAACpF,GAAGC,KAAKgB,QAAQjB,GAAGC,GAAG;;QACzDoF,aAAa;YACXC,aAAa,SAAbA,YAActF,GAAcC;uBAC1BsC,OAAOvC,GAAGC,KAAK,OAAKsF,cAAc,CAACvF,GAAGC,KAAK;;QAC/C;IACF,GACC+C,MAAM,CAAC,IAAI,CAACiB,aAAa,EACzBuB,MAAM;IAET,IAAI,CAAC,IAAI,CAACvB,aAAa,CAACC,MAAM,IAAIrB,aAAa+B,MAAM,EAAE;QACrD,IAAIzB,MACF,IAAI,CAACS,OAAO,CAACX,SAAS,IACpBJ,aAAa+B,MAAM,GAAG,IAAI,CAAC9B,YAAY,CAACM,OAAO,KAAK;aAEtD,IAAI,CAACQ,OAAO,CAACX,SAAS,IACpBJ,aAAaoC,KAAK,GAAG,IAAI,CAACnC,YAAY,CAACM,OAAO,KAAK;IACzD;AACF"}
@@ -27,3 +27,5 @@ import { elem } from "@d3plus/dom";
27
27
  ] : []).locale(this._locale).select(group).width(this._width - (this._margin.left + this._margin.right + padding.left + padding.right)).config(this._subtitleConfig).render();
28
28
  this._margin.top += text ? group.getBBox().height + this._subtitleConfig.padding * 2 : 0;
29
29
  }
30
+
31
+ //# sourceMappingURL=drawSubtitle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/charts/drawSteps/drawSubtitle.ts"],"sourcesContent":["import {elem} from \"@d3plus/dom\";\nimport type {DataPoint} from \"@d3plus/data\";\nimport type Viz from \"../Viz.js\";\n\n/**\n Draws a subtitle if this._subtitle is defined.\n @private\n*/\nexport default function (this: Viz, data: DataPoint[] = []): void {\n const text = this._subtitle ? this._subtitle(data) : false;\n const padding = this._subtitlePadding()\n ? this._padding\n : {top: 0, right: 0, bottom: 0, left: 0};\n\n const transform = {\n transform: `translate(${this._margin.left + padding.left}, ${this._margin.top})`,\n };\n\n const group = elem(\"g.d3plus-viz-subtitle\", {\n enter: transform,\n parent: this._select,\n duration: 0,\n update: transform,\n }).node();\n\n this._subtitleClass\n .data(text ? [{text}] : [])\n .locale(this._locale)\n .select(group)\n .width(\n this._width -\n (this._margin.left + this._margin.right + padding.left + padding.right),\n )\n .config(this._subtitleConfig)\n .render();\n\n this._margin.top += text\n ? group.getBBox().height + this._subtitleConfig.padding * 2\n : 0;\n}\n"],"names":["elem","data","text","_subtitle","padding","_subtitlePadding","_padding","top","right","bottom","left","transform","_margin","group","enter","parent","_select","duration","update","node","_subtitleClass","locale","_locale","select","width","_width","config","_subtitleConfig","render","getBBox","height"],"mappings":"AAAA,SAAQA,IAAI,QAAO,cAAc;AAIjC;;;AAGA,GACA,eAAe;QAAqBC,OAAAA,iEAAoB,EAAE;IACxD,IAAMC,OAAO,IAAI,CAACC,SAAS,GAAG,IAAI,CAACA,SAAS,CAACF,QAAQ;IACrD,IAAMG,UAAU,IAAI,CAACC,gBAAgB,KACjC,IAAI,CAACC,QAAQ,GACb;QAACC,KAAK;QAAGC,OAAO;QAAGC,QAAQ;QAAGC,MAAM;IAAC;IAEzC,IAAMC,YAAY;QAChBA,WAAW,AAAC,aAAiD,OAArC,IAAI,CAACC,OAAO,CAACF,IAAI,GAAGN,QAAQM,IAAI,EAAC,MAAqB,OAAjB,IAAI,CAACE,OAAO,CAACL,GAAG,EAAC;IAChF;IAEA,IAAMM,QAAQb,KAAK,yBAAyB;QAC1Cc,OAAOH;QACPI,QAAQ,IAAI,CAACC,OAAO;QACpBC,UAAU;QACVC,QAAQP;IACV,GAAGQ,IAAI;IAEP,IAAI,CAACC,cAAc,CAChBnB,IAAI,CAACC,OAAO;QAAC;YAACA,MAAAA;QAAI;KAAE,GAAG,EAAE,EACzBmB,MAAM,CAAC,IAAI,CAACC,OAAO,EACnBC,MAAM,CAACV,OACPW,KAAK,CACJ,IAAI,CAACC,MAAM,GACR,CAAA,IAAI,CAACb,OAAO,CAACF,IAAI,GAAG,IAAI,CAACE,OAAO,CAACJ,KAAK,GAAGJ,QAAQM,IAAI,GAAGN,QAAQI,KAAK,AAAD,GAExEkB,MAAM,CAAC,IAAI,CAACC,eAAe,EAC3BC,MAAM;IAET,IAAI,CAAChB,OAAO,CAACL,GAAG,IAAIL,OAChBW,MAAMgB,OAAO,GAAGC,MAAM,GAAG,IAAI,CAACH,eAAe,CAACvB,OAAO,GAAG,IACxD;AACN"}
@@ -81,3 +81,5 @@ import { date, elem } from "@d3plus/dom";
81
81
  this._margin.bottom += timeline.outerBounds().height + timeline.padding() * 2;
82
82
  }
83
83
  }
84
+
85
+ //# sourceMappingURL=drawTimeline.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/charts/drawSteps/drawTimeline.ts"],"sourcesContent":["import {extent} from \"d3-array\";\n\nimport {unique} from \"@d3plus/data\";\nimport type {DataPoint} from \"@d3plus/data\";\nimport {date, elem} from \"@d3plus/dom\";\nimport type Viz from \"../Viz.js\";\n\n/**\n Determines whether or not to update the timeFilter method of the Viz.\n @param The timeline selection given from the d3 brush.\n @private\n*/\nfunction setTimeFilter(this: Viz, s: Date | Date[] | number[]): void {\n if (!(s instanceof Array)) s = [s, s] as Date[];\n if (JSON.stringify(s) !== JSON.stringify(this._timelineSelection)) {\n this._timelineSelection = s;\n s = s.map(Number) as number[];\n const sNums = s as number[];\n (\n this.timeFilter((d: DataPoint) => {\n const ms = (date(this._time(d)) as Date).getTime();\n return ms >= sNums[0] && ms <= sNums[1];\n }) as Viz\n ).render();\n }\n}\n\n/**\n Renders the timeline if this._time and this._timeline are not falsy and there are more than 1 tick available.\n @private\n*/\nexport default function (this: Viz, data: DataPoint[] = []): void {\n let timelinePossible = this._time && this._timeline;\n const ticks = (\n timelinePossible\n ? unique(this._data.map(this._time)).map(\n (d: unknown) => date(d as string | number),\n )\n : []\n ) as Date[];\n timelinePossible = timelinePossible && ticks.length > 1;\n const padding = this._timelinePadding()\n ? this._padding\n : {top: 0, right: 0, bottom: 0, left: 0};\n\n const transform = {\n transform: `translate(${this._margin.left + padding.left}, 0)`,\n };\n\n const timelineGroup = elem(\"g.d3plus-viz-timeline\", {\n condition: timelinePossible,\n enter: transform,\n parent: this._select,\n duration: this._duration,\n update: transform,\n }).node();\n\n if (timelinePossible) {\n const timeline = this._timelineClass\n .domain(extent(ticks) as [Date, Date])\n .duration(this._duration)\n .height(this._height - this._margin.bottom)\n .locale(this._locale)\n .select(timelineGroup)\n .ticks(ticks.sort((a: Date, b: Date) => +a - +b))\n .width(\n this._width -\n (this._margin.left +\n this._margin.right +\n padding.left +\n padding.right),\n );\n\n const dataExtent = extent(\n data\n .map(this._time)\n .map((d: unknown) =>\n date(d as string | number),\n ) as Date[],\n ) as [Date, Date];\n if (!this._timelineSelection) {\n this._timelineSelection = this._timelineDefault || dataExtent;\n } else {\n if (this._timelineSelection[0] < dataExtent[0])\n this._timelineSelection[0] = dataExtent[0];\n if (this._timelineSelection[1] > dataExtent[1])\n this._timelineSelection[1] = dataExtent[1];\n }\n timeline.selection(this._timelineSelection);\n\n const config = this._timelineConfig;\n\n timeline\n .config(config)\n .on(\"brush\", (s: Date[]) => {\n setTimeFilter.bind(this)(s);\n if (config.on && config.on.brush) config.on.brush(s);\n })\n .on(\"end\", (s: Date[]) => {\n setTimeFilter.bind(this)(s);\n if (config.on && config.on.end) config.on.end(s);\n })\n .render();\n\n this._margin.bottom +=\n timeline.outerBounds().height + timeline.padding() * 2;\n }\n}\n"],"names":["extent","unique","date","elem","setTimeFilter","s","Array","JSON","stringify","_timelineSelection","map","Number","sNums","timeFilter","d","ms","_time","getTime","render","data","timelinePossible","_timeline","ticks","_data","length","padding","_timelinePadding","_padding","top","right","bottom","left","transform","_margin","timelineGroup","condition","enter","parent","_select","duration","_duration","update","node","timeline","_timelineClass","domain","height","_height","locale","_locale","select","sort","a","b","width","_width","dataExtent","_timelineDefault","selection","config","_timelineConfig","on","bind","brush","end","outerBounds"],"mappings":";;;;;;;;AAAA,SAAQA,MAAM,QAAO,WAAW;AAEhC,SAAQC,MAAM,QAAO,eAAe;AAEpC,SAAQC,IAAI,EAAEC,IAAI,QAAO,cAAc;AAGvC;;;;AAIA,GACA,SAASC,cAAyBC,CAA2B;;IAC3D,IAAI,CAAEA,AAAC,YAADA,GAAaC,QAAQD,IAAI;QAACA;QAAGA;KAAE;IACrC,IAAIE,KAAKC,SAAS,CAACH,OAAOE,KAAKC,SAAS,CAAC,IAAI,CAACC,kBAAkB,GAAG;QACjE,IAAI,CAACA,kBAAkB,GAAGJ;QAC1BA,IAAIA,EAAEK,GAAG,CAACC;QACV,IAAMC,QAAQP;QAEZ,IAAI,CAACQ,UAAU,CAAC,SAACC;YACf,IAAMC,KAAK,AAACb,KAAK,MAAKc,KAAK,CAACF,IAAaG,OAAO;YAChD,OAAOF,MAAMH,KAAK,CAAC,EAAE,IAAIG,MAAMH,KAAK,CAAC,EAAE;QACzC,GACAM,MAAM;IACV;AACF;AAEA;;;AAGA,GACA,eAAe;;QAAqBC,OAAAA,iEAAoB,EAAE;IACxD,IAAIC,mBAAmB,IAAI,CAACJ,KAAK,IAAI,IAAI,CAACK,SAAS;IACnD,IAAMC,QACJF,mBACInB,OAAO,IAAI,CAACsB,KAAK,CAACb,GAAG,CAAC,IAAI,CAACM,KAAK,GAAGN,GAAG,CACpC,SAACI;eAAeZ,KAAKY;SAEvB,EAAE;IAERM,mBAAmBA,oBAAoBE,MAAME,MAAM,GAAG;IACtD,IAAMC,UAAU,IAAI,CAACC,gBAAgB,KACjC,IAAI,CAACC,QAAQ,GACb;QAACC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/C,kBAAkB,CAAC,EAAE,GAAG+C,UAAU,CAAC,EAAE,EAC5C,IAAI,CAAC/C,kBAAkB,CAAC,EAAE,GAAG+C,UAAU,CAAC,EAAE;QAC9C;QACAb,SAASe,SAAS,CAAC,IAAI,CAACjD,kBAAkB;QAE1C,IAAMkD,SAAS,IAAI,CAACC,eAAe;QAEnCjB,SACGgB,MAAM,CAACA,QACPE,EAAE,CAAC,SAAS,SAACxD;YACZD,cAAc0D,IAAI,QAAOzD;YACzB,IAAIsD,OAAOE,EAAE,IAAIF,OAAOE,EAAE,CAACE,KAAK,EAAEJ,OAAOE,EAAE,CAACE,KAAK,CAAC1D;QACpD,GACCwD,EAAE,CAAC,OAAO,SAACxD;YACVD,cAAc0D,IAAI,QAAOzD;YACzB,IAAIsD,OAAOE,EAAE,IAAIF,OAAOE,EAAE,CAACG,GAAG,EAAEL,OAAOE,EAAE,CAACG,GAAG,CAAC3D;QAChD,GACCa,MAAM;QAET,IAAI,CAACe,OAAO,CAACH,MAAM,IACjBa,SAASsB,WAAW,GAAGnB,MAAM,GAAGH,SAASlB,OAAO,KAAK;IACzD;AACF"}
@@ -27,3 +27,5 @@ import { elem } from "@d3plus/dom";
27
27
  ] : []).locale(this._locale).select(group).width(this._width - (this._margin.left + this._margin.right + padding.left + padding.right)).config(this._titleConfig).render();
28
28
  this._margin.top += text ? group.getBBox().height + this._titleConfig.padding * 2 : 0;
29
29
  }
30
+
31
+ //# sourceMappingURL=drawTitle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/charts/drawSteps/drawTitle.ts"],"sourcesContent":["import {elem} from \"@d3plus/dom\";\nimport type {DataPoint} from \"@d3plus/data\";\nimport type Viz from \"../Viz.js\";\n\n/**\n Draws a title if this._title is defined.\n @private\n*/\nexport default function (this: Viz, data: DataPoint[] = []): void {\n const text = this._title ? this._title(data) : false;\n const padding = this._titlePadding()\n ? this._padding\n : {top: 0, right: 0, bottom: 0, left: 0};\n\n const transform = {\n transform: `translate(${this._margin.left + padding.left}, ${this._margin.top})`,\n };\n\n const group = elem(\"g.d3plus-viz-title\", {\n enter: transform,\n parent: this._select,\n duration: 0,\n update: transform,\n }).node();\n\n this._titleClass\n .data(text ? [{text}] : [])\n .locale(this._locale)\n .select(group)\n .width(\n this._width -\n (this._margin.left + this._margin.right + padding.left + padding.right),\n )\n .config(this._titleConfig)\n .render();\n\n this._margin.top += text\n ? group.getBBox().height + this._titleConfig.padding * 2\n : 0;\n}\n"],"names":["elem","data","text","_title","padding","_titlePadding","_padding","top","right","bottom","left","transform","_margin","group","enter","parent","_select","duration","update","node","_titleClass","locale","_locale","select","width","_width","config","_titleConfig","render","getBBox","height"],"mappings":"AAAA,SAAQA,IAAI,QAAO,cAAc;AAIjC;;;AAGA,GACA,eAAe;QAAqBC,OAAAA,iEAAoB,EAAE;IACxD,IAAMC,OAAO,IAAI,CAACC,MAAM,GAAG,IAAI,CAACA,MAAM,CAACF,QAAQ;IAC/C,IAAMG,UAAU,IAAI,CAACC,aAAa,KAC9B,IAAI,CAACC,QAAQ,GACb;QAACC,KAAK;QAAGC,OAAO;QAAGC,QAAQ;QAAGC,MAAM;IAAC;IAEzC,IAAMC,YAAY;QAChBA,WAAW,AAAC,aAAiD,OAArC,IAAI,CAACC,OAAO,CAACF,IAAI,GAAGN,QAAQM,IAAI,EAAC,MAAqB,OAAjB,IAAI,CAACE,OAAO,CAACL,GAAG,EAAC;IAChF;IAEA,IAAMM,QAAQb,KAAK,sBAAsB;QACvCc,OAAOH;QACPI,QAAQ,IAAI,CAACC,OAAO;QACpBC,UAAU;QACVC,QAAQP;IACV,GAAGQ,IAAI;IAEP,IAAI,CAACC,WAAW,CACbnB,IAAI,CAACC,OAAO;QAAC;YAACA,MAAAA;QAAI;KAAE,GAAG,EAAE,EACzBmB,MAAM,CAAC,IAAI,CAACC,OAAO,EACnBC,MAAM,CAACV,OACPW,KAAK,CACJ,IAAI,CAACC,MAAM,GACR,CAAA,IAAI,CAACb,OAAO,CAACF,IAAI,GAAG,IAAI,CAACE,OAAO,CAACJ,KAAK,GAAGJ,QAAQM,IAAI,GAAGN,QAAQI,KAAK,AAAD,GAExEkB,MAAM,CAAC,IAAI,CAACC,YAAY,EACxBC,MAAM;IAET,IAAI,CAAChB,OAAO,CAACL,GAAG,IAAIL,OAChBW,MAAMgB,OAAO,GAAGC,MAAM,GAAG,IAAI,CAACH,YAAY,CAACvB,OAAO,GAAG,IACrD;AACN"}
@@ -28,3 +28,5 @@ import { elem } from "@d3plus/dom";
28
28
  ] : []).locale(this._locale).select(group).width(this._width - (this._margin.left + this._margin.right + padding.left + padding.right)).config(this._totalConfig).render();
29
29
  this._margin.top += total ? group.getBBox().height + this._totalConfig.padding * 2 : 0;
30
30
  }
31
+
32
+ //# sourceMappingURL=drawTotal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/charts/drawSteps/drawTotal.ts"],"sourcesContent":["import {sum} from \"d3-array\";\n\nimport {elem} from \"@d3plus/dom\";\nimport type {DataPoint} from \"@d3plus/data\";\nimport type Viz from \"../Viz.js\";\n\n/**\n Draws a total title if this._total is defined.\n @private\n*/\nexport default function (this: Viz, data: DataPoint[] = []): void {\n const total =\n typeof this._total === \"function\"\n ? sum(data.map(this._total))\n : this._total === true && this._size\n ? sum(data.map(this._size))\n : false;\n\n const padding = this._totalPadding()\n ? this._padding\n : {top: 0, right: 0, bottom: 0, left: 0};\n\n const transform = {\n transform: `translate(${this._margin.left + padding.left}, ${this._margin.top})`,\n };\n\n const group = elem(\"g.d3plus-viz-total\", {\n enter: transform,\n parent: this._select,\n duration: 0,\n update: transform,\n }).node();\n\n this._totalClass\n .data(total ? [{text: this._totalFormat(total)}] : [])\n .locale(this._locale)\n .select(group)\n .width(\n this._width -\n (this._margin.left + this._margin.right + padding.left + padding.right),\n )\n .config(this._totalConfig)\n .render();\n\n this._margin.top += total\n ? group.getBBox().height + this._totalConfig.padding * 2\n : 0;\n}\n"],"names":["sum","elem","data","total","_total","map","_size","padding","_totalPadding","_padding","top","right","bottom","left","transform","_margin","group","enter","parent","_select","duration","update","node","_totalClass","text","_totalFormat","locale","_locale","select","width","_width","config","_totalConfig","render","getBBox","height"],"mappings":"AAAA,SAAQA,GAAG,QAAO,WAAW;AAE7B,SAAQC,IAAI,QAAO,cAAc;AAIjC;;;AAGA,GACA,eAAe;QAAqBC,OAAAA,iEAAoB,EAAE;IACxD,IAAMC,QACJ,OAAO,IAAI,CAACC,MAAM,KAAK,aACnBJ,IAAIE,KAAKG,GAAG,CAAC,IAAI,CAACD,MAAM,KACxB,IAAI,CAACA,MAAM,KAAK,QAAQ,IAAI,CAACE,KAAK,GAChCN,IAAIE,KAAKG,GAAG,CAAC,IAAI,CAACC,KAAK,KACvB;IAER,IAAMC,UAAU,IAAI,CAACC,aAAa,KAC9B,IAAI,CAACC,QAAQ,GACb;QAACC,KAAK;QAAGC,OAAO;QAAGC,QAAQ;QAAGC,MAAM;IAAC;IAEzC,IAAMC,YAAY;QAChBA,WAAW,AAAC,aAAiD,OAArC,IAAI,CAACC,OAAO,CAACF,IAAI,GAAGN,QAAQM,IAAI,EAAC,MAAqB,OAAjB,IAAI,CAACE,OAAO,CAACL,GAAG,EAAC;IAChF;IAEA,IAAMM,QAAQf,KAAK,sBAAsB;QACvCgB,OAAOH;QACPI,QAAQ,IAAI,CAACC,OAAO;QACpBC,UAAU;QACVC,QAAQP;IACV,GAAGQ,IAAI;IAEP,IAAI,CAACC,WAAW,CACbrB,IAAI,CAACC,QAAQ;QAAC;YAACqB,MAAM,IAAI,CAACC,YAAY,CAACtB;QAAM;KAAE,GAAG,EAAE,EACpDuB,MAAM,CAAC,IAAI,CAACC,OAAO,EACnBC,MAAM,CAACZ,OACPa,KAAK,CACJ,IAAI,CAACC,MAAM,GACR,CAAA,IAAI,CAACf,OAAO,CAACF,IAAI,GAAG,IAAI,CAACE,OAAO,CAACJ,KAAK,GAAGJ,QAAQM,IAAI,GAAGN,QAAQI,KAAK,AAAD,GAExEoB,MAAM,CAAC,IAAI,CAACC,YAAY,EACxBC,MAAM;IAET,IAAI,CAAClB,OAAO,CAACL,GAAG,IAAIP,QAChBa,MAAMkB,OAAO,GAAGC,MAAM,GAAG,IAAI,CAACH,YAAY,CAACzB,OAAO,GAAG,IACrD;AACN"}
@@ -250,3 +250,5 @@ var brushing = false;
250
250
  this._brushGroup.selectAll(".selection").call(attrize, this._zoomBrushSelectionStyle || {});
251
251
  this._brushGroup.selectAll(".handle").call(attrize, this._zoomBrushHandleStyle || {});
252
252
  }
253
+
254
+ //# sourceMappingURL=zoomControls.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/charts/drawSteps/zoomControls.ts"],"sourcesContent":["import {select} from \"d3-selection\";\nimport {zoomTransform} from \"d3-zoom\";\n\nimport {attrize, stylize} from \"@d3plus/dom\";\nimport type Viz from \"../Viz.js\";\n\n/** Mutable version of ZoomTransform for direct property manipulation. */\ninterface MutableTransform {\n k: number;\n x: number;\n y: number;\n}\n\nlet brushing = false;\n\n/**\n @name zoomControls\n Sets up initial zoom events and controls.\n @private\n*/\nexport default function (this: Viz): void {\n if (!this._container || !this._zoomGroup) return;\n\n const height =\n this._zoomHeight || this._height - this._margin.top - this._margin.bottom,\n that = this,\n width =\n this._zoomWidth || this._width - this._margin.left - this._margin.right;\n\n this._zoomBehavior\n .extent([\n [0, 0],\n [width, height],\n ])\n .scaleExtent([1, this._zoomMax])\n .translateExtent([\n [0, 0],\n [width, height],\n ])\n .on(\"zoom\", (event: {transform: unknown}) =>\n zoomed.bind(this)(event.transform),\n );\n\n this._zoomToBounds = zoomToBounds.bind(this);\n\n let control: ReturnType<typeof select> = select(\n this._select.node().parentNode,\n )\n .selectAll(\"div.d3plus-zoom-control\")\n .data(this._zoom ? [0] : []) as unknown as ReturnType<typeof select>;\n const controlEnter = control\n .enter()\n .append(\"div\")\n .attr(\"class\", \"d3plus-zoom-control\");\n control.exit().remove();\n control = control\n .merge(controlEnter as unknown as ReturnType<typeof select>)\n .style(\"position\", \"absolute\")\n .style(\"top\", `${this._margin.top}px`)\n .style(\"left\", `${this._margin.left}px`);\n\n controlEnter.append(\"div\").attr(\"class\", \"zoom-control zoom-in\");\n control\n .select(\".zoom-in\")\n .on(\"click\", zoomMath.bind(this, this._zoomFactor))\n .html(\"&#65291;\");\n\n controlEnter.append(\"div\").attr(\"class\", \"zoom-control zoom-out\");\n control\n .select(\".zoom-out\")\n .on(\"click\", zoomMath.bind(this, 1 / this._zoomFactor))\n .html(\"&#65293;\");\n\n controlEnter.append(\"div\").attr(\"class\", \"zoom-control zoom-reset\");\n control\n .select(\".zoom-reset\")\n .on(\"click\", zoomMath.bind(this, 0))\n .html(\"&#8634\");\n\n controlEnter.append(\"div\").attr(\"class\", \"zoom-control zoom-brush\");\n control\n .select(\".zoom-brush\")\n .on(\"click\", function (_event: Event) {\n select(_event.currentTarget as Element)\n .classed(\"active\", !brushing)\n .call(\n stylize,\n brushing\n ? that._zoomControlStyle || {}\n : that._zoomControlStyleActive || {},\n );\n zoomEvents.bind(that)(!brushing);\n })\n .html(\"&#164\");\n\n control\n .selectAll(\".zoom-control\")\n .call(stylize, that._zoomControlStyle)\n .on(\"mouseenter\", function (_event: Event) {\n select(_event.currentTarget as Element).call(stylize, that._zoomControlStyleHover || {});\n })\n .on(\"mouseleave\", function (_event: Event) {\n const el = select(_event.currentTarget as Element);\n el.call(\n stylize,\n el.classed(\"active\")\n ? that._zoomControlStyleActive || {}\n : that._zoomControlStyle || {},\n );\n });\n\n this._zoomBrush\n .extent([\n [0, 0],\n [width, height],\n ])\n .filter((event: MouseEvent) => !event.button && event.detail < 2)\n .handleSize(this._zoomBrushHandleSize)\n .on(\"start\", brushStart.bind(this))\n .on(\"brush\", brushBrush.bind(this))\n .on(\"end\", brushEnd.bind(this));\n\n const brushGroup = this._container.selectAll(\"g.brush\").data([0]);\n this._brushGroup = brushGroup\n .enter()\n .append(\"g\")\n .attr(\"class\", \"brush\")\n .merge(brushGroup)\n .call(this._zoomBrush);\n\n zoomEvents.bind(this)();\n if (this._renderTiles)\n this._renderTiles(zoomTransform(this._container.node()), 0);\n}\n\n/**\n @name zoomEvents\n Handles adding/removing zoom event listeners.\n @private\n*/\nfunction zoomEvents(this: Viz, brush: boolean = false): void {\n brushing = brush;\n\n if (brushing) this._brushGroup.style(\"display\", \"inline\");\n else this._brushGroup.style(\"display\", \"none\");\n\n if (!brushing && this._zoom) {\n this._container.call(this._zoomBehavior);\n if (!this._zoomScroll) {\n this._container.on(\"wheel.zoom\", null);\n }\n if (!this._zoomPan) {\n this._container\n .on(\"mousedown.zoom mousemove.zoom\", null)\n .on(\n \"touchstart.zoom touchmove.zoom touchend.zoom touchcancel.zoom\",\n null,\n );\n }\n } else {\n this._container.on(\".zoom\", null);\n }\n}\n\n/**\n @name zoomed\n Handles events dispatched from this._zoomBehavior\n @param transform\n @private\n*/\nfunction zoomed(\n this: Viz,\n transform: unknown = false,\n duration: number = 0,\n): void {\n if (this._zoomGroup) {\n if (!duration) this._zoomGroup.attr(\"transform\", transform);\n else\n this._zoomGroup\n .transition()\n .duration(duration)\n .attr(\"transform\", transform);\n }\n\n if (this._renderTiles)\n this._renderTiles(zoomTransform(this._container.node()), duration);\n}\n\n/**\n @name zoomMath\n Zooms in or out based on the provided multiplier.\n @param factor @private\n*/\nfunction zoomMath(this: Viz, factor: number = 0): void {\n if (!this._container) return;\n\n const center = this._zoomBehavior\n .extent()\n .bind(document)()[1]\n .map((d: number) => d / 2),\n scaleExtent = this._zoomBehavior.scaleExtent(),\n t = zoomTransform(this._container.node()) as unknown as MutableTransform;\n\n if (!factor) {\n t.k = scaleExtent[0];\n t.x = 0;\n t.y = 0;\n } else {\n const translate0 = [(center[0] - t.x) / t.k, (center[1] - t.y) / t.k];\n t.k = Math.min(scaleExtent[1], t.k * factor);\n if (t.k <= scaleExtent[0]) {\n t.k = scaleExtent[0];\n t.x = 0;\n t.y = 0;\n } else {\n t.x += center[0] - (translate0[0] * t.k + t.x);\n t.y += center[1] - (translate0[1] * t.k + t.y);\n }\n }\n\n zoomed.bind(this)(t, this._duration);\n}\n\n/**\n @name zoomToBounds\n Zooms to given bounds.\n @param bounds\n @private\n*/\nfunction zoomToBounds(\n this: Viz,\n bounds: number[][] | null,\n duration: number = this._duration,\n): void {\n const scaleExtent = this._zoomBehavior.scaleExtent(),\n t = zoomTransform(this._container.node()) as unknown as MutableTransform;\n\n if (bounds) {\n const [width, height] = this._zoomBehavior.translateExtent()[1],\n dx = bounds[1][0] - bounds[0][0],\n dy = bounds[1][1] - bounds[0][1];\n\n let k = Math.min(scaleExtent[1], 1 / Math.max(dx / width, dy / height));\n\n let xMod: number, yMod: number;\n if (dx / dy < width / height) {\n k *= (height - this._zoomPadding * 2) / height;\n xMod = (width - dx * k) / 2 / k;\n yMod = this._zoomPadding / k;\n } else {\n k *= (width - this._zoomPadding * 2) / width;\n yMod = (height - dy * k) / 2 / k;\n xMod = this._zoomPadding / k;\n }\n\n t.x = (t.x - bounds[0][0] + xMod) * ((t.k * k) / t.k);\n t.y = (t.y - bounds[0][1] + yMod) * ((t.k * k) / t.k);\n t.k *= k;\n\n if (t.x > 0) t.x = 0;\n else if (t.x < width * -t.k + width) t.x = width * -t.k + width;\n if (t.y > 0) t.y = 0;\n else if (t.y < height * -t.k + height) t.y = height * -t.k + height;\n } else {\n t.k = scaleExtent[0];\n t.x = 0;\n t.y = 0;\n }\n\n zoomed.bind(this)(t, duration);\n}\n\n/**\n Triggered on brush \"brush\".\n @private\n*/\nfunction brushBrush(this: Viz): void {\n brushStyle.bind(this)();\n}\n\n/**\n Triggered on brush \"end\".\n @private\n*/\nfunction brushEnd(this: Viz, event: {selection: number[][] | null}): void {\n if (!event.selection) return; // Only transition after input.\n\n this._brushGroup.call(this._zoomBrush.move, null);\n zoomToBounds.bind(this)(event.selection);\n}\n\n/**\n Triggered on brush \"start\".\n @private\n*/\nfunction brushStart(this: Viz): void {\n brushStyle.bind(this)();\n}\n\n/**\n Overrides the default brush styles.\n @private\n*/\nfunction brushStyle(this: Viz): void {\n this._brushGroup\n .selectAll(\".selection\")\n .call(attrize, this._zoomBrushSelectionStyle || {});\n\n this._brushGroup\n .selectAll(\".handle\")\n .call(attrize, this._zoomBrushHandleStyle || {});\n}\n"],"names":["select","zoomTransform","attrize","stylize","brushing","_container","_zoomGroup","height","_zoomHeight","_height","_margin","top","bottom","that","width","_zoomWidth","_width","left","right","_zoomBehavior","extent","scaleExtent","_zoomMax","translateExtent","on","event","zoomed","bind","transform","_zoomToBounds","zoomToBounds","control","_select","node","parentNode","selectAll","data","_zoom","controlEnter","enter","append","attr","exit","remove","merge","style","zoomMath","_zoomFactor","html","_event","currentTarget","classed","call","_zoomControlStyle","_zoomControlStyleActive","zoomEvents","_zoomControlStyleHover","el","_zoomBrush","filter","button","detail","handleSize","_zoomBrushHandleSize","brushStart","brushBrush","brushEnd","brushGroup","_brushGroup","_renderTiles","brush","_zoomScroll","_zoomPan","duration","transition","factor","center","document","map","d","t","k","x","y","translate0","Math","min","_duration","bounds","dx","dy","max","xMod","yMod","_zoomPadding","brushStyle","selection","move","_zoomBrushSelectionStyle","_zoomBrushHandleStyle"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAQA,MAAM,QAAO,eAAe;AACpC,SAAQC,aAAa,QAAO,UAAU;AAEtC,SAAQC,OAAO,EAAEC,OAAO,QAAO,cAAc;AAU7C,IAAIC,WAAW;AAEf;;;;AAIA,GACA,eAAe;;IACb,IAAI,CAAC,IAAI,CAACC,UAAU,IAAI,CAAC,IAAI,CAACC,UAAU,EAAE;IAE1C,IAAMC,SACF,IAAI,CAACC,WAAW,IAAI,IAAI,CAACC,OAAO,GAAG,IAAI,CAACC,OAAO,CAACC,GAAG,GAAG,IAAI,CAACD,OAAO,CAACE,MAAM,EAC3EC,OAAO,IAAI,EACXC,QACE,IAAI,CAACC,UAAU,IAAI,IAAI,CAACC,MAAM,GAAG,IAAI,CAACN,OAAO,CAACO,IAAI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IAAI,EAAE;IAC5CnE,aAAaH,IAAI,CAAC,IAAI,EAAEF,MAAMuE,SAAS;AACzC;AAEA;;;AAGA,GACA,SAAShC;IACP+B,WAAWpE,IAAI,CAAC,IAAI;AACtB;AAEA;;;AAGA,GACA,SAASoE;IACP,IAAI,CAAC3B,WAAW,CACbjC,SAAS,CAAC,cACViB,IAAI,CAAClD,SAAS,IAAI,CAACgG,wBAAwB,IAAI,CAAC;IAEnD,IAAI,CAAC9B,WAAW,CACbjC,SAAS,CAAC,WACViB,IAAI,CAAClD,SAAS,IAAI,CAACiG,qBAAqB,IAAI,CAAC;AAClD"}
@@ -73,3 +73,5 @@ import { merge } from "d3-array";
73
73
  }
74
74
  }
75
75
  }
76
+
77
+ //# sourceMappingURL=click.legend.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/charts/events/click.legend.ts"],"sourcesContent":["import {merge} from \"d3-array\";\nimport type {DataPoint} from \"@d3plus/data\";\nimport type Viz from \"../Viz.js\";\n\n/**\n @module clickLegend\n On click event for all legend shapes in a Viz.\n @private\n*/\nexport default function (\n this: Viz,\n d: DataPoint,\n i: number,\n x: DataPoint,\n event: MouseEvent,\n): void {\n this._select.style(\"cursor\", \"auto\");\n if (this._tooltip(d, i)) this._tooltipClass.data([]).render();\n\n let id = this._id(d, i);\n if (!(id instanceof Array)) id = [id];\n const hiddenIndex = this._hidden.indexOf(id[0]);\n const soloIndex = this._solo.indexOf(id[0]);\n const dataLength = merge(\n this._legendClass.data().map((d: DataPoint, i: number) => {\n let id = this._id(d, i);\n if (!(id instanceof Array)) id = [id];\n return id;\n }),\n ).length;\n\n const inverted = this._legendFilterInvert.bind(this)();\n\n if (inverted) {\n if (event.shiftKey) {\n if (hiddenIndex < 0 && !this._solo.length) {\n this._hidden = this._hidden.concat(id);\n if (soloIndex >= 0) this._solo = [];\n if (this._hidden.length === dataLength) this._hidden = [];\n this.render();\n } else if (soloIndex >= 0) {\n this._solo = [];\n this._hidden = [];\n this.render();\n }\n } else {\n if (soloIndex < 0 && this._hidden.length < dataLength - 1) {\n this._solo = id;\n this._hidden = [];\n } else {\n this._solo = [];\n this._hidden = [];\n }\n this.render();\n }\n } else {\n if (event.shiftKey && soloIndex < 0) {\n this._solo = id;\n this._hidden = [];\n this.render();\n } else if (!event.shiftKey) {\n if (hiddenIndex >= 0) {\n this._hidden.splice(hiddenIndex, id.length);\n } else if (soloIndex >= 0) {\n this._solo = [];\n this._hidden = [];\n } else if (this._solo.length && soloIndex < 0) {\n this._solo = this._solo.concat(id);\n if (this._solo.length === dataLength) this._solo = [];\n } else {\n this._hidden = this._hidden.concat(id);\n if (this._hidden.length === dataLength) this._hidden = [];\n }\n this.render();\n }\n }\n}\n"],"names":["merge","d","i","x","event","_select","style","_tooltip","_tooltipClass","data","render","id","_id","Array","hiddenIndex","_hidden","indexOf","soloIndex","_solo","dataLength","_legendClass","map","length","inverted","_legendFilterInvert","bind","shiftKey","concat","splice"],"mappings":";;;;;;;;AAAA,SAAQA,KAAK,QAAO,WAAW;AAI/B;;;;AAIA,GACA,eAAe,SAEbC,CAAY,EACZC,CAAS,EACTC,CAAY,EACZC,KAAiB;;IAEjB,IAAI,CAACC,OAAO,CAACC,KAAK,CAAC,UAAU;IAC7B,IAAI,IAAI,CAACC,QAAQ,CAACN,GAAGC,IAAI,IAAI,CAACM,aAAa,CAACC,IAAI,CAAC,EAAE,EAAEC,MAAM;IAE3D,IAAIC,KAAK,IAAI,CAACC,GAAG,CAACX,GAAGC;IACrB,IAAI,CAAES,AAAE,YAAFA,IAAcE,QAAQF,KAAK;QAACA;KAAG;IACrC,IAAMG,cAAc,IAAI,CAACC,OAAO,CAACC,OAAO,CAACL,EAAE,CAAC,EAAE;IAC9C,IAAMM,YAAY,IAAI,CAACC,KAAK,CAACF,OAAO,CAACL,EAAE,CAAC,EAAE;IAC1C,IAAMQ,aAAanB,MACjB,IAAI,CAACoB,YAAY,CAACX,IAAI,GAAGY,GAAG,CAAC,SAACpB,GAAcC;QA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AAaH,GAAGW,MAAM;YAC5C,OAAO,IAAIL,aAAa,GAAG;gBACzB,IAAI,CAACC,KAAK,GAAG,EAAE;gBACf,IAAI,CAACH,OAAO,GAAG,EAAE;YACnB,OAAO,IAAI,IAAI,CAACG,KAAK,CAACI,MAAM,IAAIL,YAAY,GAAG;gBAC7C,IAAI,CAACC,KAAK,GAAG,IAAI,CAACA,KAAK,CAACS,MAAM,CAAChB;gBAC/B,IAAI,IAAI,CAACO,KAAK,CAACI,MAAM,KAAKH,YAAY,IAAI,CAACD,KAAK,GAAG,EAAE;YACvD,OAAO;gBACL,IAAI,CAACH,OAAO,GAAG,IAAI,CAACA,OAAO,CAACY,MAAM,CAAChB;gBACnC,IAAI,IAAI,CAACI,OAAO,CAACO,MAAM,KAAKH,YAAY,IAAI,CAACJ,OAAO,GAAG,EAAE;YAC3D;YACA,IAAI,CAACL,MAAM;QACb;IACF;AACF"}
@@ -22,3 +22,5 @@
22
22
  }).render();
23
23
  }
24
24
  }
25
+
26
+ //# sourceMappingURL=click.shape.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/charts/events/click.shape.ts"],"sourcesContent":["import type {DataPoint} from \"@d3plus/data\";\nimport type Viz from \"../Viz.js\";\n\n/**\n @module clickShape\n On click event for all shapes in a Viz.\n @private\n*/\nexport default function (\n this: Viz,\n d: DataPoint,\n i: number,\n x: DataPoint,\n event: MouseEvent,\n): void {\n event.stopPropagation();\n\n if (this._drawDepth < this._groupBy.length - 1) {\n this._select.style(\"cursor\", \"auto\");\n\n const filterGroup = this._groupBy[this._drawDepth],\n filterId = filterGroup(d, i);\n\n this.hover(false);\n if (this._tooltip(d, i)) this._tooltipClass.data([]).render();\n\n const oldFilter = this._filter;\n\n this._history.push({\n depth: this._depth,\n filter: oldFilter,\n });\n\n this.config({\n depth: this._drawDepth + 1,\n filter: (f: DataPoint, x: number) =>\n (!oldFilter || oldFilter(f, x)) && filterGroup(f, x) === filterId,\n }).render();\n }\n}\n"],"names":["d","i","x","event","stopPropagation","_drawDepth","_groupBy","length","_select","style","filterGroup","filterId","hover","_tooltip","_tooltipClass","data","render","oldFilter","_filter","_history","push","depth","_depth","filter","config","f"],"mappings":"AAGA;;;;AAIA,GACA,eAAe,SAEbA,CAAY,EACZC,CAAS,EACTC,CAAY,EACZC,KAAiB;IAEjBA,MAAMC,eAAe;IAErB,IAAI,IAAI,CAACC,UAAU,GAAG,IAAI,CAACC,QAAQ,CAACC,MAAM,GAAG,GAAG;QAC9C,IAAI,CAACC,OAAO,CAACC,KAAK,CAAC,UAAU;QAE7B,IAAMC,cAAc,IAAI,CAACJ,QAAQ,CAAC,IAAI,CAACD,UAAU,CAAC,EAChDM,WAAWD,YAAYV,GAAGC;QAE5B,IAAI,CAACW,KAAK,CAAC;QACX,IAAI,IAAI,CAACC,QAAQ,CAACb,GAAGC,IAAI,IAAI,CAACa,aAAa,CAACC,IAAI,CAAC,EAAE,EAAEC,MAAM;QAE3D,IAAMC,YAAY,IAAI,CAACC,OAAO;QAE9B,IAAI,CAACC,QAAQ,CAACC,IAAI,CAAC;YACjBC,OAAO,IAAI,CAACC,MAAM;YAClBC,QAAQN;QACV;QAEA,IAAI,CAACO,MAAM,CAAC;YACVH,OAAO,IAAI,CAAChB,UAAU,GAAG;YACzBkB,QAAQ,SAARA,OAASE,GAAcvB;uBACrB,AAAC,CAAA,CAACe,aAAaA,UAAUQ,GAAGvB,EAAC,KAAMQ,YAAYe,GAAGvB,OAAOS;;QAC7D,GAAGK,MAAM;IACX;AACF"}
@@ -28,3 +28,5 @@ function _instanceof(left, right) {
28
28
  });
29
29
  }
30
30
  }
31
+
32
+ //# sourceMappingURL=mouseenter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/charts/events/mouseenter.ts"],"sourcesContent":["import type {DataPoint} from \"@d3plus/data\";\nimport type Viz from \"../Viz.js\";\n\n/**\n @module mouseEnter\n On mouseenter event for all shapes in a Viz.\n @private\n*/\nexport default function (this: Viz, d: DataPoint, i: number): void {\n if (this._shapeConfig.hoverOpacity !== 1) {\n let filterIds = this._id(d, i);\n if (!(filterIds instanceof Array)) filterIds = [filterIds];\n\n this.hover((h: DataPoint, x: number) => {\n let id = this._id(h, x);\n if (!(id instanceof Array)) id = [id];\n return filterIds.some((f: string) => id.includes(f));\n });\n }\n}\n"],"names":["d","i","_shapeConfig","hoverOpacity","filterIds","_id","Array","hover","h","x","id","some","f","includes"],"mappings":";;;;;;;;AAGA;;;;AAIA,GACA,eAAe,SAAqBA,CAAY,EAAEC,CAAS;;IACzD,IAAI,IAAI,CAACC,YAAY,CAACC,YAAY,KAAK,GAAG;QACxC,IAAIC,YAAY,IAAI,CAACC,GAAG,CAACL,GAAGC;QAC5B,IAAI,CAAEG,AAAS,YAATA,WAAqBE,QAAQF,YAAY;YAACA;SAAU;QAE1D,IAAI,CAACG,KAAK,CAAC,SAACC,GAAcC;YACxB,IAAIC,KAAK,MAAKL,GAAG,CAACG,GAAGC;YACrB,IAAI,CAAEC,AAAE,YAAFA,IAAcJ,QAAQI,KAAK;gBAACA;aAAG;YACrC,OAAON,UAAUO,IAAI,CAAC,SAACC;uBAAcF,GAAGG,QAAQ,CAACD;;QACnD;IACF;AACF"}
@@ -17,3 +17,5 @@
17
17
  }, 50);
18
18
  this._select.style("cursor", "auto");
19
19
  }
20
+
21
+ //# sourceMappingURL=mouseleave.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/charts/events/mouseleave.ts"],"sourcesContent":["import type {DataPoint} from \"@d3plus/data\";\nimport type Viz from \"../Viz.js\";\n\n/**\n @module mouseLeave\n On mouseleave event for all shapes in a Viz.\n @private\n*/\nexport default function (this: Viz, d: DataPoint, i: number): void {\n setTimeout(() => {\n if (\n this._shapeConfig.hoverOpacity !== 1 && this._hover\n ? this._hover(d, i)\n : true\n ) {\n this.hover(false);\n }\n const tooltipData = this._tooltipClass.data();\n if (tooltipData.length && this._tooltip(d, i)) {\n let tooltipDatum = tooltipData[0];\n while (tooltipDatum.__d3plus__ && tooltipDatum.data)\n tooltipDatum = tooltipDatum.data;\n if (this._id(tooltipDatum) === this._id(d))\n this._tooltipClass.data([]).render();\n }\n }, 50);\n\n this._select.style(\"cursor\", \"auto\");\n}\n"],"names":["d","i","setTimeout","_shapeConfig","hoverOpacity","_hover","hover","tooltipData","_tooltipClass","data","length","_tooltip","tooltipDatum","__d3plus__","_id","render","_select","style"],"mappings":"AAGA;;;;AAIA,GACA,eAAe,SAAqBA,CAAY,EAAEC,CAAS;;IACzDC,WAAW;QACT,IACE,MAAKC,YAAY,CAACC,YAAY,KAAK,KAAK,MAAKC,MAAM,GAC/C,MAAKA,MAAM,CAACL,GAAGC,KACf,MACJ;YACA,MAAKK,KAAK,CAAC;QACb;QACA,IAAMC,cAAc,MAAKC,aAAa,CAACC,IAAI;QAC3C,IAAIF,YAAYG,MAAM,IAAI,MAAKC,QAAQ,CAACX,GAAGC,IAAI;YAC7C,IAAIW,eAAeL,WAAW,CAAC,EAAE;YACjC,MAAOK,aAAaC,UAAU,IAAID,aAAaH,IAAI,CACjDG,eAAeA,aAAaH,IAAI;YAClC,IAAI,MAAKK,GAAG,CAACF,kBAAkB,MAAKE,GAAG,CAACd,IACtC,MAAKQ,aAAa,CAACC,IAAI,CAAC,EAAE,EAAEM,MAAM;QACtC;IACF,GAAG;IAEH,IAAI,CAACC,OAAO,CAACC,KAAK,CAAC,UAAU;AAC/B"}