@unovis/ts 1.6.0-beta.0 → 1.6.0-bigip.0

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 (95) hide show
  1. package/components/axis/config.d.ts +1 -1
  2. package/components/axis/config.js.map +1 -1
  3. package/components/axis/index.d.ts +0 -1
  4. package/components/axis/index.js +2 -10
  5. package/components/axis/index.js.map +1 -1
  6. package/components/brush/config.d.ts +1 -1
  7. package/components/brush/config.js.map +1 -1
  8. package/components/crosshair/config.d.ts +5 -0
  9. package/components/crosshair/config.js +1 -1
  10. package/components/crosshair/config.js.map +1 -1
  11. package/components/crosshair/index.d.ts +6 -1
  12. package/components/crosshair/index.js +182 -34
  13. package/components/crosshair/index.js.map +1 -1
  14. package/components/crosshair/sync-bus.d.ts +9 -0
  15. package/components/crosshair/sync-bus.js +27 -0
  16. package/components/crosshair/sync-bus.js.map +1 -0
  17. package/components/graph/config.d.ts +8 -0
  18. package/components/graph/config.js +1 -1
  19. package/components/graph/config.js.map +1 -1
  20. package/components/graph/index.d.ts +1 -0
  21. package/components/graph/index.js +14 -9
  22. package/components/graph/index.js.map +1 -1
  23. package/components/graph/modules/layout.js +33 -31
  24. package/components/graph/modules/layout.js.map +1 -1
  25. package/components/graph/modules/link/index.js +1 -1
  26. package/components/graph/modules/link/index.js.map +1 -1
  27. package/components/graph/types.d.ts +2 -1
  28. package/components/graph/types.js.map +1 -1
  29. package/components/plotband/config.d.ts +59 -0
  30. package/components/plotband/config.js +9 -0
  31. package/components/plotband/config.js.map +1 -0
  32. package/components/plotband/constants.d.ts +5 -0
  33. package/components/plotband/constants.js +413 -0
  34. package/components/plotband/constants.js.map +1 -0
  35. package/components/plotband/index.d.ts +15 -0
  36. package/components/plotband/index.js +92 -0
  37. package/components/plotband/index.js.map +1 -0
  38. package/components/plotband/style.d.ts +4 -0
  39. package/components/plotband/style.js +38 -0
  40. package/components/plotband/style.js.map +1 -0
  41. package/components/plotband/types.d.ts +51 -0
  42. package/components/plotband/types.js +27 -0
  43. package/components/plotband/types.js.map +1 -0
  44. package/components/scatter/index.d.ts +1 -0
  45. package/components/scatter/index.js +11 -1
  46. package/components/scatter/index.js.map +1 -1
  47. package/components/timeline/config.d.ts +65 -14
  48. package/components/timeline/config.js +15 -1
  49. package/components/timeline/config.js.map +1 -1
  50. package/components/timeline/constants.d.ts +3 -0
  51. package/components/timeline/constants.js +6 -0
  52. package/components/timeline/constants.js.map +1 -0
  53. package/components/timeline/index.d.ts +21 -10
  54. package/components/timeline/index.js +379 -93
  55. package/components/timeline/index.js.map +1 -1
  56. package/components/timeline/style.d.ts +7 -0
  57. package/components/timeline/style.js +40 -1
  58. package/components/timeline/style.js.map +1 -1
  59. package/components/timeline/types.d.ts +62 -0
  60. package/components/timeline/types.js +2 -0
  61. package/components/timeline/types.js.map +1 -0
  62. package/components/timeline/utils.d.ts +2 -0
  63. package/components/timeline/utils.js +16 -0
  64. package/components/timeline/utils.js.map +1 -0
  65. package/components/xy-labels/index.js +1 -1
  66. package/components/xy-labels/index.js.map +1 -1
  67. package/components.d.ts +4 -2
  68. package/components.js +1 -0
  69. package/components.js.map +1 -1
  70. package/containers/xy-container/config.d.ts +2 -0
  71. package/containers/xy-container/config.js +1 -1
  72. package/containers/xy-container/config.js.map +1 -1
  73. package/containers/xy-container/index.js +2 -2
  74. package/containers/xy-container/index.js.map +1 -1
  75. package/data-models/graph.js +7 -1
  76. package/data-models/graph.js.map +1 -1
  77. package/index.js +4 -2
  78. package/index.js.map +1 -1
  79. package/package.json +4 -3
  80. package/types/position.d.ts +2 -1
  81. package/types/position.js +1 -0
  82. package/types/position.js.map +1 -1
  83. package/types.d.ts +2 -0
  84. package/types.js +2 -0
  85. package/types.js.map +1 -1
  86. package/utils/data.d.ts +1 -1
  87. package/utils/data.js +2 -2
  88. package/utils/data.js.map +1 -1
  89. package/utils/index.js +2 -2
  90. package/utils/path.d.ts +8 -0
  91. package/utils/path.js +109 -1
  92. package/utils/path.js.map +1 -1
  93. package/utils/text.d.ts +2 -1
  94. package/utils/text.js +10 -2
  95. package/utils/text.js.map +1 -1
@@ -30,7 +30,7 @@ export interface AxisConfigInterface<Datum> extends Partial<XYComponentConfigInt
30
30
  * Default: `250` */
31
31
  minMaxTicksOnlyWhenWidthIsLess?: number;
32
32
  /** Tick label formatter function. Default: `undefined` */
33
- tickFormat?: ((tick: number, i: number, ticks: number[]) => string) | ((tick: Date, i: number, ticks: Date[]) => string);
33
+ tickFormat?: ((tick: number | Date, i: number, ticks: number[] | Date[]) => string);
34
34
  /** Explicitly set tick values. Default: `undefined` */
35
35
  tickValues?: number[];
