@unovis/ts 1.6.0-bigip.4 → 1.6.0-bigip.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/crosshair/config.d.ts +9 -2
- package/components/crosshair/config.js.map +1 -1
- package/components/crosshair/index.d.ts +3 -1
- package/components/crosshair/index.js +35 -8
- package/components/crosshair/index.js.map +1 -1
- package/containers/xy-container/index.js +6 -4
- package/containers/xy-container/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -42,8 +42,15 @@ export interface CrosshairConfigInterface<Datum> extends WithOptional<XYComponen
|
|
|
42
42
|
* Default: `undefined`
|
|
43
43
|
*/
|
|
44
44
|
getCircles?: (x: number | Date, data: Datum[], yScale: ContinuousScale, leftNearestDatumIndex: number) => CrosshairCircle[];
|
|
45
|
-
/** Callback function that is called when the crosshair is moved
|
|
46
|
-
|
|
45
|
+
/** Callback function that is called when the crosshair is moved:
|
|
46
|
+
* - `x` is the horizontal position of the crosshair in the data space;
|
|
47
|
+
* - `datum` is the nearest datum to the crosshair;
|
|
48
|
+
* - `datumIndex` is the index of the nearest datum.
|
|
49
|
+
* - `event` is the event that triggered the crosshair move (mouse or wheel).
|
|
50
|
+
*
|
|
51
|
+
* When the mouse goes out of the container and on wheel events, all the arguments are `undefined` except for `event`.
|
|
52
|
+
* Default: `undefined` */
|
|
53
|
+
onCrosshairMove?: (x?: number | Date, datum?: Datum, datumIndex?: number, event?: MouseEvent | WheelEvent) => void;
|
|
47
54
|
/** Force the crosshair to show at a specific position. Default: `undefined` */
|
|
48
55
|
forceShowAt?: number | Date;
|
|
49
56
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sources":["../../../src/components/crosshair/config.ts"],"sourcesContent":["import { XYComponentConfigInterface, XYComponentDefaultConfig } from 'core/xy-component/config'\nimport { Tooltip } from 'components/tooltip'\n\n// Types\nimport { NumericAccessor, ColorAccessor } from 'types/accessor'\nimport { ContinuousScale } from 'types/scale'\nimport { WithOptional } from 'types/misc'\nimport { CrosshairCircle } from './types'\n\n// We extend partial XY config interface because x and y properties are optional for Crosshair\nexport interface CrosshairConfigInterface<Datum> extends WithOptional<XYComponentConfigInterface<Datum>, 'x' | 'y'> {\n /** Optional accessor function for getting the values along the X axis. Default: `undefined` */\n x?: NumericAccessor<Datum>;\n /** Optional single of multiple accessor functions for getting the values along the Y axis. Default: `undefined` */\n y?: NumericAccessor<Datum> | NumericAccessor<Datum>[];\n /** Optional color array or color accessor function for crosshair circles. Default: `d => d.color` */\n color?: ColorAccessor<Datum>;\n /** Optional stroke color accessor function for crosshair circles. Default: `undefined` */\n strokeColor?: ColorAccessor<Datum>;\n /** Optional stroke width for crosshair circles. Default: `undefined` */\n strokeWidth?: NumericAccessor<Datum>;\n /** Separate array of accessors for stacked components (eg StackedBar, Area). Default: `undefined` */\n yStacked?: NumericAccessor<Datum>[];\n /** Baseline accessor function for stacked values, useful with stacked areas. Default: `null` */\n baseline?: NumericAccessor<Datum>;\n /** An instance of the Tooltip component to be used with Crosshair. Default: `undefined` */\n tooltip?: Tooltip | undefined;\n // TODO: Change `datum` type to `Datum | undefined`. This may break the build for many people, so we might want to do it in version 2.0\n /** Tooltip template accessor. The function is supposed to return either a valid HTML string or an HTMLElement.\n * When `snapToData` is `false`, `datum` will be `undefined` but `data` and `leftNearestDatumIndex` will be provided.\n * Default: `d => ''` */\n template?: (datum: Datum, x: number | Date, data: Datum[], leftNearestDatumIndex: number) => string | HTMLElement;\n /** Hide Crosshair when the corresponding datum element is far from mouse pointer. Default: `true` */\n hideWhenFarFromPointer?: boolean;\n /** Distance in pixels to check in the hideWhenFarFromPointer condition. Default: `100` */\n hideWhenFarFromPointerDistance?: number;\n /** Snap to the nearest data point.\n * If disabled, the tooltip template will receive only the horizontal position of the crosshair and you'll be responsible\n * for getting the underlying data records and crosshair circles (see the `getCircles` configuration option).\n * Default: `true`\n */\n snapToData?: boolean;\n /** Custom function for setting up the crosshair circles, usually needed when `snapToData` is set to `false`.\n * The function receives the horizontal position of the crosshair (in the data space, not in pixels), the data array,\n * the `yScale` instance to help you calculate the correct vertical position of the circles, and the nearest datum index.\n * It has to return an array of the `CrosshairCircle` objects: `{ y: number; color: string; opacity?: number }[]`.\n * Default: `undefined`\n */\n getCircles?: (x: number | Date, data: Datum[], yScale: ContinuousScale, leftNearestDatumIndex: number) => CrosshairCircle[];\n /** Callback function that is called when the crosshair is moved
|
|
1
|
+
{"version":3,"file":"config.js","sources":["../../../src/components/crosshair/config.ts"],"sourcesContent":["import { XYComponentConfigInterface, XYComponentDefaultConfig } from 'core/xy-component/config'\nimport { Tooltip } from 'components/tooltip'\n\n// Types\nimport { NumericAccessor, ColorAccessor } from 'types/accessor'\nimport { ContinuousScale } from 'types/scale'\nimport { WithOptional } from 'types/misc'\nimport { CrosshairCircle } from './types'\n\n// We extend partial XY config interface because x and y properties are optional for Crosshair\nexport interface CrosshairConfigInterface<Datum> extends WithOptional<XYComponentConfigInterface<Datum>, 'x' | 'y'> {\n /** Optional accessor function for getting the values along the X axis. Default: `undefined` */\n x?: NumericAccessor<Datum>;\n /** Optional single of multiple accessor functions for getting the values along the Y axis. Default: `undefined` */\n y?: NumericAccessor<Datum> | NumericAccessor<Datum>[];\n /** Optional color array or color accessor function for crosshair circles. Default: `d => d.color` */\n color?: ColorAccessor<Datum>;\n /** Optional stroke color accessor function for crosshair circles. Default: `undefined` */\n strokeColor?: ColorAccessor<Datum>;\n /** Optional stroke width for crosshair circles. Default: `undefined` */\n strokeWidth?: NumericAccessor<Datum>;\n /** Separate array of accessors for stacked components (eg StackedBar, Area). Default: `undefined` */\n yStacked?: NumericAccessor<Datum>[];\n /** Baseline accessor function for stacked values, useful with stacked areas. Default: `null` */\n baseline?: NumericAccessor<Datum>;\n /** An instance of the Tooltip component to be used with Crosshair. Default: `undefined` */\n tooltip?: Tooltip | undefined;\n // TODO: Change `datum` type to `Datum | undefined`. This may break the build for many people, so we might want to do it in version 2.0\n /** Tooltip template accessor. The function is supposed to return either a valid HTML string or an HTMLElement.\n * When `snapToData` is `false`, `datum` will be `undefined` but `data` and `leftNearestDatumIndex` will be provided.\n * Default: `d => ''` */\n template?: (datum: Datum, x: number | Date, data: Datum[], leftNearestDatumIndex: number) => string | HTMLElement;\n /** Hide Crosshair when the corresponding datum element is far from mouse pointer. Default: `true` */\n hideWhenFarFromPointer?: boolean;\n /** Distance in pixels to check in the hideWhenFarFromPointer condition. Default: `100` */\n hideWhenFarFromPointerDistance?: number;\n /** Snap to the nearest data point.\n * If disabled, the tooltip template will receive only the horizontal position of the crosshair and you'll be responsible\n * for getting the underlying data records and crosshair circles (see the `getCircles` configuration option).\n * Default: `true`\n */\n snapToData?: boolean;\n /** Custom function for setting up the crosshair circles, usually needed when `snapToData` is set to `false`.\n * The function receives the horizontal position of the crosshair (in the data space, not in pixels), the data array,\n * the `yScale` instance to help you calculate the correct vertical position of the circles, and the nearest datum index.\n * It has to return an array of the `CrosshairCircle` objects: `{ y: number; color: string; opacity?: number }[]`.\n * Default: `undefined`\n */\n getCircles?: (x: number | Date, data: Datum[], yScale: ContinuousScale, leftNearestDatumIndex: number) => CrosshairCircle[];\n /** Callback function that is called when the crosshair is moved:\n * - `x` is the horizontal position of the crosshair in the data space;\n * - `datum` is the nearest datum to the crosshair;\n * - `datumIndex` is the index of the nearest datum.\n * - `event` is the event that triggered the crosshair move (mouse or wheel).\n *\n * When the mouse goes out of the container and on wheel events, all the arguments are `undefined` except for `event`.\n * Default: `undefined` */\n onCrosshairMove?: (x?: number | Date, datum?: Datum, datumIndex?: number, event?: MouseEvent | WheelEvent) => void;\n /** Force the crosshair to show at a specific position. Default: `undefined` */\n forceShowAt?: number | Date;\n}\n\nexport const CrosshairDefaultConfig: CrosshairConfigInterface<unknown> = {\n ...XYComponentDefaultConfig,\n yStacked: undefined,\n baseline: null,\n duration: 100,\n tooltip: undefined,\n template: <Datum>(d: Datum, x: number | Date, data: Datum[], leftNearestDatumIndex: number): string => '',\n hideWhenFarFromPointer: true,\n hideWhenFarFromPointerDistance: 100,\n snapToData: true,\n getCircles: undefined,\n color: undefined,\n strokeColor: undefined,\n strokeWidth: undefined,\n onCrosshairMove: undefined,\n forceShowAt: undefined,\n}\n\n"],"names":[],"mappings":";;AA8DO,MAAM,sBAAsB,GAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAC9B,wBAAwB,CAC3B,EAAA,EAAA,QAAQ,EAAE,SAAS,EACnB,QAAQ,EAAE,IAAI,EACd,QAAQ,EAAE,GAAG,EACb,OAAO,EAAE,SAAS,EAClB,QAAQ,EAAE,CAAQ,CAAQ,EAAE,CAAgB,EAAE,IAAa,EAAE,qBAA6B,KAAa,EAAE,EACzG,sBAAsB,EAAE,IAAI,EAC5B,8BAA8B,EAAE,GAAG,EACnC,UAAU,EAAE,IAAI,EAChB,UAAU,EAAE,SAAS,EACrB,KAAK,EAAE,SAAS,EAChB,WAAW,EAAE,SAAS,EACtB,WAAW,EAAE,SAAS,EACtB,eAAe,EAAE,SAAS,EAC1B,WAAW,EAAE,SAAS;;;;"}
|
|
@@ -22,12 +22,14 @@ export declare class Crosshair<Datum> extends XYComponentCore<Datum, CrosshairCo
|
|
|
22
22
|
private _accessors;
|
|
23
23
|
set accessors(accessors: CrosshairAccessors<Datum>);
|
|
24
24
|
get accessors(): CrosshairAccessors<Datum>;
|
|
25
|
+
private _isContainerInViewport;
|
|
25
26
|
constructor(config?: CrosshairConfigInterface<Datum>);
|
|
26
27
|
setContainer(containerSvg: Selection<SVGSVGElement, unknown, SVGSVGElement, unknown>): void;
|
|
27
28
|
_render(customDuration?: number): void;
|
|
28
|
-
hide(): void;
|
|
29
|
+
hide(sourceEvent?: MouseEvent | WheelEvent): void;
|
|
29
30
|
_onMouseMove(event: MouseEvent): void;
|
|
30
31
|
_onMouseOut(event?: MouseEvent): void;
|
|
32
|
+
_onWheel(event: WheelEvent): void;
|
|
31
33
|
_showTooltip(datum: Datum, xValue: number, pos: [number, number], nearestDatumIndex: number | undefined): void;
|
|
32
34
|
_hideTooltip(): void;
|
|
33
35
|
getYDataExtent(): number[];
|
|
@@ -45,12 +45,28 @@ class Crosshair extends XYComponentCore {
|
|
|
45
45
|
const baseline = (_a = config.baseline) !== null && _a !== void 0 ? _a : this._accessors.baseline;
|
|
46
46
|
return { x, y, yStacked, baseline };
|
|
47
47
|
}
|
|
48
|
+
_isContainerInViewport() {
|
|
49
|
+
var _a;
|
|
50
|
+
if (!((_a = this.container) === null || _a === void 0 ? void 0 : _a.node()))
|
|
51
|
+
return false;
|
|
52
|
+
const containerRect = this.container.node().getBoundingClientRect();
|
|
53
|
+
const viewportWidth = window.innerWidth || document.documentElement.clientWidth;
|
|
54
|
+
const viewportHeight = window.innerHeight || document.documentElement.clientHeight;
|
|
55
|
+
// Calculate the visible area of the container
|
|
56
|
+
const visibleWidth = Math.max(0, Math.min(containerRect.right, viewportWidth) - Math.max(containerRect.left, 0));
|
|
57
|
+
const visibleHeight = Math.max(0, Math.min(containerRect.bottom, viewportHeight) - Math.max(containerRect.top, 0));
|
|
58
|
+
const containerArea = containerRect.width * containerRect.height;
|
|
59
|
+
const visibleArea = visibleWidth * visibleHeight;
|
|
60
|
+
// Container must be at least 35% visible
|
|
61
|
+
return containerArea > 0 && (visibleArea / containerArea) >= 0.35;
|
|
62
|
+
}
|
|
48
63
|
setContainer(containerSvg) {
|
|
49
64
|
if (this.container === containerSvg)
|
|
50
65
|
return;
|
|
51
66
|
this.container = containerSvg;
|
|
52
67
|
this.container.on('mousemove.crosshair', this._onMouseMove.bind(this));
|
|
53
68
|
this.container.on('mouseout.crosshair', this._onMouseOut.bind(this));
|
|
69
|
+
this.container.on('wheel.crosshair', this._onWheel.bind(this));
|
|
54
70
|
}
|
|
55
71
|
_render(customDuration) {
|
|
56
72
|
var _a, _b, _c, _d;
|
|
@@ -61,6 +77,8 @@ class Crosshair extends XYComponentCore {
|
|
|
61
77
|
const xValue = this.xScale.invert(xPx);
|
|
62
78
|
const leftNearestDatumIndex = (((_a = datamodel.data) === null || _a === void 0 ? void 0 : _a.length) && this.accessors.x)
|
|
63
79
|
? datamodel.data.indexOf(getNearest(datamodel.data, xValue, this.accessors.x, FindNearestDirection.Left)) : undefined;
|
|
80
|
+
// If `snapToData` is `true`, we need to find the nearest datum to the crosshair
|
|
81
|
+
// It can be from a mouse interaction or from a `forceShowAt` setting
|
|
64
82
|
let nearestDatum;
|
|
65
83
|
let nearestDatumIndex;
|
|
66
84
|
if (config.snapToData) {
|
|
@@ -85,7 +103,7 @@ class Crosshair extends XYComponentCore {
|
|
|
85
103
|
shouldShow = false;
|
|
86
104
|
}
|
|
87
105
|
const tooltip = (_c = config.tooltip) !== null && _c !== void 0 ? _c : this.tooltip;
|
|
88
|
-
if (shouldShow && tooltip) {
|
|
106
|
+
if (shouldShow && tooltip && this._isContainerInViewport()) {
|
|
89
107
|
const container = tooltip.getContainer() || this.container.node();
|
|
90
108
|
const isContainerBody = tooltip.isContainerBody();
|
|
91
109
|
if (isForceShowAtDefined) {
|
|
@@ -106,18 +124,18 @@ class Crosshair extends XYComponentCore {
|
|
|
106
124
|
this._hideTooltip();
|
|
107
125
|
// Trigger `onCrosshairMove` if the render was triggered by a mouse move event
|
|
108
126
|
if (this._mouseEvent) {
|
|
109
|
-
(_d = config.onCrosshairMove) === null || _d === void 0 ? void 0 : _d.call(config, shouldShow ? this.xScale.invert(this._xPx) : undefined, nearestDatum, nearestDatumIndex);
|
|
127
|
+
(_d = config.onCrosshairMove) === null || _d === void 0 ? void 0 : _d.call(config, shouldShow ? this.xScale.invert(this._xPx) : undefined, nearestDatum, nearestDatumIndex, this._mouseEvent);
|
|
110
128
|
this._mouseEvent = undefined;
|
|
111
129
|
}
|
|
112
130
|
smartTransition(this.g, duration)
|
|
113
131
|
.style('opacity', shouldShow ? 1 : 0);
|
|
114
|
-
this.line
|
|
115
|
-
.attr('y1', 0)
|
|
116
|
-
.attr('y1', this._height);
|
|
117
132
|
// When `config.forceShowAt` becomes `undefined`, the crosshair "jumps" to the edge of the chart.
|
|
118
|
-
// This looks off, so we stop rendering when the `xPx` value is not finite.
|
|
133
|
+
// This looks off, so we stop further rendering when the `xPx` value is not finite.
|
|
119
134
|
if (!isFinite(xPx))
|
|
120
135
|
return;
|
|
136
|
+
this.line
|
|
137
|
+
.attr('y1', 0)
|
|
138
|
+
.attr('y2', this._height);
|
|
121
139
|
smartTransition(this.line, duration, easeLinear)
|
|
122
140
|
.attr('x1', xClamped)
|
|
123
141
|
.attr('x2', xClamped);
|
|
@@ -146,12 +164,16 @@ class Crosshair extends XYComponentCore {
|
|
|
146
164
|
.style('stroke-width', d => d.strokeWidth);
|
|
147
165
|
circles.exit().remove();
|
|
148
166
|
}
|
|
149
|
-
hide() {
|
|
167
|
+
hide(sourceEvent) {
|
|
150
168
|
window.cancelAnimationFrame(this._animFrameId);
|
|
151
169
|
this._animFrameId = window.requestAnimationFrame(() => {
|
|
170
|
+
var _a, _b;
|
|
152
171
|
this._xPx = undefined;
|
|
153
172
|
this._yPx = undefined;
|
|
154
173
|
this._mouseEvent = undefined;
|
|
174
|
+
// We call `onCrosshairMove` with all the arguments set to `undefined` because we want
|
|
175
|
+
// the users to be able to hide the crosshair easily when using `forceShowAt`
|
|
176
|
+
(_b = (_a = this.config).onCrosshairMove) === null || _b === void 0 ? void 0 : _b.call(_a, undefined, undefined, undefined, sourceEvent);
|
|
155
177
|
this._render();
|
|
156
178
|
});
|
|
157
179
|
}
|
|
@@ -167,6 +189,8 @@ class Crosshair extends XYComponentCore {
|
|
|
167
189
|
this._mouseEvent = event;
|
|
168
190
|
window.cancelAnimationFrame(this._animFrameId);
|
|
169
191
|
this._animFrameId = window.requestAnimationFrame(() => {
|
|
192
|
+
// We'll call `config.onCrosshairMove` in `_render` with the found `nearestDatum` and `nearestDatumIndex`,
|
|
193
|
+
// which can come from the mouse interaction or from the `forceShowAt` setting
|
|
170
194
|
this._render();
|
|
171
195
|
});
|
|
172
196
|
}
|
|
@@ -174,9 +198,12 @@ class Crosshair extends XYComponentCore {
|
|
|
174
198
|
var _a;
|
|
175
199
|
// Only hide if the mouse actually left the SVG, not just moved to a child
|
|
176
200
|
if (!event || !((_a = this.container) === null || _a === void 0 ? void 0 : _a.node().contains(event.relatedTarget))) {
|
|
177
|
-
this.hide();
|
|
201
|
+
this.hide(event);
|
|
178
202
|
}
|
|
179
203
|
}
|
|
204
|
+
_onWheel(event) {
|
|
205
|
+
this.hide(event);
|
|
206
|
+
}
|
|
180
207
|
_showTooltip(datum, xValue, pos, nearestDatumIndex) {
|
|
181
208
|
var _a;
|
|
182
209
|
const { config, datamodel } = this;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/crosshair/index.ts"],"sourcesContent":["import { Selection, pointer } from 'd3-selection'\nimport { easeLinear } from 'd3-ease'\n\n// Core\nimport { XYComponentCore } from 'core/xy-component'\nimport { Tooltip } from 'components/tooltip'\n\n// Utils\nimport { isNumber, isArray, getNumber, clamp, getStackedValues, getNearest, isFunction } from 'utils/data'\nimport { smartTransition } from 'utils/d3'\nimport { getColor } from 'utils/color'\n\n// Types\nimport { Position } from 'types/position'\nimport { FindNearestDirection } from 'types/data'\n\n// Local Types\nimport { CrosshairAccessors, CrosshairCircle } from './types'\n\n// Config\nimport { CrosshairDefaultConfig, CrosshairConfigInterface } from './config'\n\n// Styles\nimport * as s from './style'\n\n\nexport class Crosshair<Datum> extends XYComponentCore<Datum, CrosshairConfigInterface<Datum>> {\n static selectors = s\n clippable = true // Don't apply clipping path to this component. See XYContainer\n protected _defaultConfig = CrosshairDefaultConfig as CrosshairConfigInterface<Datum>\n public config: CrosshairConfigInterface<Datum> = this._defaultConfig\n container: Selection<SVGSVGElement, any, SVGSVGElement, any>\n line: Selection<SVGLineElement, any, SVGElement, any>\n private _xPx: number | undefined = undefined\n private _yPx: number | undefined = undefined\n private _mouseEvent: MouseEvent | undefined = undefined\n private _animFrameId: number = null\n\n /** Tooltip component to be used by Crosshair if not provided by the config.\n * This property is supposed to be set externally by a container component like XYContainer. */\n public tooltip: Tooltip\n\n /** Accessors passed externally (e.g. from XYContainer) */\n private _accessors: CrosshairAccessors<Datum> = {\n x: undefined,\n y: undefined,\n yStacked: undefined,\n baseline: undefined,\n }\n\n public set accessors (accessors: CrosshairAccessors<Datum>) { this._accessors = accessors }\n public get accessors (): CrosshairAccessors<Datum> {\n const { config } = this\n\n const hasConfig = !!(config.x || config.y || config.yStacked)\n const x = hasConfig ? config.x : this._accessors.x\n const yAcc = hasConfig ? config.y : this._accessors.y\n const y = yAcc ? (isArray(yAcc) ? yAcc : [yAcc]) : undefined\n const yStacked = hasConfig ? config.yStacked : this._accessors.yStacked\n const baseline = config.baseline ?? this._accessors.baseline\n\n return { x, y, yStacked, baseline }\n }\n\n constructor (config?: CrosshairConfigInterface<Datum>) {\n super()\n if (config) this.setConfig(config)\n\n this.g.style('opacity', 0)\n this.line = this.g.append('line')\n .attr('class', s.line)\n }\n\n setContainer (containerSvg: Selection<SVGSVGElement, unknown, SVGSVGElement, unknown>): void {\n if (this.container === containerSvg) return\n\n this.container = containerSvg\n this.container.on('mousemove.crosshair', this._onMouseMove.bind(this))\n this.container.on('mouseout.crosshair', this._onMouseOut.bind(this))\n }\n\n _render (customDuration?: number): void {\n const { config, datamodel } = this\n const duration = isNumber(customDuration) ? customDuration : config.duration\n const isForceShowAtDefined = config.forceShowAt !== undefined\n const xPx = isForceShowAtDefined ? this.xScale(config.forceShowAt) : this._xPx\n\n const xValue = this.xScale.invert(xPx) as number\n\n const leftNearestDatumIndex = (datamodel.data?.length && this.accessors.x)\n ? datamodel.data.indexOf(\n getNearest(datamodel.data, xValue, this.accessors.x, FindNearestDirection.Left)\n ) : undefined\n\n let nearestDatum: Datum | undefined\n let nearestDatumIndex: number | undefined\n if (config.snapToData) {\n if (!this.accessors.y && !this.accessors.yStacked && datamodel.data?.length) {\n console.warn('Unovis | Crosshair: Y accessors have not been configured. Please check if they\\'re present in the configuration object')\n }\n\n nearestDatum = getNearest(datamodel.data, xValue, this.accessors.x)\n nearestDatumIndex = datamodel.data.indexOf(nearestDatum)\n if (!nearestDatum) return\n }\n\n const xRange = this.xScale.range()\n const yRange = this.yScale.range()\n const xClamped = config.snapToData\n ? clamp(Math.round(this.xScale(getNumber(nearestDatum, this.accessors.x, nearestDatumIndex))), 0, this._width)\n : clamp(xPx, xRange[0], xRange[1])\n\n const isCrosshairWithinXRange = (xPx >= xRange[0]) && (xPx <= xRange[1])\n const isCrosshairWithinYRange = (this._yPx >= yRange[1]) && (this._yPx <= yRange[0])\n let shouldShow = this._xPx ? isCrosshairWithinXRange && isCrosshairWithinYRange : isCrosshairWithinXRange\n\n // If the crosshair is far from the mouse pointer (usually when `snapToData` is `true` and data resolution is low), hide it\n if (config.hideWhenFarFromPointer && ((Math.abs(xClamped - (+xPx)) >= config.hideWhenFarFromPointerDistance))) {\n shouldShow = false\n }\n\n const tooltip = config.tooltip ?? this.tooltip\n if (shouldShow && tooltip) {\n const container = tooltip.getContainer() || this.container.node()\n const isContainerBody = tooltip.isContainerBody()\n\n if (isForceShowAtDefined) {\n // Convert SVG coordinates to screen coordinates\n const containerRect = this.container.node().getBoundingClientRect()\n\n // Use the actual left margin from the container\n const screenX = (isContainerBody ? xPx + containerRect.left : xPx) + this._containerMargin.left\n const screenY = this._height / 2 + (isContainerBody ? containerRect.top : 0)\n const pos = [screenX, screenY] as [number, number]\n this._showTooltip(nearestDatum, xValue, pos, leftNearestDatumIndex)\n } else if (this._mouseEvent) {\n const pos = (isContainerBody ? [this._mouseEvent.clientX, this._mouseEvent.clientY] : pointer(this._mouseEvent, container)) as [number, number]\n this._showTooltip(nearestDatum, xValue, pos, leftNearestDatumIndex)\n }\n } else this._hideTooltip()\n\n // Trigger `onCrosshairMove` if the render was triggered by a mouse move event\n if (this._mouseEvent) {\n config.onCrosshairMove?.(shouldShow ? this.xScale.invert(this._xPx) as number : undefined, nearestDatum, nearestDatumIndex)\n this._mouseEvent = undefined\n }\n\n smartTransition(this.g, duration)\n .style('opacity', shouldShow ? 1 : 0)\n\n this.line\n .attr('y1', 0)\n .attr('y1', this._height)\n\n // When `config.forceShowAt` becomes `undefined`, the crosshair \"jumps\" to the edge of the chart.\n // This looks off, so we stop rendering when the `xPx` value is not finite.\n if (!isFinite(xPx)) return\n\n smartTransition(this.line, duration, easeLinear)\n .attr('x1', xClamped)\n .attr('x2', xClamped)\n\n const circleData = isFunction(config.getCircles)\n ? config.getCircles(xValue, datamodel.data, this.yScale, leftNearestDatumIndex)\n : this.getCircleData(nearestDatum, nearestDatumIndex)\n\n const circles = this.g\n .selectAll<SVGCircleElement, CrosshairCircle>('circle')\n .data(circleData, (d, i) => d.id ?? i)\n\n const circlesEnter = circles.enter()\n .append('circle')\n .attr('class', s.circle)\n .attr('r', 0)\n .attr('cx', xClamped)\n .attr('cy', d => d.y)\n .style('fill', d => d.color)\n .style('stroke', d => d.strokeColor)\n .style('stroke-width', d => d.strokeWidth)\n\n smartTransition(circlesEnter.merge(circles), duration, easeLinear)\n .attr('cx', xClamped)\n .attr('cy', d => d.y)\n .attr('r', 4)\n .style('opacity', d => d.opacity)\n .style('fill', d => d.color)\n .style('stroke', d => d.strokeColor)\n .style('stroke-width', d => d.strokeWidth)\n\n circles.exit().remove()\n }\n\n hide (): void {\n window.cancelAnimationFrame(this._animFrameId)\n this._animFrameId = window.requestAnimationFrame(() => {\n this._xPx = undefined\n this._yPx = undefined\n this._mouseEvent = undefined\n this._render()\n })\n }\n\n _onMouseMove (event: MouseEvent): void {\n const { datamodel, element } = this\n if (!this.accessors.x && datamodel.data?.length) {\n console.warn('Unovis | Crosshair: X accessor function has not been configured. Please check if it\\'s present in the configuration object')\n }\n const [x, y] = pointer(event, element)\n this._xPx = x\n this._yPx = y\n this._mouseEvent = event\n\n window.cancelAnimationFrame(this._animFrameId)\n this._animFrameId = window.requestAnimationFrame(() => {\n this._render()\n })\n }\n\n _onMouseOut (event?: MouseEvent): void {\n // Only hide if the mouse actually left the SVG, not just moved to a child\n if (!event || !this.container?.node().contains((event as MouseEvent).relatedTarget as Node)) {\n this.hide()\n }\n }\n\n _showTooltip (datum: Datum, xValue: number, pos: [number, number], nearestDatumIndex: number | undefined): void {\n const { config, datamodel } = this\n const tooltip = config.tooltip ?? this.tooltip\n if (!tooltip || !pos) return\n\n const [x, y] = pos\n const content = config.template(datum, xValue, datamodel.data, nearestDatumIndex)\n // Force set `followCursor` to `true` because we don't want Crosshair's tooltip to be hoverable\n tooltip.config.followCursor = true\n\n // Set tooltip placement based on Crosshair's position (left / right)\n if (!tooltip.config.horizontalPlacement || tooltip.config.horizontalPlacement === Position.Auto) {\n const xRelative = tooltip.isContainerBody() ? x - this.container.node().getBoundingClientRect().left : x\n tooltip.overrideHorizontalPlacement(xRelative > this._containerWidth / 2 ? Position.Left : Position.Right)\n }\n\n if (content) tooltip.show(content, { x, y })\n }\n\n _hideTooltip (): void {\n const { config } = this\n const tooltip = config.tooltip ?? this.tooltip\n tooltip?.hide()\n }\n\n // We don't want Crosshair to be be taken in to account in domain calculations\n getYDataExtent (): number[] {\n return [undefined, undefined]\n }\n\n private getCircleData (datum: Datum, datumIndex: number): CrosshairCircle[] {\n const { config } = this\n\n if (config.snapToData && datum) {\n const yAccessors = this.accessors.y ?? []\n const yStackedAccessors = this.accessors.yStacked ?? []\n const baselineValue = getNumber(datum, this.accessors.baseline, datumIndex) || 0\n const stackedValues: CrosshairCircle[] = getStackedValues(datum, datumIndex, ...yStackedAccessors)\n .map((value, index) => ({\n y: this.yScale(value + baselineValue),\n opacity: isNumber(getNumber(datum, yStackedAccessors[index], index)) ? 1 : 0,\n color: getColor(datum, config.color, index),\n strokeColor: config.strokeColor ? getColor(datum, config.strokeColor, index) : undefined,\n strokeWidth: config.strokeWidth ? getNumber(datum, config.strokeWidth, index) : undefined,\n }))\n\n const regularValues: CrosshairCircle[] = yAccessors\n .map((a, index) => {\n const value = getNumber(datum, a, datumIndex)\n return {\n y: this.yScale(value),\n opacity: isNumber(value) ? 1 : 0,\n color: getColor(datum, config.color, stackedValues.length + index),\n strokeColor: config.strokeColor ? getColor(datum, config.strokeColor, index) : undefined,\n strokeWidth: config.strokeWidth ? getNumber(datum, config.strokeWidth, index) : undefined,\n }\n })\n\n return stackedValues.concat(regularValues)\n }\n\n return []\n }\n}\n"],"names":["s.line","s.circle","s"],"mappings":";;;;;;;;;;;;AA0BM,MAAO,SAAiB,SAAQ,eAAuD,CAAA;AAsC3F,IAAA,WAAA,CAAa,MAAwC,EAAA;AACnD,QAAA,KAAK,EAAE,CAAA;AArCT,QAAA,IAAA,CAAA,SAAS,GAAG,IAAI,CAAA;QACN,IAAc,CAAA,cAAA,GAAG,sBAAyD,CAAA;AAC7E,QAAA,IAAA,CAAA,MAAM,GAAoC,IAAI,CAAC,cAAc,CAAA;QAG5D,IAAI,CAAA,IAAA,GAAuB,SAAS,CAAA;QACpC,IAAI,CAAA,IAAA,GAAuB,SAAS,CAAA;QACpC,IAAW,CAAA,WAAA,GAA2B,SAAS,CAAA;QAC/C,IAAY,CAAA,YAAA,GAAW,IAAI,CAAA;;AAO3B,QAAA,IAAA,CAAA,UAAU,GAA8B;AAC9C,YAAA,CAAC,EAAE,SAAS;AACZ,YAAA,CAAC,EAAE,SAAS;AACZ,YAAA,QAAQ,EAAE,SAAS;AACnB,YAAA,QAAQ,EAAE,SAAS;SACpB,CAAA;AAkBC,QAAA,IAAI,MAAM;AAAE,YAAA,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAA;QAElC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC,CAAA;QAC1B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC;AAC9B,aAAA,IAAI,CAAC,OAAO,EAAEA,IAAM,CAAC,CAAA;KACzB;IArBD,IAAW,SAAS,CAAE,SAAoC,EAAI,EAAA,IAAI,CAAC,UAAU,GAAG,SAAS,CAAA,EAAE;AA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,CAAC,KAAK,EAAE,MAAM,CAAC,WAAW,EAAE,KAAK,CAAC,GAAG,SAAS;oBACxF,WAAW,EAAE,MAAM,CAAC,WAAW,GAAG,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC,WAAW,EAAE,KAAK,CAAC,GAAG,SAAS;iBAC1F,CAAA;AACH,aAAC,CAAC,CAAA;AAEJ,YAAA,OAAO,aAAa,CAAC,MAAM,CAAC,aAAa,CAAC,CAAA;AAC3C,SAAA;AAED,QAAA,OAAO,EAAE,CAAA;KACV;;AApQM,SAAS,CAAA,SAAA,GAAGC,KAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/crosshair/index.ts"],"sourcesContent":["import { Selection, pointer } from 'd3-selection'\nimport { easeLinear } from 'd3-ease'\n\n// Core\nimport { XYComponentCore } from 'core/xy-component'\nimport { Tooltip } from 'components/tooltip'\n\n// Utils\nimport { isNumber, isArray, getNumber, clamp, getStackedValues, getNearest, isFunction } from 'utils/data'\nimport { smartTransition } from 'utils/d3'\nimport { getColor } from 'utils/color'\n\n// Types\nimport { Position } from 'types/position'\nimport { FindNearestDirection } from 'types/data'\n\n// Local Types\nimport { CrosshairAccessors, CrosshairCircle } from './types'\n\n// Config\nimport { CrosshairDefaultConfig, CrosshairConfigInterface } from './config'\n\n// Styles\nimport * as s from './style'\n\n\nexport class Crosshair<Datum> extends XYComponentCore<Datum, CrosshairConfigInterface<Datum>> {\n static selectors = s\n clippable = true // Don't apply clipping path to this component. See XYContainer\n protected _defaultConfig = CrosshairDefaultConfig as CrosshairConfigInterface<Datum>\n public config: CrosshairConfigInterface<Datum> = this._defaultConfig\n container: Selection<SVGSVGElement, any, SVGSVGElement, any>\n line: Selection<SVGLineElement, any, SVGElement, any>\n private _xPx: number | undefined = undefined\n private _yPx: number | undefined = undefined\n private _mouseEvent: MouseEvent | undefined = undefined\n private _animFrameId: number = null\n\n /** Tooltip component to be used by Crosshair if not provided by the config.\n * This property is supposed to be set externally by a container component like XYContainer. */\n public tooltip: Tooltip\n\n /** Accessors passed externally (e.g. from XYContainer) */\n private _accessors: CrosshairAccessors<Datum> = {\n x: undefined,\n y: undefined,\n yStacked: undefined,\n baseline: undefined,\n }\n\n public set accessors (accessors: CrosshairAccessors<Datum>) { this._accessors = accessors }\n public get accessors (): CrosshairAccessors<Datum> {\n const { config } = this\n\n const hasConfig = !!(config.x || config.y || config.yStacked)\n const x = hasConfig ? config.x : this._accessors.x\n const yAcc = hasConfig ? config.y : this._accessors.y\n const y = yAcc ? (isArray(yAcc) ? yAcc : [yAcc]) : undefined\n const yStacked = hasConfig ? config.yStacked : this._accessors.yStacked\n const baseline = config.baseline ?? this._accessors.baseline\n\n return { x, y, yStacked, baseline }\n }\n\n private _isContainerInViewport (): boolean {\n if (!this.container?.node()) return false\n\n const containerRect = this.container.node().getBoundingClientRect()\n const viewportWidth = window.innerWidth || document.documentElement.clientWidth\n const viewportHeight = window.innerHeight || document.documentElement.clientHeight\n\n // Calculate the visible area of the container\n const visibleWidth = Math.max(0, Math.min(containerRect.right, viewportWidth) - Math.max(containerRect.left, 0))\n const visibleHeight = Math.max(0, Math.min(containerRect.bottom, viewportHeight) - Math.max(containerRect.top, 0))\n const containerArea = containerRect.width * containerRect.height\n const visibleArea = visibleWidth * visibleHeight\n\n // Container must be at least 35% visible\n return containerArea > 0 && (visibleArea / containerArea) >= 0.35\n }\n\n constructor (config?: CrosshairConfigInterface<Datum>) {\n super()\n if (config) this.setConfig(config)\n\n this.g.style('opacity', 0)\n this.line = this.g.append('line')\n .attr('class', s.line)\n }\n\n setContainer (containerSvg: Selection<SVGSVGElement, unknown, SVGSVGElement, unknown>): void {\n if (this.container === containerSvg) return\n\n this.container = containerSvg\n this.container.on('mousemove.crosshair', this._onMouseMove.bind(this))\n this.container.on('mouseout.crosshair', this._onMouseOut.bind(this))\n this.container.on('wheel.crosshair', this._onWheel.bind(this))\n }\n\n _render (customDuration?: number): void {\n const { config, datamodel } = this\n const duration = isNumber(customDuration) ? customDuration : config.duration\n const isForceShowAtDefined = config.forceShowAt !== undefined\n const xPx = isForceShowAtDefined ? this.xScale(config.forceShowAt) : this._xPx\n\n const xValue = this.xScale.invert(xPx) as number\n\n const leftNearestDatumIndex = (datamodel.data?.length && this.accessors.x)\n ? datamodel.data.indexOf(\n getNearest(datamodel.data, xValue, this.accessors.x, FindNearestDirection.Left)\n ) : undefined\n\n // If `snapToData` is `true`, we need to find the nearest datum to the crosshair\n // It can be from a mouse interaction or from a `forceShowAt` setting\n let nearestDatum: Datum | undefined\n let nearestDatumIndex: number | undefined\n if (config.snapToData) {\n if (!this.accessors.y && !this.accessors.yStacked && datamodel.data?.length) {\n console.warn('Unovis | Crosshair: Y accessors have not been configured. Please check if they\\'re present in the configuration object')\n }\n\n nearestDatum = getNearest(datamodel.data, xValue, this.accessors.x)\n nearestDatumIndex = datamodel.data.indexOf(nearestDatum)\n if (!nearestDatum) return\n }\n\n const xRange = this.xScale.range()\n const yRange = this.yScale.range()\n const xClamped = config.snapToData\n ? clamp(Math.round(this.xScale(getNumber(nearestDatum, this.accessors.x, nearestDatumIndex))), 0, this._width)\n : clamp(xPx, xRange[0], xRange[1])\n\n const isCrosshairWithinXRange = (xPx >= xRange[0]) && (xPx <= xRange[1])\n const isCrosshairWithinYRange = (this._yPx >= yRange[1]) && (this._yPx <= yRange[0])\n let shouldShow = this._xPx ? isCrosshairWithinXRange && isCrosshairWithinYRange : isCrosshairWithinXRange\n\n // If the crosshair is far from the mouse pointer (usually when `snapToData` is `true` and data resolution is low), hide it\n if (config.hideWhenFarFromPointer && ((Math.abs(xClamped - (+xPx)) >= config.hideWhenFarFromPointerDistance))) {\n shouldShow = false\n }\n\n const tooltip = config.tooltip ?? this.tooltip\n if (shouldShow && tooltip && this._isContainerInViewport()) {\n const container = tooltip.getContainer() || this.container.node()\n const isContainerBody = tooltip.isContainerBody()\n\n if (isForceShowAtDefined) {\n // Convert SVG coordinates to screen coordinates\n const containerRect = this.container.node().getBoundingClientRect()\n\n // Use the actual left margin from the container\n const screenX = (isContainerBody ? xPx + containerRect.left : xPx) + this._containerMargin.left\n const screenY = this._height / 2 + (isContainerBody ? containerRect.top : 0)\n const pos = [screenX, screenY] as [number, number]\n this._showTooltip(nearestDatum, xValue, pos, leftNearestDatumIndex)\n } else if (this._mouseEvent) {\n const pos = (isContainerBody ? [this._mouseEvent.clientX, this._mouseEvent.clientY] : pointer(this._mouseEvent, container)) as [number, number]\n this._showTooltip(nearestDatum, xValue, pos, leftNearestDatumIndex)\n }\n } else this._hideTooltip()\n\n // Trigger `onCrosshairMove` if the render was triggered by a mouse move event\n if (this._mouseEvent) {\n config.onCrosshairMove?.(shouldShow ? this.xScale.invert(this._xPx) as number : undefined, nearestDatum, nearestDatumIndex, this._mouseEvent)\n this._mouseEvent = undefined\n }\n\n smartTransition(this.g, duration)\n .style('opacity', shouldShow ? 1 : 0)\n\n // When `config.forceShowAt` becomes `undefined`, the crosshair \"jumps\" to the edge of the chart.\n // This looks off, so we stop further rendering when the `xPx` value is not finite.\n if (!isFinite(xPx)) return\n\n this.line\n .attr('y1', 0)\n .attr('y2', this._height)\n\n smartTransition(this.line, duration, easeLinear)\n .attr('x1', xClamped)\n .attr('x2', xClamped)\n\n const circleData = isFunction(config.getCircles)\n ? config.getCircles(xValue, datamodel.data, this.yScale, leftNearestDatumIndex)\n : this.getCircleData(nearestDatum, nearestDatumIndex)\n\n const circles = this.g\n .selectAll<SVGCircleElement, CrosshairCircle>('circle')\n .data(circleData, (d, i) => d.id ?? i)\n\n const circlesEnter = circles.enter()\n .append('circle')\n .attr('class', s.circle)\n .attr('r', 0)\n .attr('cx', xClamped)\n .attr('cy', d => d.y)\n .style('fill', d => d.color)\n .style('stroke', d => d.strokeColor)\n .style('stroke-width', d => d.strokeWidth)\n\n smartTransition(circlesEnter.merge(circles), duration, easeLinear)\n .attr('cx', xClamped)\n .attr('cy', d => d.y)\n .attr('r', 4)\n .style('opacity', d => d.opacity)\n .style('fill', d => d.color)\n .style('stroke', d => d.strokeColor)\n .style('stroke-width', d => d.strokeWidth)\n\n circles.exit().remove()\n }\n\n hide (sourceEvent?: MouseEvent | WheelEvent): void {\n window.cancelAnimationFrame(this._animFrameId)\n this._animFrameId = window.requestAnimationFrame(() => {\n this._xPx = undefined\n this._yPx = undefined\n this._mouseEvent = undefined\n // We call `onCrosshairMove` with all the arguments set to `undefined` because we want\n // the users to be able to hide the crosshair easily when using `forceShowAt`\n this.config.onCrosshairMove?.(undefined, undefined, undefined, sourceEvent)\n this._render()\n })\n }\n\n _onMouseMove (event: MouseEvent): void {\n const { datamodel, element } = this\n if (!this.accessors.x && datamodel.data?.length) {\n console.warn('Unovis | Crosshair: X accessor function has not been configured. Please check if it\\'s present in the configuration object')\n }\n const [x, y] = pointer(event, element)\n this._xPx = x\n this._yPx = y\n this._mouseEvent = event\n\n window.cancelAnimationFrame(this._animFrameId)\n this._animFrameId = window.requestAnimationFrame(() => {\n // We'll call `config.onCrosshairMove` in `_render` with the found `nearestDatum` and `nearestDatumIndex`,\n // which can come from the mouse interaction or from the `forceShowAt` setting\n this._render()\n })\n }\n\n _onMouseOut (event?: MouseEvent): void {\n // Only hide if the mouse actually left the SVG, not just moved to a child\n if (!event || !this.container?.node().contains((event as MouseEvent).relatedTarget as Node)) {\n this.hide(event)\n }\n }\n\n _onWheel (event: WheelEvent): void {\n this.hide(event)\n }\n\n _showTooltip (datum: Datum, xValue: number, pos: [number, number], nearestDatumIndex: number | undefined): void {\n const { config, datamodel } = this\n const tooltip = config.tooltip ?? this.tooltip\n if (!tooltip || !pos) return\n\n const [x, y] = pos\n const content = config.template(datum, xValue, datamodel.data, nearestDatumIndex)\n // Force set `followCursor` to `true` because we don't want Crosshair's tooltip to be hoverable\n tooltip.config.followCursor = true\n\n // Set tooltip placement based on Crosshair's position (left / right)\n if (!tooltip.config.horizontalPlacement || tooltip.config.horizontalPlacement === Position.Auto) {\n const xRelative = tooltip.isContainerBody() ? x - this.container.node().getBoundingClientRect().left : x\n tooltip.overrideHorizontalPlacement(xRelative > this._containerWidth / 2 ? Position.Left : Position.Right)\n }\n\n if (content) tooltip.show(content, { x, y })\n }\n\n _hideTooltip (): void {\n const { config } = this\n const tooltip = config.tooltip ?? this.tooltip\n tooltip?.hide()\n }\n\n // We don't want Crosshair to be be taken in to account in domain calculations\n getYDataExtent (): number[] {\n return [undefined, undefined]\n }\n\n private getCircleData (datum: Datum, datumIndex: number): CrosshairCircle[] {\n const { config } = this\n\n if (config.snapToData && datum) {\n const yAccessors = this.accessors.y ?? []\n const yStackedAccessors = this.accessors.yStacked ?? []\n const baselineValue = getNumber(datum, this.accessors.baseline, datumIndex) || 0\n const stackedValues: CrosshairCircle[] = getStackedValues(datum, datumIndex, ...yStackedAccessors)\n .map((value, index) => ({\n y: this.yScale(value + baselineValue),\n opacity: isNumber(getNumber(datum, yStackedAccessors[index], index)) ? 1 : 0,\n color: getColor(datum, config.color, index),\n strokeColor: config.strokeColor ? getColor(datum, config.strokeColor, index) : undefined,\n strokeWidth: config.strokeWidth ? getNumber(datum, config.strokeWidth, index) : undefined,\n }))\n\n const regularValues: CrosshairCircle[] = yAccessors\n .map((a, index) => {\n const value = getNumber(datum, a, datumIndex)\n return {\n y: this.yScale(value),\n opacity: isNumber(value) ? 1 : 0,\n color: getColor(datum, config.color, stackedValues.length + index),\n strokeColor: config.strokeColor ? getColor(datum, config.strokeColor, index) : undefined,\n strokeWidth: config.strokeWidth ? getNumber(datum, config.strokeWidth, index) : undefined,\n }\n })\n\n return stackedValues.concat(regularValues)\n }\n\n return []\n }\n}\n"],"names":["s.line","s.circle","s"],"mappings":";;;;;;;;;;;;AA0BM,MAAO,SAAiB,SAAQ,eAAuD,CAAA;AAuD3F,IAAA,WAAA,CAAa,MAAwC,EAAA;AACnD,QAAA,KAAK,EAAE,CAAA;AAtDT,QAAA,IAAA,CAAA,SAAS,GAAG,IAAI,CAAA;QACN,IAAc,CAAA,cAAA,GAAG,sBAAyD,CAAA;AAC7E,QAAA,IAAA,CAAA,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,KAAK,CAAC,GAAG,SAAS;oBACxF,WAAW,EAAE,MAAM,CAAC,WAAW,GAAG,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC,WAAW,EAAE,KAAK,CAAC,GAAG,SAAS;iBAC1F,CAAA;AACH,aAAC,CAAC,CAAA;AAEJ,YAAA,OAAO,aAAa,CAAC,MAAM,CAAC,aAAa,CAAC,CAAA;AAC3C,SAAA;AAED,QAAA,OAAO,EAAE,CAAA;KACV;;AAjSM,SAAS,CAAA,SAAA,GAAGC,KAAC;;;;"}
|
|
@@ -6,7 +6,7 @@ import { CoreDataModel } from '../../data-models/core.js';
|
|
|
6
6
|
import { AxisType } from '../../components/axis/types.js';
|
|
7
7
|
import { ScaleDimension } from '../../types/scale.js';
|
|
8
8
|
import { Direction } from '../../types/direction.js';
|
|
9
|
-
import { clamp, clean, flatten } from '../../utils/data.js';
|
|
9
|
+
import { clamp, isEqual, clean, flatten } from '../../utils/data.js';
|
|
10
10
|
import { guid } from '../../utils/misc.js';
|
|
11
11
|
import { XYContainerDefaultConfig } from './config.js';
|
|
12
12
|
|
|
@@ -67,9 +67,10 @@ class XYContainer extends ContainerCore {
|
|
|
67
67
|
return clamp(this.containerHeight - margin.top - margin.bottom, 0, Number.POSITIVE_INFINITY);
|
|
68
68
|
}
|
|
69
69
|
setData(data, preventRender) {
|
|
70
|
-
var _a, _b, _c, _d;
|
|
70
|
+
var _a, _b, _c, _d, _e;
|
|
71
71
|
const { components, config } = this;
|
|
72
|
-
|
|
72
|
+
const hasDataUpdated = !isEqual(this.datamodel.data, data);
|
|
73
|
+
if (!hasDataUpdated || !data)
|
|
73
74
|
return;
|
|
74
75
|
this.datamodel.data = data;
|
|
75
76
|
components.forEach((c) => {
|
|
@@ -79,6 +80,7 @@ class XYContainer extends ContainerCore {
|
|
|
79
80
|
(_b = config.xAxis) === null || _b === void 0 ? void 0 : _b.setData(data);
|
|
80
81
|
(_c = config.yAxis) === null || _c === void 0 ? void 0 : _c.setData(data);
|
|
81
82
|
(_d = config.tooltip) === null || _d === void 0 ? void 0 : _d.hide();
|
|
83
|
+
(_e = config.crosshair) === null || _e === void 0 ? void 0 : _e.hide();
|
|
82
84
|
if (!preventRender)
|
|
83
85
|
this.render();
|
|
84
86
|
}
|
|
@@ -207,7 +209,7 @@ class XYContainer extends ContainerCore {
|
|
|
207
209
|
crosshair.g.attr('transform', `translate(${margin.left},${margin.top})`)
|
|
208
210
|
.style('clip-path', `url(#${this._clipPathId})`)
|
|
209
211
|
.style('-webkit-clip-path', `url(#${this._clipPathId})`);
|
|
210
|
-
crosshair.
|
|
212
|
+
crosshair.render();
|
|
211
213
|
}
|
|
212
214
|
(_d = config.annotations) === null || _d === void 0 ? void 0 : _d.g.attr('transform', `translate(${margin.left},${margin.top})`);
|
|
213
215
|
(_e = config.annotations) === null || _e === void 0 ? void 0 : _e.render();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/containers/xy-container/index.ts"],"sourcesContent":["import { css } from '@emotion/css'\nimport { extent, merge as mergeArrays } from 'd3-array'\nimport { Selection } from 'd3-selection'\n\n// Global CSS variables (side effects import)\nimport 'styles/index'\n\n// Core\nimport { ContainerCore } from 'core/container'\nimport { XYComponentCore } from 'core/xy-component'\nimport { XYComponentConfigInterface } from 'core/xy-component/config'\n\n// Data Model\nimport { CoreDataModel } from 'data-models/core'\n\n// Types\nimport { Spacing } from 'types/spacing'\nimport { AxisType } from 'components/axis/types'\nimport { ScaleDimension } from 'types/scale'\nimport { Direction } from 'types/direction'\n\n// Utils\nimport { clamp, clean, flatten } from 'utils/data'\nimport { guid } from 'utils/misc'\n\n// Config\nimport { XYContainerDefaultConfig, XYContainerConfigInterface } from './config'\nimport {\n AreaConfigInterface,\n BrushConfigInterface,\n LineConfigInterface,\n ScatterConfigInterface,\n StackedBarConfigInterface,\n TimelineConfigInterface,\n} from '../../components'\n\nexport type XYConfigInterface<Datum> = XYComponentConfigInterface<Datum>\n| StackedBarConfigInterface<Datum>\n| LineConfigInterface<Datum>\n| ScatterConfigInterface<Datum>\n| BrushConfigInterface<Datum>\n| TimelineConfigInterface<Datum>\n| AreaConfigInterface<Datum>\n\nexport class XYContainer<Datum> extends ContainerCore {\n protected _defaultConfig = XYContainerDefaultConfig as XYContainerConfigInterface<Datum>\n protected _svgDefs: Selection<SVGDefsElement, unknown, null, undefined>\n public datamodel: CoreDataModel<Datum[]> = new CoreDataModel()\n public config: XYContainerConfigInterface<Datum> = this._defaultConfig\n private _clipPath: Selection<SVGClipPathElement, unknown, null, undefined>\n private _clipPathId = guid()\n private _axisMargin: Spacing = { top: 0, bottom: 0, left: 0, right: 0 }\n private _firstRender = true\n\n constructor (element: HTMLElement, config?: XYContainerConfigInterface<Datum>, data?: Datum[]) {\n super(element)\n\n this._clipPath = this.svg.append('clipPath')\n .attr('id', this._clipPathId)\n this._clipPath.append('rect')\n\n // When the base tag is specified on the HTML head,\n // Safari fails to find the corresponding filter URL.\n // We have to provide tull url in order to fix that\n const highlightFilterId = 'saturate'\n const baseUrl = window.location.href.replace(window.location.hash, '')\n this.svg.attr('class', css`\n --highlight-filter-id: url(${baseUrl}#${highlightFilterId}); // defining a css variable\n `)\n\n this._svgDefs.append('filter')\n .attr('id', highlightFilterId)\n .attr('filterUnits', 'objectBoundingBox')\n .html('<feColorMatrix type=\"saturate\" in=\"SourceGraphic\" values=\"1.35\"/>')\n\n if (config) {\n this.updateContainer(config, true)\n }\n\n if (data) {\n this.setData(data, true)\n }\n\n // Render if there are axes or components with data\n if (\n this.config.xAxis ||\n this.config.yAxis ||\n this.components?.some(c => c.datamodel.data)\n ) {\n this.render()\n }\n\n // Force re-render axes when fonts are loaded\n (document as any).fonts?.ready.then(() => {\n if (!this._firstRender) this._renderAxes(0)\n })\n }\n\n get components (): XYComponentCore<Datum>[] {\n return this.config.components\n }\n\n // Overriding ContainerCore default get width method to work with axis auto margin\n get width (): number {\n const margin = this._getMargin()\n return clamp(this.containerWidth - margin.left - margin.right, 0, Number.POSITIVE_INFINITY)\n }\n\n // Overriding ContainerCore default get height method to work with axis auto margin\n get height (): number {\n const margin = this._getMargin()\n\n return clamp(this.containerHeight - margin.top - margin.bottom, 0, Number.POSITIVE_INFINITY)\n }\n\n public setData (data: Datum[], preventRender?: boolean): void {\n const { components, config } = this\n if (!data) return\n this.datamodel.data = data\n\n components.forEach((c) => {\n c.setData(data)\n })\n\n config.crosshair?.setData(data)\n config.xAxis?.setData(data)\n config.yAxis?.setData(data)\n config.tooltip?.hide()\n if (!preventRender) this.render()\n }\n\n public updateContainer (containerConfig: XYContainerConfigInterface<Datum>, preventRender?: boolean): void {\n super.updateContainer(containerConfig)\n this._removeAllChildren()\n\n // If there were any new components added we need to pass them data\n this.setData(this.datamodel.data, true)\n\n // Set up the axes\n if (containerConfig.xAxis) {\n this.config.xAxis.config.type = AxisType.X\n this.element.appendChild(containerConfig.xAxis.element)\n }\n if (containerConfig.yAxis) {\n this.config.yAxis.config.type = AxisType.Y\n this.element.appendChild(containerConfig.yAxis.element)\n }\n\n // Re-insert elements to the DOM\n for (const c of this.components) {\n this.element.appendChild(c.element)\n }\n\n // Set up the tooltip\n const tooltip = containerConfig.tooltip\n if (tooltip) {\n if (!tooltip.hasContainer()) tooltip.setContainer(this._container)\n tooltip.setComponents(this.components)\n }\n\n // Set up the crosshair\n const crosshair = containerConfig.crosshair\n if (crosshair) {\n crosshair.setContainer(this.svg)\n crosshair.tooltip = tooltip\n\n this.element.appendChild(crosshair.element)\n }\n\n // Set up annotations\n const annotations = containerConfig.annotations\n if (annotations) {\n this.element.appendChild(annotations.element)\n }\n\n // Clipping path\n this.element.appendChild(this._clipPath.node())\n\n // Defs\n this.element.appendChild(this._svgDefs.node())\n this.element.appendChild(this._svgDefsExternal.node())\n\n // Rendering\n if (!preventRender) this.render()\n }\n\n public updateComponents (componentConfigs: XYConfigInterface<Datum>[], preventRender?: boolean): void {\n const { config } = this\n\n this.components.forEach((c, i) => {\n const componentConfig = componentConfigs[i]\n if (componentConfig) {\n c.setConfig(componentConfigs[i])\n }\n })\n\n this._updateScales(...this.components, config.xAxis, config.yAxis, config.crosshair)\n if (!preventRender) this.render()\n }\n\n public update (containerConfig: XYContainerConfigInterface<Datum>, componentConfigs?: XYComponentConfigInterface<Datum>[], data?: Datum[]): void {\n if (data) this.datamodel.data = data // Just updating the data model because the `updateContainer` method has the `setData` step inside\n if (containerConfig) this.updateContainer(containerConfig, true)\n if (componentConfigs) this.updateComponents(componentConfigs, true)\n this.render()\n }\n\n protected _preRender (): void {\n const { config } = this\n super._preRender()\n\n // Calculate extra margin required to fit the axes\n if (config.autoMargin) {\n this._setAutoMargin()\n }\n\n // Pass size and margin to the components\n const components = clean([...this.components, config.xAxis, config.yAxis, config.crosshair, config.annotations])\n const margin = this._getMargin()\n for (const c of components) {\n c.setSize(this.width, this.height, this.containerWidth, this.containerHeight)\n c.setContainerMargin(margin)\n }\n\n // Update Scales of all the components at once to calculate required paddings and sync them\n this._updateScales(...this.components, config.xAxis, config.yAxis, config.crosshair)\n }\n\n protected _render (customDuration?: number): void {\n const { config } = this\n super._render()\n\n // Get chart total margin after auto margin calculations\n const margin = this._getMargin()\n\n // Render components\n for (const c of this.components) {\n c.g.attr('transform', `translate(${margin.left},${margin.top})`)\n .style('clip-path', c.clippable ? `url(#${this._clipPathId})` : null)\n .style('-webkit-clip-path', c.clippable ? `url(#${this._clipPathId})` : null)\n\n c.render(customDuration)\n }\n\n this._renderAxes(this._firstRender ? 0 : customDuration)\n\n // Clip Rect\n // Extending the clipping path to allow small overflow (e.g. Line will looks better that way when it touches the edges)\n const clipPathExtension = config.clipPathExtend\n this._clipPath.select('rect')\n .attr('x', -clipPathExtension)\n .attr('y', -clipPathExtension)\n .attr('width', this.width + 2 * clipPathExtension)\n .attr('height', this.height + 2 * clipPathExtension)\n\n // Tooltip\n config.tooltip?.update() // Re-bind events\n\n // Crosshair\n const crosshair = config.crosshair\n if (crosshair) {\n // Pass accessors\n const yAccessors = this.components.filter(c => !c.stacked).map(c => c.config.y)\n const yStackedAccessors = this.components.filter(c => c.stacked).map(c => c.config.y)\n const baselineComponentConfig = this.components.find(c => (c.config as AreaConfigInterface<Datum>).baseline)?.config as AreaConfigInterface<Datum>\n const baselineAccessor = baselineComponentConfig?.baseline\n\n crosshair.accessors = {\n x: this.components[0]?.config.x,\n y: flatten(yAccessors),\n yStacked: flatten(yStackedAccessors),\n baseline: baselineAccessor,\n }\n\n crosshair.g.attr('transform', `translate(${margin.left},${margin.top})`)\n .style('clip-path', `url(#${this._clipPathId})`)\n .style('-webkit-clip-path', `url(#${this._clipPathId})`)\n crosshair.hide()\n }\n\n config.annotations?.g.attr('transform', `translate(${margin.left},${margin.top})`)\n config.annotations?.render()\n\n this._firstRender = false\n }\n\n private _updateScales<T extends XYComponentCore<Datum>> (...components: T[]): void {\n const c = clean(components || this.components)\n this._setScales(...c)\n this._updateScalesDomain(...c)\n this._updateScalesRange(...c)\n }\n\n private _setScales<T extends XYComponentCore<Datum>> (...components: T[]): void {\n const { config } = this\n if (!components) return\n\n // Set the X and Y scales\n if (config.xScale) components.forEach(c => c.setScale(ScaleDimension.X, config.xScale))\n if (config.yScale) components.forEach(c => c.setScale(ScaleDimension.Y, config.yScale))\n }\n\n private _updateScalesDomain<T extends XYComponentCore<Datum>> (...components: T[]): void {\n const { config } = this\n if (!components) return\n\n const componentsWithDomain = components.filter(c => !c.config.excludeFromDomainCalculation)\n\n // Loop over all the dimensions\n Object.values(ScaleDimension).forEach((dimension: ScaleDimension) => {\n const [min, max] = extent(\n mergeArrays(\n componentsWithDomain.map(c => c.getDataExtent(dimension, config.scaleByDomain))\n ) as number[]\n ) // Components with undefined dimension accessors will return [undefined, undefined] but d3.extent will take care of that\n\n const configuredDomain = dimension === ScaleDimension.Y ? config.yDomain : config.xDomain\n const configuredDomainMinConstraint = dimension === ScaleDimension.Y ? config.yDomainMinConstraint : config.xDomainMinConstraint\n const configuredDomainMaxConstraint = dimension === ScaleDimension.Y ? config.yDomainMaxConstraint : config.xDomainMaxConstraint\n const domainMin = configuredDomain?.[0] ?? min ?? 0\n const domainMax = configuredDomain?.[1] ?? max ?? 1\n const domain = [\n clamp(domainMin, configuredDomainMinConstraint?.[0] ?? Number.NEGATIVE_INFINITY, configuredDomainMinConstraint?.[1] ?? Number.POSITIVE_INFINITY),\n clamp(domainMax, configuredDomainMaxConstraint?.[0] ?? Number.NEGATIVE_INFINITY, configuredDomainMaxConstraint?.[1] ?? Number.POSITIVE_INFINITY),\n ]\n\n // Extend the X and Y domains if they're empty and `preventEmptyDomain` was explicitly set to `true`\n // or just the X domain if there is no data provided and `preventEmptyDomain` set to `null`\n if (domain[0] === domain[1]) {\n const hasDataProvided = componentsWithDomain.some(c => c.datamodel.data?.length > 0)\n if (config.preventEmptyDomain || (config.preventEmptyDomain === null && (!hasDataProvided || dimension === ScaleDimension.Y))) {\n domain[1] = domain[0] + 1\n }\n }\n\n components.forEach(c => c.setScaleDomain(dimension, domain))\n })\n }\n\n private _updateScalesRange<T extends XYComponentCore<Datum>> (...components: T[]): void {\n const { config } = this\n if (!components) return\n\n // Set initial scale range\n const isYDirectionSouth = config.yDirection === Direction.South\n const xRange: [number, number] = [config.padding.left ?? 0, this.width - (config.padding.right ?? 0)]\n const yRange: [number, number] = [this.height - (config.padding.bottom ?? 0), config.padding.top ?? 0]\n if (isYDirectionSouth) yRange.reverse()\n\n for (const c of components) {\n c.setSize(this.width, this.height, this.containerWidth, this.containerHeight)\n c.setScaleRange(ScaleDimension.X, config.xRange ?? xRange)\n c.setScaleRange(ScaleDimension.Y, config.yRange ?? yRange)\n }\n\n // Get and combine bleed\n const bleed = components.map(c => c.bleed).reduce((bleed, b) => {\n for (const key of Object.keys(bleed)) {\n const k = key as keyof Spacing\n if (bleed[k] < b[k]) bleed[k] = b[k]\n }\n return bleed\n }, { top: 0, bottom: 0, left: 0, right: 0 })\n\n // Update scale range\n for (const c of components) {\n c.setScaleRange(ScaleDimension.X, [xRange[0] + bleed.left, xRange[1] - bleed.right])\n c.setScaleRange(\n ScaleDimension.Y,\n isYDirectionSouth\n ? [yRange[0] + bleed.top, yRange[1] - bleed.bottom] // if Y axis is directed downwards\n : [yRange[0] - bleed.bottom, yRange[1] + bleed.top] // if Y axis is directed upwards\n )\n }\n }\n\n private _renderAxes (duration: number): void {\n const { config: { xAxis, yAxis } } = this\n const margin = this._getMargin()\n\n const axes = clean([xAxis, yAxis])\n axes.forEach(axis => {\n const offset = axis.getOffset(margin)\n axis.g.attr('transform', `translate(${offset.left},${offset.top})`)\n axis.render(duration)\n })\n }\n\n private _setAutoMargin (): void {\n const { config: { xAxis, yAxis } } = this\n\n // At first we need to set the domain to the scales\n const components = clean([...this.components, xAxis, yAxis])\n this._setScales(...components)\n this._updateScalesDomain(...components)\n\n // Calculate margin required by the axes\n // We do two iterations on the first render, because the amount and size of ticks can change\n // after new margin are calculated and applied (axes dimensions will change).\n // That's needed for correct label placement.\n const numIterations = this._firstRender ? 2 : 1\n for (let i = 0; i < numIterations; i += 1) {\n const axisMargin: Spacing = { top: 0, bottom: 0, left: 0, right: 0 }\n this._updateScalesRange(...components)\n const axes = clean([xAxis, yAxis])\n axes.forEach(axis => {\n axis.preRender()\n\n const m = axis.getRequiredMargin()\n if (axisMargin.top < m.top) axisMargin.top = m.top\n if (axisMargin.bottom < m.bottom) axisMargin.bottom = m.bottom\n if (axisMargin.left < m.left) axisMargin.left = m.left\n if (axisMargin.right < m.right) axisMargin.right = m.right\n })\n this._axisMargin = axisMargin\n }\n }\n\n private _getMargin (): Spacing {\n const { config: { margin } } = this\n\n return {\n top: margin.top + this._axisMargin.top,\n bottom: margin.bottom + this._axisMargin.bottom,\n left: margin.left + this._axisMargin.left,\n right: margin.right + this._axisMargin.right,\n }\n }\n\n public destroy (): void {\n const { components, config: { tooltip, crosshair, annotations, xAxis, yAxis } } = this\n super.destroy()\n\n for (const c of components) c?.destroy()\n tooltip?.destroy()\n crosshair?.destroy()\n annotations?.destroy()\n xAxis?.destroy()\n yAxis?.destroy()\n }\n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YACzC,KAAK,EAAE,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK;SAC7C,CAAA;KACF;IAEM,OAAO,GAAA;AACZ,QAAA,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,GAAG,IAAI,CAAA;QACtF,KAAK,CAAC,OAAO,EAAE,CAAA;QAEf,KAAK,MAAM,CAAC,IAAI,UAAU;AAAE,YAAA,CAAC,aAAD,CAAC,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAD,CAAC,CAAE,OAAO,EAAE,CAAA;AACxC,QAAA,OAAO,aAAP,OAAO,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAP,OAAO,CAAE,OAAO,EAAE,CAAA;AAClB,QAAA,SAAS,aAAT,SAAS,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAT,SAAS,CAAE,OAAO,EAAE,CAAA;AACpB,QAAA,WAAW,aAAX,WAAW,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAX,WAAW,CAAE,OAAO,EAAE,CAAA;AACtB,QAAA,KAAK,aAAL,KAAK,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAL,KAAK,CAAE,OAAO,EAAE,CAAA;AAChB,QAAA,KAAK,aAAL,KAAK,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAL,KAAK,CAAE,OAAO,EAAE,CAAA;KACjB;AACF;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/containers/xy-container/index.ts"],"sourcesContent":["import { css } from '@emotion/css'\nimport { extent, merge as mergeArrays } from 'd3-array'\nimport { Selection } from 'd3-selection'\n\n// Global CSS variables (side effects import)\nimport 'styles/index'\n\n// Core\nimport { ContainerCore } from 'core/container'\nimport { XYComponentCore } from 'core/xy-component'\nimport { XYComponentConfigInterface } from 'core/xy-component/config'\n\n// Data Model\nimport { CoreDataModel } from 'data-models/core'\n\n// Types\nimport { Spacing } from 'types/spacing'\nimport { AxisType } from 'components/axis/types'\nimport { ScaleDimension } from 'types/scale'\nimport { Direction } from 'types/direction'\n\n// Utils\nimport { clamp, clean, flatten, isEqual } from 'utils/data'\nimport { guid } from 'utils/misc'\n\n// Config\nimport { XYContainerDefaultConfig, XYContainerConfigInterface } from './config'\nimport {\n AreaConfigInterface,\n BrushConfigInterface,\n LineConfigInterface,\n ScatterConfigInterface,\n StackedBarConfigInterface,\n TimelineConfigInterface,\n} from '../../components'\n\nexport type XYConfigInterface<Datum> = XYComponentConfigInterface<Datum>\n| StackedBarConfigInterface<Datum>\n| LineConfigInterface<Datum>\n| ScatterConfigInterface<Datum>\n| BrushConfigInterface<Datum>\n| TimelineConfigInterface<Datum>\n| AreaConfigInterface<Datum>\n\nexport class XYContainer<Datum> extends ContainerCore {\n protected _defaultConfig = XYContainerDefaultConfig as XYContainerConfigInterface<Datum>\n protected _svgDefs: Selection<SVGDefsElement, unknown, null, undefined>\n public datamodel: CoreDataModel<Datum[]> = new CoreDataModel()\n public config: XYContainerConfigInterface<Datum> = this._defaultConfig\n private _clipPath: Selection<SVGClipPathElement, unknown, null, undefined>\n private _clipPathId = guid()\n private _axisMargin: Spacing = { top: 0, bottom: 0, left: 0, right: 0 }\n private _firstRender = true\n\n constructor (element: HTMLElement, config?: XYContainerConfigInterface<Datum>, data?: Datum[]) {\n super(element)\n\n this._clipPath = this.svg.append('clipPath')\n .attr('id', this._clipPathId)\n this._clipPath.append('rect')\n\n // When the base tag is specified on the HTML head,\n // Safari fails to find the corresponding filter URL.\n // We have to provide tull url in order to fix that\n const highlightFilterId = 'saturate'\n const baseUrl = window.location.href.replace(window.location.hash, '')\n this.svg.attr('class', css`\n --highlight-filter-id: url(${baseUrl}#${highlightFilterId}); // defining a css variable\n `)\n\n this._svgDefs.append('filter')\n .attr('id', highlightFilterId)\n .attr('filterUnits', 'objectBoundingBox')\n .html('<feColorMatrix type=\"saturate\" in=\"SourceGraphic\" values=\"1.35\"/>')\n\n if (config) {\n this.updateContainer(config, true)\n }\n\n if (data) {\n this.setData(data, true)\n }\n\n // Render if there are axes or components with data\n if (\n this.config.xAxis ||\n this.config.yAxis ||\n this.components?.some(c => c.datamodel.data)\n ) {\n this.render()\n }\n\n // Force re-render axes when fonts are loaded\n (document as any).fonts?.ready.then(() => {\n if (!this._firstRender) this._renderAxes(0)\n })\n }\n\n get components (): XYComponentCore<Datum>[] {\n return this.config.components\n }\n\n // Overriding ContainerCore default get width method to work with axis auto margin\n get width (): number {\n const margin = this._getMargin()\n return clamp(this.containerWidth - margin.left - margin.right, 0, Number.POSITIVE_INFINITY)\n }\n\n // Overriding ContainerCore default get height method to work with axis auto margin\n get height (): number {\n const margin = this._getMargin()\n\n return clamp(this.containerHeight - margin.top - margin.bottom, 0, Number.POSITIVE_INFINITY)\n }\n\n public setData (data: Datum[], preventRender?: boolean): void {\n const { components, config } = this\n const hasDataUpdated = !isEqual(this.datamodel.data, data)\n if (!hasDataUpdated || !data) return\n\n this.datamodel.data = data\n\n components.forEach((c) => {\n c.setData(data)\n })\n\n config.crosshair?.setData(data)\n config.xAxis?.setData(data)\n config.yAxis?.setData(data)\n config.tooltip?.hide()\n config.crosshair?.hide()\n if (!preventRender) this.render()\n }\n\n public updateContainer (containerConfig: XYContainerConfigInterface<Datum>, preventRender?: boolean): void {\n super.updateContainer(containerConfig)\n this._removeAllChildren()\n\n // If there were any new components added we need to pass them data\n this.setData(this.datamodel.data, true)\n\n // Set up the axes\n if (containerConfig.xAxis) {\n this.config.xAxis.config.type = AxisType.X\n this.element.appendChild(containerConfig.xAxis.element)\n }\n if (containerConfig.yAxis) {\n this.config.yAxis.config.type = AxisType.Y\n this.element.appendChild(containerConfig.yAxis.element)\n }\n\n // Re-insert elements to the DOM\n for (const c of this.components) {\n this.element.appendChild(c.element)\n }\n\n // Set up the tooltip\n const tooltip = containerConfig.tooltip\n if (tooltip) {\n if (!tooltip.hasContainer()) tooltip.setContainer(this._container)\n tooltip.setComponents(this.components)\n }\n\n // Set up the crosshair\n const crosshair = containerConfig.crosshair\n if (crosshair) {\n crosshair.setContainer(this.svg)\n crosshair.tooltip = tooltip\n\n this.element.appendChild(crosshair.element)\n }\n\n // Set up annotations\n const annotations = containerConfig.annotations\n if (annotations) {\n this.element.appendChild(annotations.element)\n }\n\n // Clipping path\n this.element.appendChild(this._clipPath.node())\n\n // Defs\n this.element.appendChild(this._svgDefs.node())\n this.element.appendChild(this._svgDefsExternal.node())\n\n // Rendering\n if (!preventRender) this.render()\n }\n\n public updateComponents (componentConfigs: XYConfigInterface<Datum>[], preventRender?: boolean): void {\n const { config } = this\n\n this.components.forEach((c, i) => {\n const componentConfig = componentConfigs[i]\n if (componentConfig) {\n c.setConfig(componentConfigs[i])\n }\n })\n\n this._updateScales(...this.components, config.xAxis, config.yAxis, config.crosshair)\n if (!preventRender) this.render()\n }\n\n public update (containerConfig: XYContainerConfigInterface<Datum>, componentConfigs?: XYComponentConfigInterface<Datum>[], data?: Datum[]): void {\n if (data) this.datamodel.data = data // Just updating the data model because the `updateContainer` method has the `setData` step inside\n if (containerConfig) this.updateContainer(containerConfig, true)\n if (componentConfigs) this.updateComponents(componentConfigs, true)\n this.render()\n }\n\n protected _preRender (): void {\n const { config } = this\n super._preRender()\n\n // Calculate extra margin required to fit the axes\n if (config.autoMargin) {\n this._setAutoMargin()\n }\n\n // Pass size and margin to the components\n const components = clean([...this.components, config.xAxis, config.yAxis, config.crosshair, config.annotations])\n const margin = this._getMargin()\n for (const c of components) {\n c.setSize(this.width, this.height, this.containerWidth, this.containerHeight)\n c.setContainerMargin(margin)\n }\n\n // Update Scales of all the components at once to calculate required paddings and sync them\n this._updateScales(...this.components, config.xAxis, config.yAxis, config.crosshair)\n }\n\n protected _render (customDuration?: number): void {\n const { config } = this\n super._render()\n\n // Get chart total margin after auto margin calculations\n const margin = this._getMargin()\n\n // Render components\n for (const c of this.components) {\n c.g.attr('transform', `translate(${margin.left},${margin.top})`)\n .style('clip-path', c.clippable ? `url(#${this._clipPathId})` : null)\n .style('-webkit-clip-path', c.clippable ? `url(#${this._clipPathId})` : null)\n\n c.render(customDuration)\n }\n\n this._renderAxes(this._firstRender ? 0 : customDuration)\n\n // Clip Rect\n // Extending the clipping path to allow small overflow (e.g. Line will looks better that way when it touches the edges)\n const clipPathExtension = config.clipPathExtend\n this._clipPath.select('rect')\n .attr('x', -clipPathExtension)\n .attr('y', -clipPathExtension)\n .attr('width', this.width + 2 * clipPathExtension)\n .attr('height', this.height + 2 * clipPathExtension)\n\n // Tooltip\n config.tooltip?.update() // Re-bind events\n\n // Crosshair\n const crosshair = config.crosshair\n if (crosshair) {\n // Pass accessors\n const yAccessors = this.components.filter(c => !c.stacked).map(c => c.config.y)\n const yStackedAccessors = this.components.filter(c => c.stacked).map(c => c.config.y)\n const baselineComponentConfig = this.components.find(c => (c.config as AreaConfigInterface<Datum>).baseline)?.config as AreaConfigInterface<Datum>\n const baselineAccessor = baselineComponentConfig?.baseline\n\n crosshair.accessors = {\n x: this.components[0]?.config.x,\n y: flatten(yAccessors),\n yStacked: flatten(yStackedAccessors),\n baseline: baselineAccessor,\n }\n\n crosshair.g.attr('transform', `translate(${margin.left},${margin.top})`)\n .style('clip-path', `url(#${this._clipPathId})`)\n .style('-webkit-clip-path', `url(#${this._clipPathId})`)\n crosshair.render()\n }\n\n config.annotations?.g.attr('transform', `translate(${margin.left},${margin.top})`)\n config.annotations?.render()\n\n this._firstRender = false\n }\n\n private _updateScales<T extends XYComponentCore<Datum>> (...components: T[]): void {\n const c = clean(components || this.components)\n this._setScales(...c)\n this._updateScalesDomain(...c)\n this._updateScalesRange(...c)\n }\n\n private _setScales<T extends XYComponentCore<Datum>> (...components: T[]): void {\n const { config } = this\n if (!components) return\n\n // Set the X and Y scales\n if (config.xScale) components.forEach(c => c.setScale(ScaleDimension.X, config.xScale))\n if (config.yScale) components.forEach(c => c.setScale(ScaleDimension.Y, config.yScale))\n }\n\n private _updateScalesDomain<T extends XYComponentCore<Datum>> (...components: T[]): void {\n const { config } = this\n if (!components) return\n\n const componentsWithDomain = components.filter(c => !c.config.excludeFromDomainCalculation)\n\n // Loop over all the dimensions\n Object.values(ScaleDimension).forEach((dimension: ScaleDimension) => {\n const [min, max] = extent(\n mergeArrays(\n componentsWithDomain.map(c => c.getDataExtent(dimension, config.scaleByDomain))\n ) as number[]\n ) // Components with undefined dimension accessors will return [undefined, undefined] but d3.extent will take care of that\n\n const configuredDomain = dimension === ScaleDimension.Y ? config.yDomain : config.xDomain\n const configuredDomainMinConstraint = dimension === ScaleDimension.Y ? config.yDomainMinConstraint : config.xDomainMinConstraint\n const configuredDomainMaxConstraint = dimension === ScaleDimension.Y ? config.yDomainMaxConstraint : config.xDomainMaxConstraint\n const domainMin = configuredDomain?.[0] ?? min ?? 0\n const domainMax = configuredDomain?.[1] ?? max ?? 1\n const domain = [\n clamp(domainMin, configuredDomainMinConstraint?.[0] ?? Number.NEGATIVE_INFINITY, configuredDomainMinConstraint?.[1] ?? Number.POSITIVE_INFINITY),\n clamp(domainMax, configuredDomainMaxConstraint?.[0] ?? Number.NEGATIVE_INFINITY, configuredDomainMaxConstraint?.[1] ?? Number.POSITIVE_INFINITY),\n ]\n\n // Extend the X and Y domains if they're empty and `preventEmptyDomain` was explicitly set to `true`\n // or just the X domain if there is no data provided and `preventEmptyDomain` set to `null`\n if (domain[0] === domain[1]) {\n const hasDataProvided = componentsWithDomain.some(c => c.datamodel.data?.length > 0)\n if (config.preventEmptyDomain || (config.preventEmptyDomain === null && (!hasDataProvided || dimension === ScaleDimension.Y))) {\n domain[1] = domain[0] + 1\n }\n }\n\n components.forEach(c => c.setScaleDomain(dimension, domain))\n })\n }\n\n private _updateScalesRange<T extends XYComponentCore<Datum>> (...components: T[]): void {\n const { config } = this\n if (!components) return\n\n // Set initial scale range\n const isYDirectionSouth = config.yDirection === Direction.South\n const xRange: [number, number] = [config.padding.left ?? 0, this.width - (config.padding.right ?? 0)]\n const yRange: [number, number] = [this.height - (config.padding.bottom ?? 0), config.padding.top ?? 0]\n if (isYDirectionSouth) yRange.reverse()\n\n for (const c of components) {\n c.setSize(this.width, this.height, this.containerWidth, this.containerHeight)\n c.setScaleRange(ScaleDimension.X, config.xRange ?? xRange)\n c.setScaleRange(ScaleDimension.Y, config.yRange ?? yRange)\n }\n\n // Get and combine bleed\n const bleed = components.map(c => c.bleed).reduce((bleed, b) => {\n for (const key of Object.keys(bleed)) {\n const k = key as keyof Spacing\n if (bleed[k] < b[k]) bleed[k] = b[k]\n }\n return bleed\n }, { top: 0, bottom: 0, left: 0, right: 0 })\n\n // Update scale range\n for (const c of components) {\n c.setScaleRange(ScaleDimension.X, [xRange[0] + bleed.left, xRange[1] - bleed.right])\n c.setScaleRange(\n ScaleDimension.Y,\n isYDirectionSouth\n ? [yRange[0] + bleed.top, yRange[1] - bleed.bottom] // if Y axis is directed downwards\n : [yRange[0] - bleed.bottom, yRange[1] + bleed.top] // if Y axis is directed upwards\n )\n }\n }\n\n private _renderAxes (duration: number): void {\n const { config: { xAxis, yAxis } } = this\n const margin = this._getMargin()\n\n const axes = clean([xAxis, yAxis])\n axes.forEach(axis => {\n const offset = axis.getOffset(margin)\n axis.g.attr('transform', `translate(${offset.left},${offset.top})`)\n axis.render(duration)\n })\n }\n\n private _setAutoMargin (): void {\n const { config: { xAxis, yAxis } } = this\n\n // At first we need to set the domain to the scales\n const components = clean([...this.components, xAxis, yAxis])\n this._setScales(...components)\n this._updateScalesDomain(...components)\n\n // Calculate margin required by the axes\n // We do two iterations on the first render, because the amount and size of ticks can change\n // after new margin are calculated and applied (axes dimensions will change).\n // That's needed for correct label placement.\n const numIterations = this._firstRender ? 2 : 1\n for (let i = 0; i < numIterations; i += 1) {\n const axisMargin: Spacing = { top: 0, bottom: 0, left: 0, right: 0 }\n this._updateScalesRange(...components)\n const axes = clean([xAxis, yAxis])\n axes.forEach(axis => {\n axis.preRender()\n\n const m = axis.getRequiredMargin()\n if (axisMargin.top < m.top) axisMargin.top = m.top\n if (axisMargin.bottom < m.bottom) axisMargin.bottom = m.bottom\n if (axisMargin.left < m.left) axisMargin.left = m.left\n if (axisMargin.right < m.right) axisMargin.right = m.right\n })\n this._axisMargin = axisMargin\n }\n }\n\n private _getMargin (): Spacing {\n const { config: { margin } } = this\n\n return {\n top: margin.top + this._axisMargin.top,\n bottom: margin.bottom + this._axisMargin.bottom,\n left: margin.left + this._axisMargin.left,\n right: margin.right + this._axisMargin.right,\n }\n }\n\n public destroy (): void {\n const { components, config: { tooltip, crosshair, annotations, xAxis, yAxis } } = this\n super.destroy()\n\n for (const c of components) c?.destroy()\n tooltip?.destroy()\n crosshair?.destroy()\n annotations?.destroy()\n xAxis?.destroy()\n yAxis?.destroy()\n }\n}\n"],"names":["mergeArrays"],"mappings":";;;;;;;;;;;;AA4CM,MAAO,WAAmB,SAAQ,aAAa,CAAA;AAUnD,IAAA,WAAA,CAAa,OAAoB,EAAE,MAA0C,EAAE,IAAc,EAAA;;QAC3F,KAAK,CAAC,OAAO,CAAC,CAAA;QAVN,IAAc,CAAA,cAAA,GAAG,wBAA6D,CAAA;AAEjF,QAAA,IAAA,CAAA,SAAS,GAA2B,IAAI,aAAa,EAAE,CAAA;AACvD,QAAA,IAAA,CAAA,MAAM,GAAsC,IAAI,CAAC,cAAc,CAAA;QAE9D,IAAW,CAAA,WAAA,GAAG,IAAI,EAAE,CAAA;AACpB,QAAA,IAAA,CAAA,WAAW,GAAY,EAAE,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAA;QAC/D,IAAY,CAAA,YAAA,GAAG,IAAI,CAAA;QAKzB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC;AACzC,aAAA,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,CAAA;AAC/B,QAAA,IAAI,CAAC,SA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AAO,CAAE,OAAO,EAAE,CAAA;AAClB,QAAA,SAAS,aAAT,SAAS,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAT,SAAS,CAAE,OAAO,EAAE,CAAA;AACpB,QAAA,WAAW,aAAX,WAAW,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAX,WAAW,CAAE,OAAO,EAAE,CAAA;AACtB,QAAA,KAAK,aAAL,KAAK,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAL,KAAK,CAAE,OAAO,EAAE,CAAA;AAChB,QAAA,KAAK,aAAL,KAAK,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAL,KAAK,CAAE,OAAO,EAAE,CAAA;KACjB;AACF;;;;"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unovis/ts",
|
|
3
3
|
"description": "Modular data visualization framework for React, Angular, Svelte, Vue, Solid, and vanilla TypeScript or JavaScript",
|
|
4
|
-
"version": "1.6.0-bigip.
|
|
4
|
+
"version": "1.6.0-bigip.5",
|
|
5
5
|
"packageManager": "npm@10.9.1",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|