36
36
  /** Set the approximate number of axis ticks (will be passed to D3's axis constructor). Default: `undefined` */
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sources":["../../../src/components/axis/config.ts"],"sourcesContent":["import { XYComponentConfigInterface, XYComponentDefaultConfig } from 'core/xy-component/config'\n\n// Types\nimport { AxisType } from 'components/axis/types'\nimport { Position } from 'types/position'\nimport { FitMode, TrimMode, TextAlign } from 'types/text'\n\n// We extend partial XY config interface because x and y properties are optional for Axis\nexport interface AxisConfigInterface<Datum> extends Partial<XYComponentConfigInterface<Datum>> {\n /** Axis position: `Position.Top`, `Position.Bottom`, `Position.Right` or `Position.Left`. Default: `undefined` */\n position?: Position | string;\n /** Axis type: `AxisType.X` or `AxisType.Y` */\n type?: AxisType | string;\n /** Extend the axis domain line to be full width or full height. Default: `true` */\n fullSize?: boolean;\n /** Axis label. Default: `undefined` */\n label?: string;\n /** Font size of the axis label as CSS string. Default: `null` */\n labelFontSize?: string | null;\n /** Distance between the axis and the label in pixels. Default: `8` */\n labelMargin?: number;\n /** Font color of the axis label as CSS string. Default: `null` */\n labelColor?: string | null;\n /** Sets whether to draw the grid lines or not. Default: `true` */\n gridLine?: boolean;\n /** Sets whether to draw the tick lines or not. Default: `true` */\n tickLine?: boolean;\n /** Sets whether to draw the domain line or not. Default: `true` */\n domainLine?: boolean;\n /** Draw only the min and max axis ticks. Default: `false` */\n minMaxTicksOnly?: boolean;\n /** Draw only the min and max axis ticks, when the chart\n * width is less than the specified value.\n * Default: `250` */\n minMaxTicksOnlyWhenWidthIsLess?: number;\n /** Tick label formatter function. Default: `undefined` */\n tickFormat?: ((tick: number, i: number, ticks: number[]) => string) | ((tick: Date, i: number, ticks: Date[]) => string);\n /** Explicitly set tick values. Default: `undefined` */\n tickValues?: number[];\n /** Set the approximate number of axis ticks (will be passed to D3's axis constructor). Default: `undefined` */\n numTicks?: number;\n /** Tick text fit mode: `FitMode.Wrap` or `FitMode.Trim`. Default: `FitMode.Wrap`. */\n tickTextFitMode?: FitMode | string;\n /** Maximum width in pixels for the tick text to be wrapped or trimmed. Default: `undefined` */\n tickTextWidth?: number;\n /** Tick text wrapping separator. String or array of strings. Default: `undefined` */\n tickTextSeparator?: string | string[];\n /** Force word break for ticks when they don't fit. Default: `false` */\n tickTextForceWordBreak?: boolean;\n /** Tick text trim mode: `TrimMode.Start`, `TrimMode.Middle` or `TrimMode.End`. Default: `TrimMode.Middle` */\n tickTextTrimType?: TrimMode | string;\n /** Font size of the tick text as CSS string. Default: `null` */\n tickTextFontSize?: string | null;\n /** Text alignment for ticks: `TextAlign.Left`, `TextAlign.Center` or `TextAlign.Right`. Default: `undefined` */\n tickTextAlign?: TextAlign | string;\n /** Font color of the tick text as CSS string. Default: `null` */\n tickTextColor?: string | null;\n /** Text rotation angle for ticks. Default: `undefined` */\n tickTextAngle?: number;\n /** Hide tick labels that overlap with each other.\n * To define overlapping, a simple bounding box collision detection algorithm is used.\n * Which means the result won't be accurate when `tickTextAngle` is specified.\n * Default: `undefined` */\n tickTextHideOverlapping?: boolean;\n /** The spacing in pixels between the tick and it's label. Default: `8` */\n tickPadding?: number;\n}\n\nexport const AxisDefaultConfig: AxisConfigInterface<unknown> = {\n ...XYComponentDefaultConfig,\n position: undefined,\n type: undefined,\n label: undefined,\n labelFontSize: null,\n gridLine: true,\n tickLine: true,\n domainLine: true,\n numTicks: undefined,\n minMaxTicksOnly: false,\n minMaxTicksOnlyWhenWidthIsLess: 250,\n tickTextWidth: undefined,\n tickTextSeparator: undefined,\n tickTextForceWordBreak: false,\n tickTextTrimType: TrimMode.Middle,\n tickTextFitMode: FitMode.Wrap,\n tickTextFontSize: null,\n tickTextAlign: undefined,\n tickTextColor: null,\n tickTextAngle: undefined,\n labelMargin: 8,\n labelColor: null,\n tickFormat: undefined,\n tickValues: undefined,\n fullSize: true,\n tickPadding: 8,\n tickTextHideOverlapping: undefined,\n}\n"],"names":[],"mappings":";;;AAoEa,MAAA,iBAAiB,GACzB,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAAA,wBAAwB,KAC3B,QAAQ,EAAE,SAAS,EACnB,IAAI,EAAE,SAAS,EACf,KAAK,EAAE,SAAS,EAChB,aAAa,EAAE,IAAI,EACnB,QAAQ,EAAE,IAAI,EACd,QAAQ,EAAE,IAAI,EACd,UAAU,EAAE,IAAI,EAChB,QAAQ,EAAE,SAAS,EACnB,eAAe,EAAE,KAAK,EACtB,8BAA8B,EAAE,GAAG,EACnC,aAAa,EAAE,SAAS,EACxB,iBAAiB,EAAE,SAAS,EAC5B,sBAAsB,EAAE,KAAK,EAC7B,gBAAgB,EAAE,QAAQ,CAAC,MAAM,EACjC,eAAe,EAAE,OAAO,CAAC,IAAI,EAC7B,gBAAgB,EAAE,IAAI,EACtB,aAAa,EAAE,SAAS,EACxB,aAAa,EAAE,IAAI,EACnB,aAAa,EAAE,SAAS,EACxB,WAAW,EAAE,CAAC,EACd,UAAU,EAAE,IAAI,EAChB,UAAU,EAAE,SAAS,EACrB,UAAU,EAAE,SAAS,EACrB,QAAQ,EAAE,IAAI,EACd,WAAW,EAAE,CAAC,EACd,uBAAuB,EAAE,SAAS,EAAA;;;;"}
1
+ {"version":3,"file":"config.js","sources":["../../../src/components/axis/config.ts"],"sourcesContent":["import { XYComponentConfigInterface, XYComponentDefaultConfig } from 'core/xy-component/config'\n\n// Types\nimport { AxisType } from 'components/axis/types'\nimport { Position } from 'types/position'\nimport { FitMode, TrimMode, TextAlign } from 'types/text'\n\n// We extend partial XY config interface because x and y properties are optional for Axis\nexport interface AxisConfigInterface<Datum> extends Partial<XYComponentConfigInterface<Datum>> {\n /** Axis position: `Position.Top`, `Position.Bottom`, `Position.Right` or `Position.Left`. Default: `undefined` */\n position?: Position | string;\n /** Axis type: `AxisType.X` or `AxisType.Y` */\n type?: AxisType | string;\n /** Extend the axis domain line to be full width or full height. Default: `true` */\n fullSize?: boolean;\n /** Axis label. Default: `undefined` */\n label?: string;\n /** Font size of the axis label as CSS string. Default: `null` */\n labelFontSize?: string | null;\n /** Distance between the axis and the label in pixels. Default: `8` */\n labelMargin?: number;\n /** Font color of the axis label as CSS string. Default: `null` */\n labelColor?: string | null;\n /** Sets whether to draw the grid lines or not. Default: `true` */\n gridLine?: boolean;\n /** Sets whether to draw the tick lines or not. Default: `true` */\n tickLine?: boolean;\n /** Sets whether to draw the domain line or not. Default: `true` */\n domainLine?: boolean;\n /** Draw only the min and max axis ticks. Default: `false` */\n minMaxTicksOnly?: boolean;\n /** Draw only the min and max axis ticks, when the chart\n * width is less than the specified value.\n * Default: `250` */\n minMaxTicksOnlyWhenWidthIsLess?: number;\n /** Tick label formatter function. Default: `undefined` */\n tickFormat?: ((tick: number | Date, i: number, ticks: number[] | Date[]) => string);\n /** Explicitly set tick values. Default: `undefined` */\n tickValues?: number[];\n /** Set the approximate number of axis ticks (will be passed to D3's axis constructor). Default: `undefined` */\n numTicks?: number;\n /** Tick text fit mode: `FitMode.Wrap` or `FitMode.Trim`. Default: `FitMode.Wrap`. */\n tickTextFitMode?: FitMode | string;\n /** Maximum width in pixels for the tick text to be wrapped or trimmed. Default: `undefined` */\n tickTextWidth?: number;\n /** Tick text wrapping separator. String or array of strings. Default: `undefined` */\n tickTextSeparator?: string | string[];\n /** Force word break for ticks when they don't fit. Default: `false` */\n tickTextForceWordBreak?: boolean;\n /** Tick text trim mode: `TrimMode.Start`, `TrimMode.Middle` or `TrimMode.End`. Default: `TrimMode.Middle` */\n tickTextTrimType?: TrimMode | string;\n /** Font size of the tick text as CSS string. Default: `null` */\n tickTextFontSize?: string | null;\n /** Text alignment for ticks: `TextAlign.Left`, `TextAlign.Center` or `TextAlign.Right`. Default: `undefined` */\n tickTextAlign?: TextAlign | string;\n /** Font color of the tick text as CSS string. Default: `null` */\n tickTextColor?: string | null;\n /** Text rotation angle for ticks. Default: `undefined` */\n tickTextAngle?: number;\n /** Hide tick labels that overlap with each other.\n * To define overlapping, a simple bounding box collision detection algorithm is used.\n * Which means the result won't be accurate when `tickTextAngle` is specified.\n * Default: `undefined` */\n tickTextHideOverlapping?: boolean;\n /** The spacing in pixels between the tick and it's label. Default: `8` */\n tickPadding?: number;\n}\n\nexport const AxisDefaultConfig: AxisConfigInterface<unknown> = {\n ...XYComponentDefaultConfig,\n position: undefined,\n type: undefined,\n label: undefined,\n labelFontSize: null,\n gridLine: true,\n tickLine: true,\n domainLine: true,\n numTicks: undefined,\n minMaxTicksOnly: false,\n minMaxTicksOnlyWhenWidthIsLess: 250,\n tickTextWidth: undefined,\n tickTextSeparator: undefined,\n tickTextForceWordBreak: false,\n tickTextTrimType: TrimMode.Middle,\n tickTextFitMode: FitMode.Wrap,\n tickTextFontSize: null,\n tickTextAlign: undefined,\n tickTextColor: null,\n tickTextAngle: undefined,\n labelMargin: 8,\n labelColor: null,\n tickFormat: undefined,\n tickValues: undefined,\n fullSize: true,\n tickPadding: 8,\n tickTextHideOverlapping: undefined,\n}\n"],"names":[],"mappings":";;;AAoEa,MAAA,iBAAiB,GACzB,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAAA,wBAAwB,KAC3B,QAAQ,EAAE,SAAS,EACnB,IAAI,EAAE,SAAS,EACf,KAAK,EAAE,SAAS,EAChB,aAAa,EAAE,IAAI,EACnB,QAAQ,EAAE,IAAI,EACd,QAAQ,EAAE,IAAI,EACd,UAAU,EAAE,IAAI,EAChB,QAAQ,EAAE,SAAS,EACnB,eAAe,EAAE,KAAK,EACtB,8BAA8B,EAAE,GAAG,EACnC,aAAa,EAAE,SAAS,EACxB,iBAAiB,EAAE,SAAS,EAC5B,sBAAsB,EAAE,KAAK,EAC7B,gBAAgB,EAAE,QAAQ,CAAC,MAAM,EACjC,eAAe,EAAE,OAAO,CAAC,IAAI,EAC7B,gBAAgB,EAAE,IAAI,EACtB,aAAa,EAAE,SAAS,EACxB,aAAa,EAAE,IAAI,EACnB,aAAa,EAAE,SAAS,EACxB,WAAW,EAAE,CAAC,EACd,UAAU,EAAE,IAAI,EAChB,UAAU,EAAE,SAAS,EACrB,UAAU,EAAE,SAAS,EACrB,QAAQ,EAAE,IAAI,EACd,WAAW,EAAE,CAAC,EACd,uBAAuB,EAAE,SAAS,EAAA;;;;"}
@@ -40,6 +40,5 @@ export declare class Axis<Datum> extends XYComponentCore<Datum, AxisConfigInterf
40
40
  private _renderAxisLabel;
41
41
  private _getLabelDY;
42
42
  private _alignTickLabels;
43
- private _getTickTextAnchor;
44
43
  private _getYTickTextTranslate;
45
44
  }
@@ -5,7 +5,7 @@ import { XYComponentCore } from '../../core/xy-component/index.js';
5
5
  import { Position } from '../../types/position.js';
6
6
  import { VerticalAlign, FitMode, TextAlign } from '../../types/text.js';
7
7
  import { smartTransition } from '../../utils/d3.js';
8
- import { trimSVGText, renderTextToSvgTextElement } from '../../utils/text.js';
8
+ import { trimSVGText, renderTextToSvgTextElement, textAlignToAnchor } from '../../utils/text.js';
9
9
  import { isEqual } from '../../utils/data.js';
10
10
  import { rectIntersect } from '../../utils/misc.js';
11
11
  import { AxisType } from './types.js';
@@ -338,7 +338,7 @@ class Axis extends XYComponentCore {
338
338
  _alignTickLabels() {
339
339
  const { config: { type, tickTextAlign, tickTextAngle, position } } = this;
340
340
  const tickText = this.g.selectAll('g.tick > text');
341
- const textAnchor = this._getTickTextAnchor(tickTextAlign);
341
+ const textAnchor = textAlignToAnchor(tickTextAlign);
342
342
  const translateX = type === AxisType.X
343
343
  ? 0
344
344
  : this._getYTickTextTranslate(tickTextAlign, position);
@@ -347,14 +347,6 @@ class Axis extends XYComponentCore {
347
347
  .attr('transform', translateValue)
348
348
  .attr('text-anchor', textAnchor);
349
349
  }
350
- _getTickTextAnchor(textAlign) {
351
- switch (textAlign) {
352
- case TextAlign.Left: return 'start';
353
- case TextAlign.Right: return 'end';
354
- case TextAlign.Center: return 'middle';
355
- default: return null;
356
- }
357
- }
358
350
  _getYTickTextTranslate(textAlign, axisPosition = Position.Left) {
359
351
  const defaultTickTextSpacingPx = 9; // Default in D3
360
352
  const width = this._axisRawBBox.width - defaultTickTextSpacingPx;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/axis/index.ts"],"sourcesContent":["import { select, Selection } from 'd3-selection'\nimport { interrupt } from 'd3-transition'\nimport { Axis as D3Axis, axisBottom, axisLeft, axisRight, axisTop } from 'd3-axis'\n\n// Core\nimport { XYComponentCore } from 'core/xy-component'\n\n// Types\nimport { Position } from 'types/position'\nimport { ContinuousScale } from 'types/scale'\nimport { Spacing } from 'types/spacing'\nimport { FitMode, TextAlign, TrimMode, UnovisText, UnovisTextOptions, VerticalAlign } from 'types/text'\n\n// Utils\nimport { smartTransition } from 'utils/d3'\nimport { renderTextToSvgTextElement, trimSVGText } from 'utils/text'\nimport { isEqual } from 'utils/data'\nimport { rectIntersect } from 'utils/misc'\n\n// Local Types\nimport { AxisType } from './types'\n\n// Config\nimport { AxisDefaultConfig, AxisConfigInterface } from './config'\n\n// Styles\nimport * as s from './style'\n\nexport class Axis<Datum> extends XYComponentCore<Datum, AxisConfigInterface<Datum>> {\n static selectors = s\n protected _defaultConfig: AxisConfigInterface<Datum> = AxisDefaultConfig\n public config: AxisConfigInterface<Datum> = this._defaultConfig\n private axisGroup: Selection<SVGGElement, unknown, SVGGElement, unknown>\n private gridGroup: Selection<SVGGElement, unknown, SVGGElement, unknown>\n\n private _axisRawBBox: DOMRect\n private _axisSizeBBox: SVGRect\n private _requiredMargin: Spacing\n private _defaultNumTicks = 3\n private _collideTickLabelsAnimFrameId: ReturnType<typeof requestAnimationFrame>\n\n protected events = {}\n\n constructor (config?: AxisConfigInterface<Datum>) {\n super()\n if (config) this.setConfig(config)\n this.axisGroup = this.g.append('g')\n this.gridGroup = this.g.append('g')\n .attr('class', s.grid)\n }\n\n /** Renders axis to an invisible grouped to calculate automatic chart margins */\n public preRender (): void {\n const { config } = this\n const axisRenderHelperGroup = this.g.append('g').attr('opacity', 0)\n\n this._renderAxis(axisRenderHelperGroup, 0)\n\n // Store axis raw BBox (without the label) for further label positioning (see _renderAxisLabel)\n this._axisRawBBox = axisRenderHelperGroup.node().getBBox()\n\n // Align tick text\n if (config.tickTextAlign) this._alignTickLabels()\n\n // Render label and store total axis size and required margins\n this._renderAxisLabel(axisRenderHelperGroup)\n this._axisSizeBBox = this._getAxisSize(axisRenderHelperGroup)\n this._requiredMargin = this._getRequiredMargin(this._axisSizeBBox)\n\n axisRenderHelperGroup.remove()\n }\n\n public getPosition (): Position {\n const { config: { type, position } } = this\n return (position ?? ((type === AxisType.X) ? Position.Bottom : Position.Left)) as Position\n }\n\n private _getAxisSize (selection: Selection<SVGGElement, unknown, SVGGElement, undefined>): SVGRect {\n const bBox = selection.node().getBBox()\n return bBox\n }\n\n private _getRequiredMargin (axisSize = this._axisSizeBBox): Spacing {\n const { config: { type, position } } = this\n\n switch (type) {\n case AxisType.X: {\n const tolerancePx = 1\n const xEnd = this._axisSizeBBox.x + this._axisSizeBBox.width\n\n const left = this._axisSizeBBox.x < 0 ? Math.abs(this._axisSizeBBox.x) : 0\n const right = (xEnd - this._width) > tolerancePx ? xEnd - this._width : 0\n\n switch (position) {\n case Position.Top: return { top: axisSize.height, left, right }\n case Position.Bottom: default: return { bottom: axisSize.height, left, right }\n }\n }\n case AxisType.Y: {\n const bleedY = axisSize.height > this._height ? (axisSize.height - this._height) / 2 : 0\n const top = bleedY\n const bottom = bleedY\n\n switch (position) {\n case Position.Right: return { right: axisSize.width, top, bottom }\n case Position.Left: default: return { left: axisSize.width, top, bottom }\n }\n }\n }\n }\n\n getRequiredMargin (): Spacing {\n return this._requiredMargin\n }\n\n /** Calculates axis transform:translate offset based on passed container margins */\n getOffset (containerMargin: Spacing): {left: number; top: number} {\n const { config: { type, position } } = this\n\n switch (type) {\n case AxisType.X:\n switch (position) {\n case Position.Top: return { top: containerMargin.top, left: containerMargin.left }\n case Position.Bottom: default: return { top: containerMargin.top + this._height, left: containerMargin.left }\n }\n case AxisType.Y:\n switch (position) {\n case Position.Right: return { top: containerMargin.top, left: containerMargin.left + this._width }\n case Position.Left: default: return { top: containerMargin.top, left: containerMargin.left }\n }\n }\n }\n\n public _render (duration = this.config.duration, selection = this.axisGroup): void {\n const { config } = this\n\n this._renderAxis(selection, duration)\n this._renderAxisLabel(selection)\n\n if (config.gridLine) {\n const gridGen = this._buildGrid().tickFormat(() => '')\n gridGen.tickValues(this._getConfiguredTickValues())\n // Interrupting all active transitions first to prevent them from being stuck.\n // Somehow we see it happening in Angular apps.\n this.gridGroup.selectAll('*').interrupt()\n smartTransition(this.gridGroup, duration).call(gridGen).style('opacity', 1)\n } else {\n smartTransition(this.gridGroup, duration).style('opacity', 0)\n }\n\n if (config.tickTextAlign) this._alignTickLabels()\n\n this._resolveTickLabelOverlap(selection)\n }\n\n private _buildAxis (): D3Axis<any> {\n const { config: { type, position, tickPadding } } = this\n\n const ticks = this._getNumTicks()\n switch (type) {\n case AxisType.X:\n switch (position) {\n case Position.Top: return axisTop(this.xScale).ticks(ticks).tickPadding(tickPadding)\n case Position.Bottom: default: return axisBottom(this.xScale).ticks(ticks).tickPadding(tickPadding)\n }\n case AxisType.Y:\n switch (position) {\n case Position.Right: return axisRight(this.yScale).ticks(ticks).tickPadding(tickPadding)\n case Position.Left: default: return axisLeft(this.yScale).ticks(ticks).tickPadding(tickPadding)\n }\n }\n }\n\n private _buildGrid (): D3Axis<any> {\n const { config: { type, position } } = this\n\n const ticks = this._getNumTicks()\n switch (type) {\n case AxisType.X:\n switch (position) {\n case Position.Top: return axisTop(this.xScale).ticks(ticks * 2).tickSize(-this._height).tickSizeOuter(0)\n case Position.Bottom: default: return axisBottom(this.xScale).ticks(ticks * 2).tickSize(-this._height).tickSizeOuter(0)\n }\n case AxisType.Y:\n switch (position) {\n case Position.Right: return axisRight(this.yScale).ticks(ticks * 2).tickSize(-this._width).tickSizeOuter(0)\n case Position.Left: default: return axisLeft(this.yScale).ticks(ticks * 2).tickSize(-this._width).tickSizeOuter(0)\n }\n }\n }\n\n private _renderAxis (selection = this.axisGroup, duration = this.config.duration): void {\n const { config } = this\n\n const axisGen = this._buildAxis()\n const tickValues: (number[] | Date[]) = this._getConfiguredTickValues() || axisGen.scale<ContinuousScale>().ticks(this._getNumTicks())\n axisGen.tickValues(tickValues)\n\n // Interrupting all active transitions first to prevent them from being stuck.\n // Somehow we see it happening in Angular apps.\n selection.selectAll('*').interrupt()\n smartTransition(selection, duration).call(axisGen)\n\n const ticks = selection.selectAll<SVGGElement, number | Date>('g.tick')\n\n ticks\n .classed(s.tick, true)\n .style('font-size', config.tickTextFontSize)\n\n // Selecting the <text> elements of the ticks to apply formatting. By default, this selection\n // will include exiting elements, so we're filtering them out.\n const tickText = selection.selectAll<SVGTextElement, number | Date>('g.tick > text')\n .filter(tickValue => tickValues.some((t: number | Date) => isEqual(tickValue, t))) // We use isEqual to compare Dates\n .classed(s.tickLabel, true)\n .classed(s.tickLabelHideable, Boolean(config.tickTextHideOverlapping))\n .style('fill', config.tickTextColor) as Selection<SVGTextElement, number, SVGGElement, unknown> | Selection<SVGTextElement, Date, SVGGElement, unknown>\n\n\n // We interrupt the transition on tick's <text> to make it 'wrappable'\n tickText.nodes().forEach(node => interrupt(node))\n\n tickText.each((value: number | Date, i: number, elements: ArrayLike<SVGTextElement>) => {\n let text = config.tickFormat?.(value as (number & Date), i, tickValues as (number & Date)[]) ?? `${value}`\n const textElement = elements[i] as SVGTextElement\n const textMaxWidth = config.tickTextWidth || (config.type === AxisType.X ? this._containerWidth / (ticks.size() + 1) : this._containerWidth / 5)\n const styleDeclaration = getComputedStyle(textElement)\n const fontSize = Number.parseFloat(styleDeclaration.fontSize)\n const fontFamily = styleDeclaration.fontFamily\n const textOptions: UnovisTextOptions = {\n verticalAlign: config.type === AxisType.X ? VerticalAlign.Top : VerticalAlign.Middle,\n width: textMaxWidth,\n textRotationAngle: config.tickTextAngle,\n separator: config.tickTextSeparator,\n wordBreak: config.tickTextForceWordBreak,\n }\n\n if (config.tickTextFitMode === FitMode.Trim) {\n const textElementSelection = select<SVGTextElement, string>(textElement).text(text)\n trimSVGText(textElementSelection, textMaxWidth, config.tickTextTrimType as TrimMode, true, fontSize, 0.58)\n text = select<SVGTextElement, string>(textElement).text()\n }\n\n const textBlock: UnovisText = { text, fontFamily, fontSize }\n renderTextToSvgTextElement(textElement, textBlock, textOptions)\n })\n\n selection\n .classed(s.axis, true)\n .classed(s.hideTickLine, !config.tickLine)\n .classed(s.hideDomain, !config.domainLine)\n\n if (config.fullSize) {\n const path = this._getFullDomainPath(0)\n smartTransition(selection.select('.domain'), duration).attr('d', path)\n }\n }\n\n private _resolveTickLabelOverlap (selection = this.axisGroup): void {\n const { config } = this\n const tickTextSelection = selection.selectAll<SVGTextElement, number | Date>('g.tick > text')\n\n if (!config.tickTextHideOverlapping) {\n tickTextSelection.style('opacity', null)\n return\n }\n\n cancelAnimationFrame(this._collideTickLabelsAnimFrameId)\n // Colliding labels in the next frame to prevent forced reflow\n this._collideTickLabelsAnimFrameId = requestAnimationFrame(() => {\n this._collideTickLabels(tickTextSelection)\n })\n }\n\n private _collideTickLabels (selection: Selection<SVGTextElement, number | Date, SVGGElement, unknown>): void {\n type SVGOverlappingTextElement = SVGTextElement & {\n _visible: boolean;\n }\n\n // Reset visibility of all labels\n selection.each((d, i, elements) => {\n const node = elements[i] as SVGOverlappingTextElement\n node._visible = true\n })\n\n // We do three iterations because not all overlapping labels can be resolved in the first iteration\n const numIterations = 3\n for (let i = 0; i < numIterations; i += 1) {\n // Run collision detection and set labels visibility\n selection.each((d, i, elements) => {\n const label1 = elements[i] as SVGOverlappingTextElement\n const isLabel1Visible = label1._visible\n if (!isLabel1Visible) return\n\n // Calculate bounding rect of point's label\n const label1BoundingRect = label1.getBoundingClientRect()\n\n for (let j = i + 1; j < elements.length; j += 1) {\n if (i === j) continue\n const label2 = elements[j] as SVGOverlappingTextElement\n const isLabel2Visible = label2._visible\n if (isLabel2Visible) {\n const label2BoundingRect = label2.getBoundingClientRect()\n const intersect = rectIntersect(label1BoundingRect, label2BoundingRect, -5)\n if (intersect) {\n label2._visible = false\n break\n }\n }\n }\n })\n }\n\n // Hide the overlapping labels\n selection.each((d, i, elements) => {\n const label = elements[i] as SVGOverlappingTextElement\n select(label).style('opacity', label._visible ? 1 : 0)\n })\n }\n\n private _getNumTicks (): number {\n const { config: { type, numTicks } } = this\n\n if (numTicks) return numTicks\n\n if (type === AxisType.X) {\n const xRange = this.xScale.range() as [number, number]\n const width = xRange[1] - xRange[0]\n return Math.floor(width / 175)\n }\n\n if (type === AxisType.Y) {\n const yRange = this.yScale.range() as [number, number]\n const height = Math.abs(yRange[0] - yRange[1])\n return Math.pow(height, 0.85) / 25\n }\n\n return this._defaultNumTicks\n }\n\n private _getConfiguredTickValues (): number[] | null {\n const { config } = this\n const scale = config.type === AxisType.X ? this.xScale : this.yScale\n const scaleDomain = scale?.domain() as [number, number]\n\n if (config.tickValues) {\n return config.tickValues.filter(v => (v >= scaleDomain[0]) && (v <= scaleDomain[1]))\n }\n\n if (config.minMaxTicksOnly || (config.type === AxisType.X && this._width < config.minMaxTicksOnlyWhenWidthIsLess)) {\n return scaleDomain as number[]\n }\n\n return null\n }\n\n private _getFullDomainPath (tickSize = 0): string {\n const { config: { type } } = this\n switch (type) {\n case AxisType.X: return `M0.5, ${tickSize} V0.5 H${this._width + 0.5} V${tickSize}`\n case AxisType.Y: return `M${-tickSize}, ${this._height + 0.5} H0.5 V0.5 H${-tickSize}`\n }\n }\n\n private _renderAxisLabel (selection = this.axisGroup): void {\n const { type, label, labelMargin, labelFontSize } = this.config\n\n // Remove the old label first to calculate the axis size properly\n selection.selectAll(`.${s.label}`).remove()\n\n // Calculate label position and rotation\n const axisPosition = this.getPosition()\n // We always use this.axisRenderHelperGroup to calculate the size of the axis because\n // this.axisGroup will give us incorrect values due to animation\n const { width: axisWidth, height: axisHeight } = this._axisRawBBox ?? selection.node().getBBox()\n\n const offsetX = type === AxisType.X ? this._width / 2 : (-1) ** (+(axisPosition === Position.Left)) * axisWidth\n const offsetY = type === AxisType.X ? (-1) ** (+(axisPosition === Position.Top)) * axisHeight : this._height / 2\n\n const marginX = type === AxisType.X ? 0 : (-1) ** (+(axisPosition === Position.Left)) * labelMargin\n const marginY = type === AxisType.X ? (-1) ** (+(axisPosition === Position.Top)) * labelMargin : 0\n\n const rotation = type === AxisType.Y ? -90 : 0\n // Append new label\n selection\n .append('text')\n .attr('class', s.label)\n .text(label)\n .attr('dy', `${this._getLabelDY()}em`)\n .attr('transform', `translate(${offsetX + marginX},${offsetY + marginY}) rotate(${rotation})`)\n .style('font-size', labelFontSize)\n .style('fill', this.config.labelColor)\n }\n\n private _getLabelDY (): number {\n const { type, position } = this.config\n switch (type) {\n case AxisType.X:\n switch (position) {\n case Position.Top: return 0\n case Position.Bottom: default: return 0.75\n }\n case AxisType.Y:\n switch (position) {\n case Position.Right: return 0.75\n case Position.Left: default: return -0.25\n }\n }\n }\n\n private _alignTickLabels (): void {\n const { config: { type, tickTextAlign, tickTextAngle, position } } = this\n const tickText = this.g.selectAll('g.tick > text')\n\n const textAnchor = this._getTickTextAnchor(tickTextAlign as TextAlign)\n const translateX = type === AxisType.X\n ? 0\n : this._getYTickTextTranslate(tickTextAlign as TextAlign, position as Position)\n\n const translateValue = tickTextAngle ? `translate(${translateX},0) rotate(${tickTextAngle})` : `translate(${translateX},0)`\n tickText\n .attr('transform', translateValue)\n .attr('text-anchor', textAnchor)\n }\n\n private _getTickTextAnchor (textAlign: TextAlign): string {\n switch (textAlign) {\n case TextAlign.Left: return 'start'\n case TextAlign.Right: return 'end'\n case TextAlign.Center: return 'middle'\n default: return null\n }\n }\n\n private _getYTickTextTranslate (textAlign: TextAlign, axisPosition: Position = Position.Left): number {\n const defaultTickTextSpacingPx = 9 // Default in D3\n const width = this._axisRawBBox.width - defaultTickTextSpacingPx\n\n switch (textAlign) {\n case TextAlign.Left: return axisPosition === Position.Left ? width * -1 : 0\n case TextAlign.Right: return axisPosition === Position.Left ? 0 : width\n case TextAlign.Center: return axisPosition === Position.Left ? width * (-0.5) : width * 0.5\n default: return 0\n }\n }\n}\n"],"names":["s.grid","s.tick","s.tickLabel","s.tickLabelHideable","s.axis","s.hideTickLine","s.hideDomain","label","s.label","s"],"mappings":";;;;;;;;;;;;;;;AA4BM,MAAO,IAAY,SAAQ,eAAkD,CAAA;AAejF,IAAA,WAAA,CAAa,MAAmC,EAAA;AAC9C,QAAA,KAAK,EAAE,CAAA;QAdC,IAAc,CAAA,cAAA,GAA+B,iBAAiB,CAAA;AACjE,QAAA,IAAA,CAAA,MAAM,GAA+B,IAAI,CAAC,cAAc,CAAA;QAOvD,IAAgB,CAAA,gBAAA,GAAG,CAAC,CAAA;QAGlB,IAAM,CAAA,MAAA,GAAG,EAAE,CAAA;AAInB,QAAA,IAAI,MAAM;AAAE,YAAA,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAA;QAClC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;QACnC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;AAChC,aAAA,IAAI,CAAC,OAAO,EAAEA,IAAM,CAAC,CAAA;KACzB;;IAGM,SAAS,GAAA;AACd,QAAA,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAA;AACvB,QAAA,MAAM,qBAAqB,GAAG,IAAI,CAA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AW,EAAE,cAAc,CAAC;AACjC,aAAA,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,CAAA;KACnC;AAEO,IAAA,kBAAkB,CAAE,SAAoB,EAAA;AAC9C,QAAA,QAAQ,SAAS;AACf,YAAA,KAAK,SAAS,CAAC,IAAI,EAAE,OAAO,OAAO,CAAA;AACnC,YAAA,KAAK,SAAS,CAAC,KAAK,EAAE,OAAO,KAAK,CAAA;AAClC,YAAA,KAAK,SAAS,CAAC,MAAM,EAAE,OAAO,QAAQ,CAAA;AACtC,YAAA,SAAS,OAAO,IAAI,CAAA;AACrB,SAAA;KACF;AAEO,IAAA,sBAAsB,CAAE,SAAoB,EAAE,YAAyB,GAAA,QAAQ,CAAC,IAAI,EAAA;AAC1F,QAAA,MAAM,wBAAwB,GAAG,CAAC,CAAA;QAClC,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC,KAAK,GAAG,wBAAwB,CAAA;AAEhE,QAAA,QAAQ,SAAS;YACf,KAAK,SAAS,CAAC,IAAI,EAAE,OAAO,YAAY,KAAK,QAAQ,CAAC,IAAI,GAAG,KAAK,GAAG,CAAC,CAAC,GAAG,CAAC,CAAA;AAC3E,YAAA,KAAK,SAAS,CAAC,KAAK,EAAE,OAAO,YAAY,KAAK,QAAQ,CAAC,IAAI,GAAG,CAAC,GAAG,KAAK,CAAA;YACvE,KAAK,SAAS,CAAC,MAAM,EAAE,OAAO,YAAY,KAAK,QAAQ,CAAC,IAAI,GAAG,KAAK,IAAI,CAAC,GAAG,CAAC,GAAG,KAAK,GAAG,GAAG,CAAA;AAC3F,YAAA,SAAS,OAAO,CAAC,CAAA;AAClB,SAAA;KACF;;AA9ZM,IAAS,CAAA,SAAA,GAAGE,KAAC;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/axis/index.ts"],"sourcesContent":["import { select, Selection } from 'd3-selection'\nimport { interrupt } from 'd3-transition'\nimport { Axis as D3Axis, axisBottom, axisLeft, axisRight, axisTop } from 'd3-axis'\n\n// Core\nimport { XYComponentCore } from 'core/xy-component'\n\n// Types\nimport { Position } from 'types/position'\nimport { ContinuousScale } from 'types/scale'\nimport { Spacing } from 'types/spacing'\nimport { FitMode, TextAlign, TrimMode, UnovisText, UnovisTextOptions, VerticalAlign } from 'types/text'\n\n// Utils\nimport { smartTransition } from 'utils/d3'\nimport { renderTextToSvgTextElement, textAlignToAnchor, trimSVGText } from 'utils/text'\nimport { isEqual } from 'utils/data'\nimport { rectIntersect } from 'utils/misc'\n\n// Local Types\nimport { AxisType } from './types'\n\n// Config\nimport { AxisDefaultConfig, AxisConfigInterface } from './config'\n\n// Styles\nimport * as s from './style'\n\nexport class Axis<Datum> extends XYComponentCore<Datum, AxisConfigInterface<Datum>> {\n static selectors = s\n protected _defaultConfig: AxisConfigInterface<Datum> = AxisDefaultConfig\n public config: AxisConfigInterface<Datum> = this._defaultConfig\n private axisGroup: Selection<SVGGElement, unknown, SVGGElement, unknown>\n private gridGroup: Selection<SVGGElement, unknown, SVGGElement, unknown>\n\n private _axisRawBBox: DOMRect\n private _axisSizeBBox: SVGRect\n private _requiredMargin: Spacing\n private _defaultNumTicks = 3\n private _collideTickLabelsAnimFrameId: ReturnType<typeof requestAnimationFrame>\n\n protected events = {}\n\n constructor (config?: AxisConfigInterface<Datum>) {\n super()\n if (config) this.setConfig(config)\n this.axisGroup = this.g.append('g')\n this.gridGroup = this.g.append('g')\n .attr('class', s.grid)\n }\n\n /** Renders axis to an invisible grouped to calculate automatic chart margins */\n public preRender (): void {\n const { config } = this\n const axisRenderHelperGroup = this.g.append('g').attr('opacity', 0)\n\n this._renderAxis(axisRenderHelperGroup, 0)\n\n // Store axis raw BBox (without the label) for further label positioning (see _renderAxisLabel)\n this._axisRawBBox = axisRenderHelperGroup.node().getBBox()\n\n // Align tick text\n if (config.tickTextAlign) this._alignTickLabels()\n\n // Render label and store total axis size and required margins\n this._renderAxisLabel(axisRenderHelperGroup)\n this._axisSizeBBox = this._getAxisSize(axisRenderHelperGroup)\n this._requiredMargin = this._getRequiredMargin(this._axisSizeBBox)\n\n axisRenderHelperGroup.remove()\n }\n\n public getPosition (): Position {\n const { config: { type, position } } = this\n return (position ?? ((type === AxisType.X) ? Position.Bottom : Position.Left)) as Position\n }\n\n private _getAxisSize (selection: Selection<SVGGElement, unknown, SVGGElement, undefined>): SVGRect {\n const bBox = selection.node().getBBox()\n return bBox\n }\n\n private _getRequiredMargin (axisSize = this._axisSizeBBox): Spacing {\n const { config: { type, position } } = this\n\n switch (type) {\n case AxisType.X: {\n const tolerancePx = 1\n const xEnd = this._axisSizeBBox.x + this._axisSizeBBox.width\n\n const left = this._axisSizeBBox.x < 0 ? Math.abs(this._axisSizeBBox.x) : 0\n const right = (xEnd - this._width) > tolerancePx ? xEnd - this._width : 0\n\n switch (position) {\n case Position.Top: return { top: axisSize.height, left, right }\n case Position.Bottom: default: return { bottom: axisSize.height, left, right }\n }\n }\n case AxisType.Y: {\n const bleedY = axisSize.height > this._height ? (axisSize.height - this._height) / 2 : 0\n const top = bleedY\n const bottom = bleedY\n\n switch (position) {\n case Position.Right: return { right: axisSize.width, top, bottom }\n case Position.Left: default: return { left: axisSize.width, top, bottom }\n }\n }\n }\n }\n\n getRequiredMargin (): Spacing {\n return this._requiredMargin\n }\n\n /** Calculates axis transform:translate offset based on passed container margins */\n getOffset (containerMargin: Spacing): {left: number; top: number} {\n const { config: { type, position } } = this\n\n switch (type) {\n case AxisType.X:\n switch (position) {\n case Position.Top: return { top: containerMargin.top, left: containerMargin.left }\n case Position.Bottom: default: return { top: containerMargin.top + this._height, left: containerMargin.left }\n }\n case AxisType.Y:\n switch (position) {\n case Position.Right: return { top: containerMargin.top, left: containerMargin.left + this._width }\n case Position.Left: default: return { top: containerMargin.top, left: containerMargin.left }\n }\n }\n }\n\n public _render (duration = this.config.duration, selection = this.axisGroup): void {\n const { config } = this\n\n this._renderAxis(selection, duration)\n this._renderAxisLabel(selection)\n\n if (config.gridLine) {\n const gridGen = this._buildGrid().tickFormat(() => '')\n gridGen.tickValues(this._getConfiguredTickValues())\n // Interrupting all active transitions first to prevent them from being stuck.\n // Somehow we see it happening in Angular apps.\n this.gridGroup.selectAll('*').interrupt()\n smartTransition(this.gridGroup, duration).call(gridGen).style('opacity', 1)\n } else {\n smartTransition(this.gridGroup, duration).style('opacity', 0)\n }\n\n if (config.tickTextAlign) this._alignTickLabels()\n\n this._resolveTickLabelOverlap(selection)\n }\n\n private _buildAxis (): D3Axis<any> {\n const { config: { type, position, tickPadding } } = this\n\n const ticks = this._getNumTicks()\n switch (type) {\n case AxisType.X:\n switch (position) {\n case Position.Top: return axisTop(this.xScale).ticks(ticks).tickPadding(tickPadding)\n case Position.Bottom: default: return axisBottom(this.xScale).ticks(ticks).tickPadding(tickPadding)\n }\n case AxisType.Y:\n switch (position) {\n case Position.Right: return axisRight(this.yScale).ticks(ticks).tickPadding(tickPadding)\n case Position.Left: default: return axisLeft(this.yScale).ticks(ticks).tickPadding(tickPadding)\n }\n }\n }\n\n private _buildGrid (): D3Axis<any> {\n const { config: { type, position } } = this\n\n const ticks = this._getNumTicks()\n switch (type) {\n case AxisType.X:\n switch (position) {\n case Position.Top: return axisTop(this.xScale).ticks(ticks * 2).tickSize(-this._height).tickSizeOuter(0)\n case Position.Bottom: default: return axisBottom(this.xScale).ticks(ticks * 2).tickSize(-this._height).tickSizeOuter(0)\n }\n case AxisType.Y:\n switch (position) {\n case Position.Right: return axisRight(this.yScale).ticks(ticks * 2).tickSize(-this._width).tickSizeOuter(0)\n case Position.Left: default: return axisLeft(this.yScale).ticks(ticks * 2).tickSize(-this._width).tickSizeOuter(0)\n }\n }\n }\n\n private _renderAxis (selection = this.axisGroup, duration = this.config.duration): void {\n const { config } = this\n\n const axisGen = this._buildAxis()\n const tickValues: (number[] | Date[]) = this._getConfiguredTickValues() || axisGen.scale<ContinuousScale>().ticks(this._getNumTicks())\n axisGen.tickValues(tickValues)\n\n // Interrupting all active transitions first to prevent them from being stuck.\n // Somehow we see it happening in Angular apps.\n selection.selectAll('*').interrupt()\n smartTransition(selection, duration).call(axisGen)\n\n const ticks = selection.selectAll<SVGGElement, number | Date>('g.tick')\n\n ticks\n .classed(s.tick, true)\n .style('font-size', config.tickTextFontSize)\n\n // Selecting the <text> elements of the ticks to apply formatting. By default, this selection\n // will include exiting elements, so we're filtering them out.\n const tickText = selection.selectAll<SVGTextElement, number | Date>('g.tick > text')\n .filter(tickValue => tickValues.some((t: number | Date) => isEqual(tickValue, t))) // We use isEqual to compare Dates\n .classed(s.tickLabel, true)\n .classed(s.tickLabelHideable, Boolean(config.tickTextHideOverlapping))\n .style('fill', config.tickTextColor) as Selection<SVGTextElement, number, SVGGElement, unknown> | Selection<SVGTextElement, Date, SVGGElement, unknown>\n\n\n // We interrupt the transition on tick's <text> to make it 'wrappable'\n tickText.nodes().forEach(node => interrupt(node))\n\n tickText.each((value: number | Date, i: number, elements: ArrayLike<SVGTextElement>) => {\n let text = config.tickFormat?.(value, i, tickValues) ?? `${value}`\n const textElement = elements[i] as SVGTextElement\n const textMaxWidth = config.tickTextWidth || (config.type === AxisType.X ? this._containerWidth / (ticks.size() + 1) : this._containerWidth / 5)\n const styleDeclaration = getComputedStyle(textElement)\n const fontSize = Number.parseFloat(styleDeclaration.fontSize)\n const fontFamily = styleDeclaration.fontFamily\n const textOptions: UnovisTextOptions = {\n verticalAlign: config.type === AxisType.X ? VerticalAlign.Top : VerticalAlign.Middle,\n width: textMaxWidth,\n textRotationAngle: config.tickTextAngle,\n separator: config.tickTextSeparator,\n wordBreak: config.tickTextForceWordBreak,\n }\n\n if (config.tickTextFitMode === FitMode.Trim) {\n const textElementSelection = select<SVGTextElement, string>(textElement).text(text)\n trimSVGText(textElementSelection, textMaxWidth, config.tickTextTrimType as TrimMode, true, fontSize, 0.58)\n text = select<SVGTextElement, string>(textElement).text()\n }\n\n const textBlock: UnovisText = { text, fontFamily, fontSize }\n renderTextToSvgTextElement(textElement, textBlock, textOptions)\n })\n\n selection\n .classed(s.axis, true)\n .classed(s.hideTickLine, !config.tickLine)\n .classed(s.hideDomain, !config.domainLine)\n\n if (config.fullSize) {\n const path = this._getFullDomainPath(0)\n smartTransition(selection.select('.domain'), duration).attr('d', path)\n }\n }\n\n private _resolveTickLabelOverlap (selection = this.axisGroup): void {\n const { config } = this\n const tickTextSelection = selection.selectAll<SVGTextElement, number | Date>('g.tick > text')\n\n if (!config.tickTextHideOverlapping) {\n tickTextSelection.style('opacity', null)\n return\n }\n\n cancelAnimationFrame(this._collideTickLabelsAnimFrameId)\n // Colliding labels in the next frame to prevent forced reflow\n this._collideTickLabelsAnimFrameId = requestAnimationFrame(() => {\n this._collideTickLabels(tickTextSelection)\n })\n }\n\n private _collideTickLabels (selection: Selection<SVGTextElement, number | Date, SVGGElement, unknown>): void {\n type SVGOverlappingTextElement = SVGTextElement & {\n _visible: boolean;\n }\n\n // Reset visibility of all labels\n selection.each((d, i, elements) => {\n const node = elements[i] as SVGOverlappingTextElement\n node._visible = true\n })\n\n // We do three iterations because not all overlapping labels can be resolved in the first iteration\n const numIterations = 3\n for (let i = 0; i < numIterations; i += 1) {\n // Run collision detection and set labels visibility\n selection.each((d, i, elements) => {\n const label1 = elements[i] as SVGOverlappingTextElement\n const isLabel1Visible = label1._visible\n if (!isLabel1Visible) return\n\n // Calculate bounding rect of point's label\n const label1BoundingRect = label1.getBoundingClientRect()\n\n for (let j = i + 1; j < elements.length; j += 1) {\n if (i === j) continue\n const label2 = elements[j] as SVGOverlappingTextElement\n const isLabel2Visible = label2._visible\n if (isLabel2Visible) {\n const label2BoundingRect = label2.getBoundingClientRect()\n const intersect = rectIntersect(label1BoundingRect, label2BoundingRect, -5)\n if (intersect) {\n label2._visible = false\n break\n }\n }\n }\n })\n }\n\n // Hide the overlapping labels\n selection.each((d, i, elements) => {\n const label = elements[i] as SVGOverlappingTextElement\n select(label).style('opacity', label._visible ? 1 : 0)\n })\n }\n\n private _getNumTicks (): number {\n const { config: { type, numTicks } } = this\n\n if (numTicks) return numTicks\n\n if (type === AxisType.X) {\n const xRange = this.xScale.range() as [number, number]\n const width = xRange[1] - xRange[0]\n return Math.floor(width / 175)\n }\n\n if (type === AxisType.Y) {\n const yRange = this.yScale.range() as [number, number]\n const height = Math.abs(yRange[0] - yRange[1])\n return Math.pow(height, 0.85) / 25\n }\n\n return this._defaultNumTicks\n }\n\n private _getConfiguredTickValues (): number[] | null {\n const { config } = this\n const scale = config.type === AxisType.X ? this.xScale : this.yScale\n const scaleDomain = scale?.domain() as [number, number]\n\n if (config.tickValues) {\n return config.tickValues.filter(v => (v >= scaleDomain[0]) && (v <= scaleDomain[1]))\n }\n\n if (config.minMaxTicksOnly || (config.type === AxisType.X && this._width < config.minMaxTicksOnlyWhenWidthIsLess)) {\n return scaleDomain as number[]\n }\n\n return null\n }\n\n private _getFullDomainPath (tickSize = 0): string {\n const { config: { type } } = this\n switch (type) {\n case AxisType.X: return `M0.5, ${tickSize} V0.5 H${this._width + 0.5} V${tickSize}`\n case AxisType.Y: return `M${-tickSize}, ${this._height + 0.5} H0.5 V0.5 H${-tickSize}`\n }\n }\n\n private _renderAxisLabel (selection = this.axisGroup): void {\n const { type, label, labelMargin, labelFontSize } = this.config\n\n // Remove the old label first to calculate the axis size properly\n selection.selectAll(`.${s.label}`).remove()\n\n // Calculate label position and rotation\n const axisPosition = this.getPosition()\n // We always use this.axisRenderHelperGroup to calculate the size of the axis because\n // this.axisGroup will give us incorrect values due to animation\n const { width: axisWidth, height: axisHeight } = this._axisRawBBox ?? selection.node().getBBox()\n\n const offsetX = type === AxisType.X ? this._width / 2 : (-1) ** (+(axisPosition === Position.Left)) * axisWidth\n const offsetY = type === AxisType.X ? (-1) ** (+(axisPosition === Position.Top)) * axisHeight : this._height / 2\n\n const marginX = type === AxisType.X ? 0 : (-1) ** (+(axisPosition === Position.Left)) * labelMargin\n const marginY = type === AxisType.X ? (-1) ** (+(axisPosition === Position.Top)) * labelMargin : 0\n\n const rotation = type === AxisType.Y ? -90 : 0\n // Append new label\n selection\n .append('text')\n .attr('class', s.label)\n .text(label)\n .attr('dy', `${this._getLabelDY()}em`)\n .attr('transform', `translate(${offsetX + marginX},${offsetY + marginY}) rotate(${rotation})`)\n .style('font-size', labelFontSize)\n .style('fill', this.config.labelColor)\n }\n\n private _getLabelDY (): number {\n const { type, position } = this.config\n switch (type) {\n case AxisType.X:\n switch (position) {\n case Position.Top: return 0\n case Position.Bottom: default: return 0.75\n }\n case AxisType.Y:\n switch (position) {\n case Position.Right: return 0.75\n case Position.Left: default: return -0.25\n }\n }\n }\n\n private _alignTickLabels (): void {\n const { config: { type, tickTextAlign, tickTextAngle, position } } = this\n const tickText = this.g.selectAll('g.tick > text')\n\n const textAnchor = textAlignToAnchor(tickTextAlign as TextAlign)\n const translateX = type === AxisType.X\n ? 0\n : this._getYTickTextTranslate(tickTextAlign as TextAlign, position as Position)\n\n const translateValue = tickTextAngle ? `translate(${translateX},0) rotate(${tickTextAngle})` : `translate(${translateX},0)`\n tickText\n .attr('transform', translateValue)\n .attr('text-anchor', textAnchor)\n }\n\n private _getYTickTextTranslate (textAlign: TextAlign, axisPosition: Position = Position.Left): number {\n const defaultTickTextSpacingPx = 9 // Default in D3\n const width = this._axisRawBBox.width - defaultTickTextSpacingPx\n\n switch (textAlign) {\n case TextAlign.Left: return axisPosition === Position.Left ? width * -1 : 0\n case TextAlign.Right: return axisPosition === Position.Left ? 0 : width\n case TextAlign.Center: return axisPosition === Position.Left ? width * (-0.5) : width * 0.5\n default: return 0\n }\n }\n}\n"],"names":["s.grid","s.tick","s.tickLabel","s.tickLabelHideable","s.axis","s.hideTickLine","s.hideDomain","label","s.label","s"],"mappings":";;;;;;;;;;;;;;;AA4BM,MAAO,IAAY,SAAQ,eAAkD,CAAA;AAejF,IAAA,WAAA,CAAa,MAAmC,EAAA;AAC9C,QAAA,KAAK,EAAE,CAAA;QAdC,IAAc,CAAA,cAAA,GAA+B,iBAAiB,CAAA;AACjE,QAAA,IAAA,CAAA,MAAM,GAA+B,IAAI,CAAC,cAA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ACF;;AArZM,IAAS,CAAA,SAAA,GAAGE,KAAC;;;;"}
@@ -25,7 +25,7 @@ export interface BrushConfigInterface<Datum> extends Partial<XYComponentConfigIn
25
25
  /** Allow dragging the selected area as a whole in order to change the selected range. Default: `false` */
26
26
  draggable?: boolean;
27
27
  /** Position of the handle: `Arrangement.Inside` or `Arrangement.Outside`. Default: `Arrangement.Inside` */
28
- handlePosition?: Arrangement | string;
28
+ handlePosition?: Arrangement.Inside | Arrangement.Outside | string;
29
29
  /** Constraint Brush selection to a minimal length in data units. Default: `undefined` */
30
30
  selectionMinLength?: number;
31
31
  }
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sources":["../../../src/components/brush/config.ts"],"sourcesContent":["import { D3BrushEvent } from 'd3-brush'\nimport { XYComponentConfigInterface, XYComponentDefaultConfig } from 'core/xy-component/config'\n\n// Types\nimport { Arrangement } from 'types/position'\n\n// We extend partial XY config interface because x and y properties are optional for Brush\nexport interface BrushConfigInterface<Datum> extends Partial<XYComponentConfigInterface<Datum>> {\n /** Callback function to be called on any Brush event.\n * Default: `(selection: [number, number], event: D3BrushEvent<Datum>, userDriven: boolean): void => {}`\n */\n onBrush?: ((selection: [number, number] | undefined, event: D3BrushEvent<Datum>, userDriven: boolean) => void);\n /** Callback function to be called on the Brush start event.\n * Default: `(selection: [number, number], event: D3BrushEvent<Datum>, userDriven: boolean): void => {}`\n */\n onBrushStart?: ((selection: [number, number] | undefined, event: D3BrushEvent<Datum>, userDriven: boolean) => void);\n /** Callback function to be called on the Brush move event.\n * Default: `(selection: [number, number], event: D3BrushEvent<Datum>, userDriven: boolean): void => {}`\n */\n onBrushMove?: ((selection: [number, number] | undefined, event: D3BrushEvent<Datum>, userDriven: boolean) => void);\n /** Callback function to be called on the Brush end event.\n * Default: `(selection: [number, number], event: D3BrushEvent<Datum>, userDriven: boolean): void => {}`\n */\n onBrushEnd?: ((selection: [number, number] | undefined, event: D3BrushEvent<Datum>, userDriven: boolean) => void);\n /** Width of the Brush handle. Default: `1` */\n handleWidth?: number;\n /** Brush selection in the data space coordinates, can be used to control the selection. Default: `undefined` */\n selection?: [number, number] | null;\n /** Allow dragging the selected area as a whole in order to change the selected range. Default: `false` */\n draggable?: boolean;\n /** Position of the handle: `Arrangement.Inside` or `Arrangement.Outside`. Default: `Arrangement.Inside` */\n handlePosition?: Arrangement | string;\n /** Constraint Brush selection to a minimal length in data units. Default: `undefined` */\n selectionMinLength?: number;\n}\n\nexport const BrushDefaultConfig: BrushConfigInterface<unknown> = {\n ...XYComponentDefaultConfig,\n /* eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function */\n onBrush: <Datum>(s: [number, number] | undefined, e: D3BrushEvent<Datum>, userDriven: boolean): void => {},\n /* eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function */\n onBrushStart: <Datum>(s: [number, number] | undefined, e: D3BrushEvent<Datum>, userDriven: boolean): void => {},\n /* eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function */\n onBrushMove: <Datum>(s: [number, number] | undefined, e: D3BrushEvent<Datum>, userDriven: boolean): void => {},\n /* eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function */\n onBrushEnd: <Datum>(s: [number, number] | undefined, e: D3BrushEvent<Datum>, userDriven: boolean): void => {},\n handleWidth: 9,\n selection: null,\n draggable: false,\n handlePosition: Arrangement.Inside,\n selectionMinLength: undefined,\n}\n"],"names":[],"mappings":";;;AAoCO,MAAM,kBAAkB,GAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAC1B,wBAAwB,CAAA,EAAA;;IAE3B,OAAO,EAAE,CAAQ,CAA+B,EAAE,CAAsB,EAAE,UAAmB,KAAU,GAAG;;IAE1G,YAAY,EAAE,CAAQ,CAA+B,EAAE,CAAsB,EAAE,UAAmB,KAAU,GAAG;;IAE/G,WAAW,EAAE,CAAQ,CAA+B,EAAE,CAAsB,EAAE,UAAmB,KAAU,GAAG;;AAE9G,IAAA,UAAU,EAAE,CAAQ,CAA+B,EAAE,CAAsB,EAAE,UAAmB,QAAa,EAC7G,WAAW,EAAE,CAAC,EACd,SAAS,EAAE,IAAI,EACf,SAAS,EAAE,KAAK,EAChB,cAAc,EAAE,WAAW,CAAC,MAAM,EAClC,kBAAkB,EAAE,SAAS;;;;"}
1
+ {"version":3,"file":"config.js","sources":["../../../src/components/brush/config.ts"],"sourcesContent":["import { D3BrushEvent } from 'd3-brush'\nimport { XYComponentConfigInterface, XYComponentDefaultConfig } from 'core/xy-component/config'\n\n// Types\nimport { Arrangement } from 'types/position'\n\n// We extend partial XY config interface because x and y properties are optional for Brush\nexport interface BrushConfigInterface<Datum> extends Partial<XYComponentConfigInterface<Datum>> {\n /** Callback function to be called on any Brush event.\n * Default: `(selection: [number, number], event: D3BrushEvent<Datum>, userDriven: boolean): void => {}`\n */\n onBrush?: ((selection: [number, number] | undefined, event: D3BrushEvent<Datum>, userDriven: boolean) => void);\n /** Callback function to be called on the Brush start event.\n * Default: `(selection: [number, number], event: D3BrushEvent<Datum>, userDriven: boolean): void => {}`\n */\n onBrushStart?: ((selection: [number, number] | undefined, event: D3BrushEvent<Datum>, userDriven: boolean) => void);\n /** Callback function to be called on the Brush move event.\n * Default: `(selection: [number, number], event: D3BrushEvent<Datum>, userDriven: boolean): void => {}`\n */\n onBrushMove?: ((selection: [number, number] | undefined, event: D3BrushEvent<Datum>, userDriven: boolean) => void);\n /** Callback function to be called on the Brush end event.\n * Default: `(selection: [number, number], event: D3BrushEvent<Datum>, userDriven: boolean): void => {}`\n */\n onBrushEnd?: ((selection: [number, number] | undefined, event: D3BrushEvent<Datum>, userDriven: boolean) => void);\n /** Width of the Brush handle. Default: `1` */\n handleWidth?: number;\n /** Brush selection in the data space coordinates, can be used to control the selection. Default: `undefined` */\n selection?: [number, number] | null;\n /** Allow dragging the selected area as a whole in order to change the selected range. Default: `false` */\n draggable?: boolean;\n /** Position of the handle: `Arrangement.Inside` or `Arrangement.Outside`. Default: `Arrangement.Inside` */\n handlePosition?: Arrangement.Inside | Arrangement.Outside | string;\n /** Constraint Brush selection to a minimal length in data units. Default: `undefined` */\n selectionMinLength?: number;\n}\n\nexport const BrushDefaultConfig: BrushConfigInterface<unknown> = {\n ...XYComponentDefaultConfig,\n /* eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function */\n onBrush: <Datum>(s: [number, number] | undefined, e: D3BrushEvent<Datum>, userDriven: boolean): void => {},\n /* eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function */\n onBrushStart: <Datum>(s: [number, number] | undefined, e: D3BrushEvent<Datum>, userDriven: boolean): void => {},\n /* eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function */\n onBrushMove: <Datum>(s: [number, number] | undefined, e: D3BrushEvent<Datum>, userDriven: boolean): void => {},\n /* eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function */\n onBrushEnd: <Datum>(s: [number, number] | undefined, e: D3BrushEvent<Datum>, userDriven: boolean): void => {},\n handleWidth: 9,\n selection: null,\n draggable: false,\n handlePosition: Arrangement.Inside,\n selectionMinLength: undefined,\n}\n"],"names":[],"mappings":";;;AAoCO,MAAM,kBAAkB,GAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAC1B,wBAAwB,CAAA,EAAA;;IAE3B,OAAO,EAAE,CAAQ,CAA+B,EAAE,CAAsB,EAAE,UAAmB,KAAU,GAAG;;IAE1G,YAAY,EAAE,CAAQ,CAA+B,EAAE,CAAsB,EAAE,UAAmB,KAAU,GAAG;;IAE/G,WAAW,EAAE,CAAQ,CAA+B,EAAE,CAAsB,EAAE,UAAmB,KAAU,GAAG;;AAE9G,IAAA,UAAU,EAAE,CAAQ,CAA+B,EAAE,CAAsB,EAAE,UAAmB,QAAa,EAC7G,WAAW,EAAE,CAAC,EACd,SAAS,EAAE,IAAI,EACf,SAAS,EAAE,KAAK,EAChB,cAAc,EAAE,WAAW,CAAC,MAAM,EAClC,kBAAkB,EAAE,SAAS;;;;"}
@@ -40,5 +40,10 @@ export interface CrosshairConfigInterface<Datum> extends WithOptional<XYComponen
40
40
  * Default: `undefined`
41
41
  */
42
42
  getCircles?: (x: number | Date | Date, data: Datum[], yScale: ContinuousScale) => CrosshairCircle[];
43
+ /**
44
+ * If set, enables crosshair synchronization between charts with the same syncId.
45
+ * All charts with the same syncId will share crosshair position and events.
46
+ */
47
+ syncId?: string;
43
48
  }
44
49
  export declare const CrosshairDefaultConfig: CrosshairConfigInterface<unknown>;
@@ -1,6 +1,6 @@
1
1
  import { XYComponentDefaultConfig } from '../../core/xy-component/config.js';
2
2
 
3
- const CrosshairDefaultConfig = Object.assign(Object.assign({}, XYComponentDefaultConfig), { yStacked: undefined, baseline: null, duration: 100, tooltip: undefined, template: (d, x) => '', hideWhenFarFromPointer: true, hideWhenFarFromPointerDistance: 100, snapToData: true, getCircles: undefined, color: undefined, strokeColor: undefined, strokeWidth: undefined });
3
+ const CrosshairDefaultConfig = Object.assign(Object.assign({}, XYComponentDefaultConfig), { yStacked: undefined, baseline: null, duration: 100, tooltip: undefined, template: (d, x) => '', hideWhenFarFromPointer: true, hideWhenFarFromPointerDistance: 100, snapToData: true, getCircles: undefined, color: undefined, strokeColor: undefined, strokeWidth: undefined, syncId: undefined });
4
4
 
5
5
  export { CrosshairDefaultConfig };
6
6
  //# sourceMappingURL=config.js.map
@@ -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 /** Tooltip template accessor. The function is supposed to return either a valid HTML string or an HTMLElement. Default: `d => ''` */\n template?: (data: Datum, x: number | Date) => string | HTMLElement;\n /** Hide Crosshair when the corresponding 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 * and the `yScale` instance to help you calculate the correct vertical position of the circles.\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 | Date, data: Datum[], yScale: ContinuousScale) => CrosshairCircle[];\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): string => '',\n hideWhenFarFromPointer: true,\n hideWhenFarFromPointerDistance: 100,\n snapToData: true,\n getCircles: undefined,\n color: undefined,\n strokeColor: undefined,\n strokeWidth: undefined,\n}\n\n"],"names":[],"mappings":";;AAgDO,MAAM,sBAAsB,GAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAC9B,wBAAwB,CAAA,EAAA,EAC3B,QAAQ,EAAE,SAAS,EACnB,QAAQ,EAAE,IAAI,EACd,QAAQ,EAAE,GAAG,EACb,OAAO,EAAE,SAAS,EAClB,QAAQ,EAAE,CAAQ,CAAQ,EAAE,CAAgB,KAAa,EAAE,EAC3D,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;;;;"}
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 /** Tooltip template accessor. The function is supposed to return either a valid HTML string or an HTMLElement. Default: `d => ''` */\n template?: (data: Datum, x: number | Date) => string | HTMLElement;\n /** Hide Crosshair when the corresponding 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 * and the `yScale` instance to help you calculate the correct vertical position of the circles.\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 | Date, data: Datum[], yScale: ContinuousScale) => CrosshairCircle[];\n /**\n * If set, enables crosshair synchronization between charts with the same syncId.\n * All charts with the same syncId will share crosshair position and events.\n */\n syncId?: string;\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): string => '',\n hideWhenFarFromPointer: true,\n hideWhenFarFromPointerDistance: 100,\n snapToData: true,\n getCircles: undefined,\n color: undefined,\n strokeColor: undefined,\n strokeWidth: undefined,\n syncId: undefined,\n}\n\n"],"names":[],"mappings":";;AAqDO,MAAM,sBAAsB,GAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAC9B,wBAAwB,CAAA,EAAA,EAC3B,QAAQ,EAAE,SAAS,EACnB,QAAQ,EAAE,IAAI,EACd,QAAQ,EAAE,GAAG,EACb,OAAO,EAAE,SAAS,EAClB,QAAQ,EAAE,CAAQ,CAAQ,EAAE,CAAgB,KAAa,EAAE,EAC3D,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,MAAM,EAAE,SAAS;;;;"}
@@ -16,6 +16,9 @@ export declare class Crosshair<Datum> extends XYComponentCore<Datum, CrosshairCo
16
16
  datumIndex: number;
17
17
  show: boolean;
18
18
  private _animFrameId;
19
+ private _currentXData;
20
+ private _syncListener;
21
+ private _isSyncActive;
19
22
  /** Tooltip component to be used by Crosshair if not provided by the config.
20
23
  * This property is supposed to be set externally by a container component like XYContainer. */
21
24
  tooltip: Tooltip;
@@ -27,10 +30,12 @@ export declare class Crosshair<Datum> extends XYComponentCore<Datum, CrosshairCo
27
30
  setContainer(containerSvg: Selection<SVGSVGElement, unknown, SVGSVGElement, unknown>): void;
28
31
  _render(customDuration?: number): void;
29
32
  hide(): void;
33
+ destroy(): void;
30
34
  _onMouseMove(event: MouseEvent): void;
31
35
  _onMouseOut(): void;
32
- _showTooltip(event: MouseEvent): void;
36
+ _showTooltip(event?: MouseEvent): void;
33
37
  _hideTooltip(): void;
34
38
  getYDataExtent(): number[];
35
39
  private getCircleData;
40
+ _updateFromSync(xData: number | Date | undefined): void;
36
41
  }