@semcore/d3-chart 16.1.1 → 16.1.2-prerelease.2

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 (117) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/lib/cjs/Area.js +11 -11
  3. package/lib/cjs/Axis.js +14 -14
  4. package/lib/cjs/Bar.js +16 -16
  5. package/lib/cjs/Bubble.js +13 -13
  6. package/lib/cjs/CompactHorizontalBar.js +16 -16
  7. package/lib/cjs/Donut.js +9 -9
  8. package/lib/cjs/Dots.js +8 -8
  9. package/lib/cjs/HorizontalBar.js +16 -16
  10. package/lib/cjs/Hover.js +3 -3
  11. package/lib/cjs/Line.js +9 -9
  12. package/lib/cjs/Plot.js +3 -3
  13. package/lib/cjs/Radar.js +19 -19
  14. package/lib/cjs/RadialTree.js +12 -12
  15. package/lib/cjs/RadialTree.js.map +1 -1
  16. package/lib/cjs/Reference.js +12 -12
  17. package/lib/cjs/ScatterPlot.js +9 -9
  18. package/lib/cjs/Tooltip.js +9 -9
  19. package/lib/cjs/Venn.js +9 -9
  20. package/lib/cjs/a11y/PlotA11yModule.js +3 -2
  21. package/lib/cjs/a11y/PlotA11yModule.js.map +1 -1
  22. package/lib/cjs/a11y/PlotA11yView.js +2 -2
  23. package/lib/cjs/a11y/locale.js +1 -0
  24. package/lib/cjs/a11y/locale.js.map +1 -1
  25. package/lib/cjs/component/Chart/AreaChart.type.js.map +1 -1
  26. package/lib/cjs/component/Chart/BarChart.type.js.map +1 -1
  27. package/lib/cjs/component/Chart/BubbleChart.type.js.map +1 -1
  28. package/lib/cjs/component/Chart/CigaretteChart.type.js.map +1 -1
  29. package/lib/cjs/component/Chart/CompactHorizontalBarChart.type.js.map +1 -1
  30. package/lib/cjs/component/Chart/DonutChart.type.js.map +1 -1
  31. package/lib/cjs/component/Chart/HistogramChart.type.js.map +1 -1
  32. package/lib/cjs/component/Chart/LineChart.type.js.map +1 -1
  33. package/lib/cjs/component/Chart/ScatterPlotChart.type.js.map +1 -1
  34. package/lib/cjs/component/Chart/VennChart.type.js.map +1 -1
  35. package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js +4 -4
  36. package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js +17 -17
  37. package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js +6 -6
  38. package/lib/cjs/types/Plot.d.js.map +1 -1
  39. package/lib/cjs/types/Reference.d.js.map +1 -1
  40. package/lib/cjs/utils.js +1 -0
  41. package/lib/cjs/utils.js.map +1 -1
  42. package/lib/es6/Area.js +11 -11
  43. package/lib/es6/Axis.js +14 -14
  44. package/lib/es6/Bar.js +16 -16
  45. package/lib/es6/Bubble.js +13 -13
  46. package/lib/es6/CompactHorizontalBar.js +16 -16
  47. package/lib/es6/Donut.js +9 -9
  48. package/lib/es6/Dots.js +8 -8
  49. package/lib/es6/HorizontalBar.js +16 -16
  50. package/lib/es6/Hover.js +3 -3
  51. package/lib/es6/Line.js +9 -9
  52. package/lib/es6/Plot.js +3 -3
  53. package/lib/es6/Radar.js +19 -19
  54. package/lib/es6/RadialTree.js +12 -12
  55. package/lib/es6/RadialTree.js.map +1 -1
  56. package/lib/es6/Reference.js +12 -12
  57. package/lib/es6/ScatterPlot.js +9 -9
  58. package/lib/es6/Tooltip.js +9 -9
  59. package/lib/es6/Venn.js +9 -9
  60. package/lib/es6/a11y/PlotA11yModule.js +3 -2
  61. package/lib/es6/a11y/PlotA11yModule.js.map +1 -1
  62. package/lib/es6/a11y/PlotA11yView.js +2 -2
  63. package/lib/es6/a11y/locale.js +1 -0
  64. package/lib/es6/a11y/locale.js.map +1 -1
  65. package/lib/es6/component/Chart/AreaChart.type.js.map +1 -1
  66. package/lib/es6/component/Chart/BarChart.type.js.map +1 -1
  67. package/lib/es6/component/Chart/BubbleChart.type.js.map +1 -1
  68. package/lib/es6/component/Chart/CigaretteChart.type.js.map +1 -1
  69. package/lib/es6/component/Chart/CompactHorizontalBarChart.type.js.map +1 -1
  70. package/lib/es6/component/Chart/DonutChart.type.js.map +1 -1
  71. package/lib/es6/component/Chart/HistogramChart.type.js.map +1 -1
  72. package/lib/es6/component/Chart/LineChart.type.js.map +1 -1
  73. package/lib/es6/component/Chart/ScatterPlotChart.type.js.map +1 -1
  74. package/lib/es6/component/Chart/VennChart.type.js.map +1 -1
  75. package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js +4 -4
  76. package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js +17 -17
  77. package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js +6 -6
  78. package/lib/es6/types/Plot.d.js.map +1 -1
  79. package/lib/es6/types/Reference.d.js.map +1 -1
  80. package/lib/es6/utils.js +1 -0
  81. package/lib/es6/utils.js.map +1 -1
  82. package/lib/esm/Area.mjs +12 -12
  83. package/lib/esm/Axis.mjs +15 -15
  84. package/lib/esm/Bar.mjs +17 -17
  85. package/lib/esm/Bubble.mjs +14 -14
  86. package/lib/esm/CompactHorizontalBar.mjs +17 -17
  87. package/lib/esm/Donut.mjs +10 -10
  88. package/lib/esm/Dots.mjs +9 -9
  89. package/lib/esm/HorizontalBar.mjs +17 -17
  90. package/lib/esm/Hover.mjs +4 -4
  91. package/lib/esm/Line.mjs +10 -10
  92. package/lib/esm/Plot.mjs +4 -4
  93. package/lib/esm/Radar.mjs +20 -20
  94. package/lib/esm/RadialTree.mjs +13 -13
  95. package/lib/esm/Reference.mjs +13 -13
  96. package/lib/esm/ScatterPlot.mjs +10 -10
  97. package/lib/esm/Tooltip.mjs +10 -10
  98. package/lib/esm/Venn.mjs +10 -10
  99. package/lib/esm/a11y/PlotA11yModule.mjs +3 -3
  100. package/lib/esm/a11y/PlotA11yView.mjs +3 -3
  101. package/lib/esm/component/ChartLegend/LegendFlex/LegendFlex.mjs +5 -5
  102. package/lib/esm/component/ChartLegend/LegendItem/LegendItem.mjs +18 -18
  103. package/lib/esm/component/ChartLegend/LegendTable/LegendTable.mjs +7 -7
  104. package/lib/types/Plot.d.ts +1 -0
  105. package/lib/types/RadialTree.d.ts +1 -0
  106. package/lib/types/Reference.d.ts +1 -1
  107. package/lib/types/component/Chart/AreaChart.type.d.ts +6 -0
  108. package/lib/types/component/Chart/BarChart.type.d.ts +5 -0
  109. package/lib/types/component/Chart/BubbleChart.type.d.ts +3 -0
  110. package/lib/types/component/Chart/CigaretteChart.type.d.ts +5 -0
  111. package/lib/types/component/Chart/CompactHorizontalBarChart.type.d.ts +4 -0
  112. package/lib/types/component/Chart/DonutChart.type.d.ts +6 -0
  113. package/lib/types/component/Chart/HistogramChart.type.d.ts +3 -0
  114. package/lib/types/component/Chart/LineChart.type.d.ts +7 -0
  115. package/lib/types/component/Chart/ScatterPlotChart.type.d.ts +4 -0
  116. package/lib/types/component/Chart/VennChart.type.d.ts +3 -0
  117. package/package.json +17 -17
@@ -1 +1 @@
1
- {"version":3,"file":"CigaretteChart.type.js","names":[],"sources":["../../../../src/component/Chart/CigaretteChart.type.ts"],"sourcesContent":["import type { Intergalactic } from '@semcore/core';\nimport type React from 'react';\n\nimport type { BaseChartProps } from './AbstractChart.type';\nimport type { interpolateValue } from '../../utils';\n\ntype DataKey = string;\n\nexport type CigaretteChartData = Record<DataKey, number | typeof interpolateValue>;\n\nexport type CigaretteChartProps = Intergalactic.InternalTypings.EfficientOmit<\n BaseChartProps<CigaretteChartData>,\n 'xScale' | 'yScale'\n> & {\n tooltipTitle?: string;\n tooltipViewType?: 'all' | 'single';\n header?: React.ReactNode;\n duration?: number;\n onClick?: (key: DataKey, event: React.SyntheticEvent) => void;\n};\n\nexport type CigaretteChartType = Intergalactic.Component<'div', CigaretteChartProps>;\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"CigaretteChart.type.js","names":[],"sources":["../../../../src/component/Chart/CigaretteChart.type.ts"],"sourcesContent":["import type { Intergalactic } from '@semcore/core';\nimport type React from 'react';\n\nimport type { BaseChartProps } from './AbstractChart.type';\nimport type { interpolateValue } from '../../utils';\n\ntype DataKey = string;\n\nexport type CigaretteChartData = Record<DataKey, number | typeof interpolateValue>;\n\nexport type CigaretteChartProps = Intergalactic.InternalTypings.EfficientOmit<\n BaseChartProps<CigaretteChartData>,\n 'xScale' | 'yScale'\n> & {\n /** Title text displayed in the tooltip */\n tooltipTitle?: string;\n /** Controls whether the tooltip shows all data or single item data */\n tooltipViewType?: 'all' | 'single';\n /** Header content for the chart */\n header?: React.ReactNode;\n /** Animation duration in milliseconds */\n duration?: number;\n /** Click handler that receives the data key and event */\n onClick?: (key: DataKey, event: React.SyntheticEvent) => void;\n};\n\nexport type CigaretteChartType = Intergalactic.Component<'div', CigaretteChartProps>;\n"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"CompactHorizontalBarChart.type.js","names":[],"sources":["../../../../src/component/Chart/CompactHorizontalBarChart.type.ts"],"sourcesContent":["import type { Intergalactic } from '@semcore/core';\nimport type { Flex } from '@semcore/flex-box';\nimport type { ScaleBand, ScaleLinear, ScaleTime } from 'd3-scale';\nimport type React from 'react';\n\nimport type { BaseChartProps } from './AbstractChart.type';\n\ntype BarKey = string;\n\nexport type CompactHorizontalBarChartData = Array<Record<BarKey, number | string>>;\n\nexport type CompactHorizontalBarChartProps = BaseChartProps<CompactHorizontalBarChartData> & {\n x: string;\n y: string;\n xScale?: ScaleBand<any> | ScaleTime<any, any>;\n yScale?: ScaleLinear<any, any>;\n\n /** Handle click by `HoverRect`. `index` is an index of the data array. */\n onClickHoverRect?: (index: number, e: React.SyntheticEvent) => void;\n\n /** Handle click by Bar. */\n onClickBar?: (barItem: number, e: React.SyntheticEvent) => void;\n};\n\nexport type CompactHorizontalBarChartType = Intergalactic.Component<\n typeof Flex,\n CompactHorizontalBarChartProps\n>;\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"CompactHorizontalBarChart.type.js","names":[],"sources":["../../../../src/component/Chart/CompactHorizontalBarChart.type.ts"],"sourcesContent":["import type { Intergalactic } from '@semcore/core';\nimport type { Flex } from '@semcore/flex-box';\nimport type { ScaleBand, ScaleLinear, ScaleTime } from 'd3-scale';\nimport type React from 'react';\n\nimport type { BaseChartProps } from './AbstractChart.type';\n\ntype BarKey = string;\n\nexport type CompactHorizontalBarChartData = Array<Record<BarKey, number | string>>;\n\nexport type CompactHorizontalBarChartProps = BaseChartProps<CompactHorizontalBarChartData> & {\n /** Field name from data array for the x-axis values */\n x: string;\n /** Field name from data array for the y-axis values */\n y: string;\n /** Custom x-axis scale */\n xScale?: ScaleBand<any> | ScaleTime<any, any>;\n /** Custom y-axis scale */\n yScale?: ScaleLinear<any, any>;\n\n /** Handle click by `HoverRect`. `index` is an index of the data array. */\n onClickHoverRect?: (index: number, e: React.SyntheticEvent) => void;\n\n /** Handle click by Bar. */\n onClickBar?: (barItem: number, e: React.SyntheticEvent) => void;\n};\n\nexport type CompactHorizontalBarChartType = Intergalactic.Component<\n typeof Flex,\n CompactHorizontalBarChartProps\n>;\n"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"DonutChart.type.js","names":[],"sources":["../../../../src/component/Chart/DonutChart.type.ts"],"sourcesContent":["import type { Intergalactic } from '@semcore/core';\nimport type { Flex } from '@semcore/flex-box';\nimport type { ScaleLinear } from 'd3-scale';\nimport type React from 'react';\n\nimport type { BaseChartProps } from './AbstractChart.type';\n\nexport type DataKey = string;\n\nexport type DonutChartData = Record<DataKey, number>;\n\nexport type DonutChartProps = BaseChartProps<DonutChartData> & {\n groupKey?: never;\n xScale?: ScaleLinear<any, any>;\n yScale?: ScaleLinear<any, any>;\n innerRadius?: number;\n halfsize?: boolean;\n innerLabel?: React.ReactNode;\n /** Callback triggered when a user clicks on a pie */\n onClickPie?: (key: DataKey, e: React.SyntheticEvent) => void;\n};\n\nexport type DonutChartType = Intergalactic.Component<typeof Flex, DonutChartProps>;\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"DonutChart.type.js","names":[],"sources":["../../../../src/component/Chart/DonutChart.type.ts"],"sourcesContent":["import type { Intergalactic } from '@semcore/core';\nimport type { Flex } from '@semcore/flex-box';\nimport type { ScaleLinear } from 'd3-scale';\nimport type React from 'react';\n\nimport type { BaseChartProps } from './AbstractChart.type';\n\nexport type DataKey = string;\n\nexport type DonutChartData = Record<DataKey, number>;\n\nexport type DonutChartProps = BaseChartProps<DonutChartData> & {\n /** Internal */\n groupKey?: never;\n /** Custom x-axis scale */\n xScale?: ScaleLinear<any, any>;\n /** Custom y-axis scale */\n yScale?: ScaleLinear<any, any>;\n /** Controls the inner radius of the donut */\n innerRadius?: number;\n /** Creates a semi-donut chart when enabled */\n halfsize?: boolean;\n /** Content displayed in the center of the donut */\n innerLabel?: React.ReactNode;\n /** Callback triggered when a user clicks on a pie */\n onClickPie?: (key: DataKey, e: React.SyntheticEvent) => void;\n};\n\nexport type DonutChartType = Intergalactic.Component<typeof Flex, DonutChartProps>;\n"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"HistogramChart.type.js","names":[],"sources":["../../../../src/component/Chart/HistogramChart.type.ts"],"sourcesContent":["import type { Intergalactic } from '@semcore/core';\nimport type { Flex } from '@semcore/flex-box';\nimport type { ScaleBand, ScaleLinear, ScaleTime } from 'd3-scale';\n\nimport type { BaseChartProps } from './AbstractChart.type';\n\nexport type HistogramChartData = Array<Record<string, number | Date>>;\n\nexport type HistogramChartProps = BaseChartProps<HistogramChartData> & {\n groupKey: string;\n xScale?: ScaleBand<any> | ScaleTime<any, any>;\n yScale?: ScaleLinear<any, any>;\n};\n\nexport type HistogramChartType = Intergalactic.Component<typeof Flex, HistogramChartProps>;\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"HistogramChart.type.js","names":[],"sources":["../../../../src/component/Chart/HistogramChart.type.ts"],"sourcesContent":["import type { Intergalactic } from '@semcore/core';\nimport type { Flex } from '@semcore/flex-box';\nimport type { ScaleBand, ScaleLinear, ScaleTime } from 'd3-scale';\n\nimport type { BaseChartProps } from './AbstractChart.type';\n\nexport type HistogramChartData = Array<Record<string, number | Date>>;\n\nexport type HistogramChartProps = BaseChartProps<HistogramChartData> & {\n /** Field name that groups the data points */\n groupKey: string;\n /** Custom x-axis scale */\n xScale?: ScaleBand<any> | ScaleTime<any, any>;\n /** Custom y-axis scale */\n yScale?: ScaleLinear<any, any>;\n};\n\nexport type HistogramChartType = Intergalactic.Component<typeof Flex, HistogramChartProps>;\n"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"LineChart.type.js","names":[],"sources":["../../../../src/component/Chart/LineChart.type.ts"],"sourcesContent":["import type { Intergalactic } from '@semcore/core';\nimport type { Flex } from '@semcore/flex-box';\nimport type { ScaleLinear, ScaleTime } from 'd3-scale';\nimport type { CurveFactory } from 'd3-shape';\n\nimport type { BaseChartProps } from './AbstractChart.type';\nimport type { interpolateValue } from '../../utils';\nimport type { LegendItemKey } from '../ChartLegend/LegendItem/LegendItem.type';\n\ntype AreaItem = {\n x: number;\n y0: number;\n y1: number;\n};\n\nexport type LineChartData = Array<Record<string, string | number | typeof interpolateValue | Date>>;\n\nexport type LineChartProps = BaseChartProps<LineChartData> & {\n groupKey: string;\n area?: Record<LegendItemKey, AreaItem[]>;\n xScale?: ScaleLinear<any, any> | ScaleTime<any, any>;\n yScale?: ScaleLinear<any, any>;\n showDots?: boolean;\n curve?: CurveFactory;\n areaCurve?: CurveFactory;\n /** Callback triggered when a user clicks on a line */\n onClickLine?: (index: number, event: React.SyntheticEvent) => void;\n};\n\nexport type LineChartType = Intergalactic.Component<typeof Flex, LineChartProps>;\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"LineChart.type.js","names":[],"sources":["../../../../src/component/Chart/LineChart.type.ts"],"sourcesContent":["import type { Intergalactic } from '@semcore/core';\nimport type { Flex } from '@semcore/flex-box';\nimport type { ScaleLinear, ScaleTime } from 'd3-scale';\nimport type { CurveFactory } from 'd3-shape';\n\nimport type { BaseChartProps } from './AbstractChart.type';\nimport type { interpolateValue } from '../../utils';\nimport type { LegendItemKey } from '../ChartLegend/LegendItem/LegendItem.type';\n\ntype AreaItem = {\n x: number;\n y0: number;\n y1: number;\n};\n\nexport type LineChartData = Array<Record<string, string | number | typeof interpolateValue | Date>>;\n\nexport type LineChartProps = BaseChartProps<LineChartData> & {\n /** Field name that groups the data points */\n groupKey: string;\n /** Optional area data for rendering filled areas under lines */\n area?: Record<LegendItemKey, AreaItem[]>;\n /** Custom x-axis scale */\n xScale?: ScaleLinear<any, any> | ScaleTime<any, any>;\n /** Custom y-axis scale */\n yScale?: ScaleLinear<any, any>;\n /** Controls whether to display dots on the line chart */\n showDots?: boolean;\n /** D3 curve factory for line interpolation */\n curve?: CurveFactory;\n /** Curve factory specifically for area rendering */\n areaCurve?: CurveFactory;\n /** Callback triggered when a user clicks on a line */\n onClickLine?: (index: number, event: React.SyntheticEvent) => void;\n};\n\nexport type LineChartType = Intergalactic.Component<typeof Flex, LineChartProps>;\n"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"ScatterPlotChart.type.js","names":[],"sources":["../../../../src/component/Chart/ScatterPlotChart.type.ts"],"sourcesContent":["import type { Intergalactic } from '@semcore/core';\nimport type { Flex } from '@semcore/flex-box';\nimport type { ScaleLinear, ScaleTime } from 'd3-scale';\n\nimport type { BaseChartProps } from './AbstractChart.type';\nimport type { interpolateValue } from '../../utils';\n\nexport type ScatterPlotChartData = Array<Record<string, number | typeof interpolateValue | Date>>;\n\nexport type ScatterPlotChartProps = BaseChartProps<ScatterPlotChartData> & {\n groupKey: string;\n xScale?: ScaleLinear<any, any> | ScaleTime<any, any>;\n yScale?: ScaleLinear<any, any>;\n valueKey?: string;\n /** Callback triggered when a user clicks on a scatter item */\n onClickScatterItem?: (index: number, event: React.SyntheticEvent) => void;\n};\n\nexport type ScatterPlotChartType = Intergalactic.Component<typeof Flex, ScatterPlotChartProps>;\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"ScatterPlotChart.type.js","names":[],"sources":["../../../../src/component/Chart/ScatterPlotChart.type.ts"],"sourcesContent":["import type { Intergalactic } from '@semcore/core';\nimport type { Flex } from '@semcore/flex-box';\nimport type { ScaleLinear, ScaleTime } from 'd3-scale';\n\nimport type { BaseChartProps } from './AbstractChart.type';\nimport type { interpolateValue } from '../../utils';\n\nexport type ScatterPlotChartData = Array<Record<string, number | typeof interpolateValue | Date>>;\n\nexport type ScatterPlotChartProps = BaseChartProps<ScatterPlotChartData> & {\n /** Field name that groups the data points */\n groupKey: string;\n /** Custom x-axis scale */\n xScale?: ScaleLinear<any, any> | ScaleTime<any, any>;\n /** Custom y-axis scale */\n yScale?: ScaleLinear<any, any>;\n /** Optional field name for additional value data */\n valueKey?: string;\n /** Callback triggered when a user clicks on a scatter item */\n onClickScatterItem?: (index: number, event: React.SyntheticEvent) => void;\n};\n\nexport type ScatterPlotChartType = Intergalactic.Component<typeof Flex, ScatterPlotChartProps>;\n"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"VennChart.type.js","names":[],"sources":["../../../../src/component/Chart/VennChart.type.ts"],"sourcesContent":["import type { Intergalactic } from '@semcore/core';\nimport type { Flex } from '@semcore/flex-box';\nimport type { ScaleLinear } from 'd3-scale';\n\nimport type { BaseChartProps } from './AbstractChart.type';\n\nexport type DataKey = string;\n\nexport type VennChartData = Record<DataKey, number>;\n\nexport type VennChartProps = BaseChartProps<VennChartData> & {\n groupKey?: never;\n xScale?: ScaleLinear<any, any>;\n yScale?: ScaleLinear<any, any>;\n /** Callback triggered when a user clicks on a circle */\n onClickVennItem?: (key: DataKey, e: React.SyntheticEvent) => void;\n};\n\nexport type VennChartType = Intergalactic.Component<typeof Flex, VennChartProps>;\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"VennChart.type.js","names":[],"sources":["../../../../src/component/Chart/VennChart.type.ts"],"sourcesContent":["import type { Intergalactic } from '@semcore/core';\nimport type { Flex } from '@semcore/flex-box';\nimport type { ScaleLinear } from 'd3-scale';\n\nimport type { BaseChartProps } from './AbstractChart.type';\n\nexport type DataKey = string;\n\nexport type VennChartData = Record<DataKey, number>;\n\nexport type VennChartProps = BaseChartProps<VennChartData> & {\n /** Internal */\n groupKey?: never;\n /** Custom x-axis scale */\n xScale?: ScaleLinear<any, any>;\n /** Custom y-axis scale */\n yScale?: ScaleLinear<any, any>;\n /** Callback triggered when a user clicks on a circle */\n onClickVennItem?: (key: DataKey, e: React.SyntheticEvent) => void;\n};\n\nexport type VennChartType = Intergalactic.Component<typeof Flex, VennChartProps>;\n"],"mappings":"","ignoreList":[]}
@@ -24,12 +24,12 @@ var _BaseLegend2 = require("../BaseLegend");
24
24
  var _LegendItem = require("../LegendItem/LegendItem");
25
25
  function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, (0, _isNativeReflectConstruct2["default"])() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
26
26
  /*!__reshadow-styles__:"./legend-flex.shadow.css"*/
27
- var style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SLegendFlex_1q7xr_gg_._direction_row_1q7xr_gg_{align-items:flex-start;align-content:flex-start;flex-wrap:wrap;gap:8px 16px}.___SLegendFlex_1q7xr_gg_._direction_column_1q7xr_gg_{align-items:flex-start;flex-wrap:wrap;gap:8px}", /*__inner_css_end__*/"1q7xr_gg_"),
27
+ var style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SLegendFlex_cldh8_gg_._direction_row_cldh8_gg_{align-items:flex-start;align-content:flex-start;flex-wrap:wrap;gap:8px 16px}.___SLegendFlex_cldh8_gg_._direction_column_cldh8_gg_{align-items:flex-start;flex-wrap:wrap;gap:8px}", /*__inner_css_end__*/"cldh8_gg_"),
28
28
  /*__reshadow_css_end__*/
29
29
  {
30
- "__SLegendFlex": "___SLegendFlex_1q7xr_gg_",
31
- "_direction_row": "_direction_row_1q7xr_gg_",
32
- "_direction_column": "_direction_column_1q7xr_gg_"
30
+ "__SLegendFlex": "___SLegendFlex_cldh8_gg_",
31
+ "_direction_row": "_direction_row_cldh8_gg_",
32
+ "_direction_column": "_direction_column_cldh8_gg_"
33
33
  });
34
34
  var LegendFlexRoot = /*#__PURE__*/function (_BaseLegend) {
35
35
  function LegendFlexRoot() {
@@ -27,25 +27,25 @@ var _utils = require("../../../utils");
27
27
  var _excluded = ["id", "checked", "color", "onChangeLegendItem", "shape"];
28
28
  function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, (0, _isNativeReflectConstruct2["default"])() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
29
29
  /*!__reshadow-styles__:"./legend-item.shadow.css"*/
30
- var style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SLegendItem_auvon_gg_{min-width:0;align-items:flex-start}@media (hover:hover){.___SLegendItem_auvon_gg_:hover{cursor:pointer}.___SLegendItem_auvon_gg_.__disabled_auvon_gg_:hover{cursor:default}}.___SPointShape_auvon_gg_.__color_auvon_gg_{background-color:var(--color_auvon);margin-right:8px;flex-shrink:0}.___SPointShape_auvon_gg_._shape_Circle_auvon_gg_._size_l_auvon_gg_{width:16px;height:16px;border-radius:8px;margin-top:4px}.___SPointShape_auvon_gg_._shape_Circle_auvon_gg_._size_m_auvon_gg_{width:12px;height:12px;border-radius:6px;margin-top:4px}.___SPointShape_auvon_gg_._shape_Line_auvon_gg_._size_l_auvon_gg_{width:16px;height:4px;border-radius:3px;margin-top:9px}.___SPointShape_auvon_gg_._shape_Line_auvon_gg_._size_m_auvon_gg_{width:12px;height:4px;border-radius:3px;margin-top:8px}.___SPointShape_auvon_gg_._shape_Square_auvon_gg_._size_l_auvon_gg_{width:16px;height:16px;border-radius:2px;margin-top:4px}.___SPointShape_auvon_gg_._shape_Square_auvon_gg_._size_m_auvon_gg_{width:12px;height:12px;border-radius:2px;margin-top:4px}.___SPointShape_auvon_gg_._shape_Pattern_auvon_gg_{background-color:transparent;margin-right:4px}.___SIcon_auvon_gg_{line-height:0;margin-right:4px}.___SIcon_auvon_gg_._size_l_auvon_gg_{margin-top:4px}.___SIcon_auvon_gg_._size_m_auvon_gg_{margin-top:2px}.___SLabel_auvon_gg_{min-width:0}.___SAdditionalLabel_auvon_gg_._size_l_auvon_gg_,.___SCount_auvon_gg_._size_l_auvon_gg_,.___SLabel_auvon_gg_._size_l_auvon_gg_{font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%)}.___SAdditionalLabel_auvon_gg_._size_m_auvon_gg_,.___SCount_auvon_gg_._size_m_auvon_gg_,.___SLabel_auvon_gg_._size_m_auvon_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%)}.___SAdditionalLabel_auvon_gg_,.___SCount_auvon_gg_{margin-left:4px}.___SAdditionalLabel_auvon_gg_{white-space:nowrap;display:flex;align-items:flex-start}.___SAdditionalLabel_auvon_gg_::before{content:\"\";display:inline-block;background-color:var(--intergalactic-text-secondary, #6c6e79);height:4px;width:4px;border-radius:2px;margin-right:4px}.___SAdditionalLabel_auvon_gg_._size_l_auvon_gg_::before{margin-top:10px}.___SAdditionalLabel_auvon_gg_._size_m_auvon_gg_::before{margin-top:8px}.___SPatternSymbol_auvon_gg_{transform:scale(.8)}", /*__inner_css_end__*/"auvon_gg_"),
30
+ var style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SLegendItem_94o7q_gg_{min-width:0;align-items:flex-start}@media (hover:hover){.___SLegendItem_94o7q_gg_:hover{cursor:pointer}.___SLegendItem_94o7q_gg_.__disabled_94o7q_gg_:hover{cursor:default}}.___SPointShape_94o7q_gg_.__color_94o7q_gg_{background-color:var(--color_94o7q);margin-right:8px;flex-shrink:0}.___SPointShape_94o7q_gg_._shape_Circle_94o7q_gg_._size_l_94o7q_gg_{width:16px;height:16px;border-radius:8px;margin-top:4px}.___SPointShape_94o7q_gg_._shape_Circle_94o7q_gg_._size_m_94o7q_gg_{width:12px;height:12px;border-radius:6px;margin-top:4px}.___SPointShape_94o7q_gg_._shape_Line_94o7q_gg_._size_l_94o7q_gg_{width:16px;height:4px;border-radius:3px;margin-top:9px}.___SPointShape_94o7q_gg_._shape_Line_94o7q_gg_._size_m_94o7q_gg_{width:12px;height:4px;border-radius:3px;margin-top:8px}.___SPointShape_94o7q_gg_._shape_Square_94o7q_gg_._size_l_94o7q_gg_{width:16px;height:16px;border-radius:2px;margin-top:4px}.___SPointShape_94o7q_gg_._shape_Square_94o7q_gg_._size_m_94o7q_gg_{width:12px;height:12px;border-radius:2px;margin-top:4px}.___SPointShape_94o7q_gg_._shape_Pattern_94o7q_gg_{background-color:transparent;margin-right:4px}.___SIcon_94o7q_gg_{line-height:0;margin-right:4px}.___SIcon_94o7q_gg_._size_l_94o7q_gg_{margin-top:4px}.___SIcon_94o7q_gg_._size_m_94o7q_gg_{margin-top:2px}.___SLabel_94o7q_gg_{min-width:0}.___SAdditionalLabel_94o7q_gg_._size_l_94o7q_gg_,.___SCount_94o7q_gg_._size_l_94o7q_gg_,.___SLabel_94o7q_gg_._size_l_94o7q_gg_{font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%)}.___SAdditionalLabel_94o7q_gg_._size_m_94o7q_gg_,.___SCount_94o7q_gg_._size_m_94o7q_gg_,.___SLabel_94o7q_gg_._size_m_94o7q_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%)}.___SAdditionalLabel_94o7q_gg_,.___SCount_94o7q_gg_{margin-left:4px}.___SAdditionalLabel_94o7q_gg_{white-space:nowrap;display:flex;align-items:flex-start}.___SAdditionalLabel_94o7q_gg_::before{content:\"\";display:inline-block;background-color:var(--intergalactic-text-secondary, #6c6e79);height:4px;width:4px;border-radius:2px;margin-right:4px}.___SAdditionalLabel_94o7q_gg_._size_l_94o7q_gg_::before{margin-top:10px}.___SAdditionalLabel_94o7q_gg_._size_m_94o7q_gg_::before{margin-top:8px}.___SPatternSymbol_94o7q_gg_{transform:scale(.8)}", /*__inner_css_end__*/"94o7q_gg_"),
31
31
  /*__reshadow_css_end__*/
32
32
  {
33
- "__SLegendItem": "___SLegendItem_auvon_gg_",
34
- "_disabled": "__disabled_auvon_gg_",
35
- "__SPointShape": "___SPointShape_auvon_gg_",
36
- "_color": "__color_auvon_gg_",
37
- "--color": "--color_auvon",
38
- "_shape_Circle": "_shape_Circle_auvon_gg_",
39
- "_size_l": "_size_l_auvon_gg_",
40
- "_size_m": "_size_m_auvon_gg_",
41
- "_shape_Line": "_shape_Line_auvon_gg_",
42
- "_shape_Square": "_shape_Square_auvon_gg_",
43
- "_shape_Pattern": "_shape_Pattern_auvon_gg_",
44
- "__SIcon": "___SIcon_auvon_gg_",
45
- "__SLabel": "___SLabel_auvon_gg_",
46
- "__SAdditionalLabel": "___SAdditionalLabel_auvon_gg_",
47
- "__SCount": "___SCount_auvon_gg_",
48
- "__SPatternSymbol": "___SPatternSymbol_auvon_gg_"
33
+ "__SLegendItem": "___SLegendItem_94o7q_gg_",
34
+ "_disabled": "__disabled_94o7q_gg_",
35
+ "__SPointShape": "___SPointShape_94o7q_gg_",
36
+ "_color": "__color_94o7q_gg_",
37
+ "--color": "--color_94o7q",
38
+ "_shape_Circle": "_shape_Circle_94o7q_gg_",
39
+ "_size_l": "_size_l_94o7q_gg_",
40
+ "_size_m": "_size_m_94o7q_gg_",
41
+ "_shape_Line": "_shape_Line_94o7q_gg_",
42
+ "_shape_Square": "_shape_Square_94o7q_gg_",
43
+ "_shape_Pattern": "_shape_Pattern_94o7q_gg_",
44
+ "__SIcon": "___SIcon_94o7q_gg_",
45
+ "__SLabel": "___SLabel_94o7q_gg_",
46
+ "__SAdditionalLabel": "___SAdditionalLabel_94o7q_gg_",
47
+ "__SCount": "___SCount_94o7q_gg_",
48
+ "__SPatternSymbol": "___SPatternSymbol_94o7q_gg_"
49
49
  });
50
50
  var enhance = [(0, _resolveColorEnhance["default"])(), (0, _uniqueID["default"])()];
51
51
  var LegendItemRoot = /*#__PURE__*/function (_Component) {
@@ -20,14 +20,14 @@ var _BaseLegend2 = require("../BaseLegend");
20
20
  var _LegendItem = require("../LegendItem/LegendItem");
21
21
  function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, (0, _isNativeReflectConstruct2["default"])() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
22
22
  /*!__reshadow-styles__:"./legend-table.shadow.css"*/
23
- var style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SLegendTable_gxutq_gg_.__columns-count_gxutq_gg_{font-feature-settings:\"tnum\";font-variant-numeric:tabular-nums;display:grid;grid-template-columns:auto .2fr;align-items:center;height:-moz-fit-content;height:fit-content;grid-column-gap:16px;grid-row-gap:8px}.___SColumnItem_gxutq_gg_._size_l_gxutq_gg_{font-size:var(--intergalactic-fs-300, 16px);text-align:right}.___SColumnItem_gxutq_gg_._size_m_gxutq_gg_{font-size:var(--intergalactic-fs-200, 14px);text-align:right}", /*__inner_css_end__*/"gxutq_gg_"),
23
+ var style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SLegendTable_17ats_gg_.__columns-count_17ats_gg_{font-feature-settings:\"tnum\";font-variant-numeric:tabular-nums;display:grid;grid-template-columns:auto .2fr;align-items:center;height:-moz-fit-content;height:fit-content;grid-column-gap:16px;grid-row-gap:8px}.___SColumnItem_17ats_gg_._size_l_17ats_gg_{font-size:var(--intergalactic-fs-300, 16px);text-align:right}.___SColumnItem_17ats_gg_._size_m_17ats_gg_{font-size:var(--intergalactic-fs-200, 14px);text-align:right}", /*__inner_css_end__*/"17ats_gg_"),
24
24
  /*__reshadow_css_end__*/
25
25
  {
26
- "__SLegendTable": "___SLegendTable_gxutq_gg_",
27
- "_columns-count": "__columns-count_gxutq_gg_",
28
- "__SColumnItem": "___SColumnItem_gxutq_gg_",
29
- "_size_l": "_size_l_gxutq_gg_",
30
- "_size_m": "_size_m_gxutq_gg_"
26
+ "__SLegendTable": "___SLegendTable_17ats_gg_",
27
+ "_columns-count": "__columns-count_17ats_gg_",
28
+ "__SColumnItem": "___SColumnItem_17ats_gg_",
29
+ "_size_l": "_size_l_17ats_gg_",
30
+ "_size_m": "_size_m_17ats_gg_"
31
31
  });
32
32
  var LegendTableRoot = /*#__PURE__*/function (_BaseLegend) {
33
33
  function LegendTableRoot() {
@@ -1 +1 @@
1
- {"version":3,"file":"Plot.d.js","names":[],"sources":["../../../src/types/Plot.d.ts"],"sourcesContent":["import type { UnknownProperties, Intergalactic } from '@semcore/core';\nimport type { BoxProps } from '@semcore/flex-box';\n\nimport type { DataStructureHints } from './a11y/hints';\nimport type { Context } from './context';\nimport type { PatternsConfig } from './Pattern';\nimport type { PlotEventEmitter } from './utils';\n\n/** @deprecated */\nexport interface IPlotProps extends PlotProps, UnknownProperties {}\nexport type PlotProps = Context &\n BoxProps & {\n /** Width of the svg element\n * @default 0 */\n width?: number;\n /** Height of the svg element\n * @default 0 */\n height?: number;\n /** Human readable chart name (e.g \"Last market trends\") */\n label?: string;\n /**\n * Locale for displaying the days of a week and months, to be transferred to `Intl`\n * @default en\n * */\n locale?: NavigatorLanguage['language'];\n /**\n * Optional container for data hints (use it if you have a legend component upper in tree)\n */\n dataHints?: DataStructureHints;\n /** Optional prop to tune up alt text generating for charts */\n a11yAltTextConfig?: PlotSummarizerConfig;\n\n /** Enables charts patterns that enhances charts accessibility */\n patterns?: PatternsConfig;\n\n eventEmitter?: InstanceType<typeof PlotEventEmitter>;\n };\n\nexport type PlotSummarizerConfig = {\n /** Totally disable automatic data summarization */\n disable?: boolean;\n /** Disable automatic data summarization and use provided text */\n override?: string;\n /** Tuning up time series trends analyzing. Represents angle tangens of time series change of different strength */\n trendTangens?: {\n /** Angle tangens of time series that have meaningful trending change\n * @default 1/15\n */\n static?: number;\n /** Angle tangens of time series that have weak trending change\n * @default 1/10\n */\n weak?: number;\n /** Angle tangens of time series that have medium trending change\n * @default 1/5\n */\n medium?: number;\n /** Angle tangens of time series that have strong trending change\n * @default Infinity\n */\n strong?: number;\n };\n /** Tuning up time series local trends detection based on moving averages */\n movingAverage?: {\n /** Frame size of long moving average\n * @default Math.sqrt(data.length)\n */\n longSize?: number;\n /** Frame size of short moving average\n * @default Math.sqrt(data.length)/2\n */\n shortSize?: number;\n /** Absolute difference between values on moving averages crossing to\n * be handled as local trend change.\n * @default StandardDeviation/10\n */\n notableDiff?: number;\n };\n /** The way data to be interpreted as. By default is based on used used Plot elements and data structure.\n */\n dataType?: 'time-series' | 'points-cloud' | 'values-set';\n /** Grid size to split data of point clouds into clusters.\n */\n clustersGridSize?: number;\n /** Limits some output lists in chart alt text\n * @default 100\n * **/\n maxListSymbols?: number;\n /** Always add time to dates in chart alt text **/\n datesWithTime?: boolean;\n /** Described clusters count before text \"and X more\"\n * @default false\n * **/\n clustersLimit?: number;\n /** Described values count before text \"and X more\"\n * @default false\n * **/\n valuesLimit?: number;\n /** Described grouped value groups count before text \"and X more\"\n * @default false\n * **/\n groupsLimit?: number;\n /** Additional field for extra text description to the data\n * **/\n additionalFields?: string[];\n /** Allows to format titles (e.g. axes) in alt text and data table */\n titlesFormatter?: (key: string | number | null) => string | undefined;\n /** Allows to format values in alt text and data table */\n valuesFormatter?: (value: unknown, key: string | number | null) => string | undefined;\n};\n\n/** @deprecated */\nexport type MapProps<Props, Ctx = {}, UCProps = {}> = Props & {\n children?:\n | ((props: Props & Ctx, handlers: UCProps) => Props | React.PropsWithChildren)\n | React.ReactNode;\n};\n\nexport type IntergalacticD3Component<BaseTag extends Intergalactic.Tag, Props, Context = {}> = (<\n Tag extends Intergalactic.Tag = BaseTag,\n>(\n props: Intergalactic.InternalTypings.PropsRenderingResultComponentProps<Tag, Props, Context>,\n) => Intergalactic.InternalTypings.ComponentRenderingResults) &\nIntergalactic.InternalTypings.ComponentAdditive<BaseTag, BaseTag, Props>;\n\ndeclare const Plot: IntergalacticD3Component<'svg', PlotProps, Context>;\nexport default Plot;\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"Plot.d.js","names":[],"sources":["../../../src/types/Plot.d.ts"],"sourcesContent":["import type { UnknownProperties, Intergalactic } from '@semcore/core';\nimport type { BoxProps } from '@semcore/flex-box';\n\nimport type { DataStructureHints } from './a11y/hints';\nimport type { Context } from './context';\nimport type { PatternsConfig } from './Pattern';\nimport type { PlotEventEmitter } from './utils';\n\n/** @deprecated */\nexport interface IPlotProps extends PlotProps, UnknownProperties {}\nexport type PlotProps = Context &\n BoxProps & {\n /** Width of the svg element\n * @default 0 */\n width?: number;\n /** Height of the svg element\n * @default 0 */\n height?: number;\n /** Human readable chart name (e.g \"Last market trends\") */\n label?: string;\n /**\n * Locale for displaying the days of a week and months, to be transferred to `Intl`\n * @default en\n * */\n locale?: NavigatorLanguage['language'];\n /**\n * Optional container for data hints (use it if you have a legend component upper in tree)\n */\n dataHints?: DataStructureHints;\n /** Optional prop to tune up alt text generating for charts */\n a11yAltTextConfig?: PlotSummarizerConfig;\n\n /** Enables charts patterns that enhances charts accessibility */\n patterns?: PatternsConfig;\n\n /** Event emitter for chart interactions */\n eventEmitter?: InstanceType<typeof PlotEventEmitter>;\n };\n\nexport type PlotSummarizerConfig = {\n /** Totally disable automatic data summarization */\n disable?: boolean;\n /** Disable automatic data summarization and use provided text */\n override?: string;\n /** Tuning up time series trends analyzing. Represents angle tangens of time series change of different strength */\n trendTangens?: {\n /** Angle tangens of time series that have meaningful trending change\n * @default 1/15\n */\n static?: number;\n /** Angle tangens of time series that have weak trending change\n * @default 1/10\n */\n weak?: number;\n /** Angle tangens of time series that have medium trending change\n * @default 1/5\n */\n medium?: number;\n /** Angle tangens of time series that have strong trending change\n * @default Infinity\n */\n strong?: number;\n };\n /** Tuning up time series local trends detection based on moving averages */\n movingAverage?: {\n /** Frame size of long moving average\n * @default Math.sqrt(data.length)\n */\n longSize?: number;\n /** Frame size of short moving average\n * @default Math.sqrt(data.length)/2\n */\n shortSize?: number;\n /** Absolute difference between values on moving averages crossing to\n * be handled as local trend change.\n * @default StandardDeviation/10\n */\n notableDiff?: number;\n };\n /** The way data to be interpreted as. By default is based on used used Plot elements and data structure.\n */\n dataType?: 'time-series' | 'points-cloud' | 'values-set';\n /** Grid size to split data of point clouds into clusters.\n */\n clustersGridSize?: number;\n /** Limits some output lists in chart alt text\n * @default 100\n * **/\n maxListSymbols?: number;\n /** Always add time to dates in chart alt text **/\n datesWithTime?: boolean;\n /** Described clusters count before text \"and X more\"\n * @default false\n * **/\n clustersLimit?: number;\n /** Described values count before text \"and X more\"\n * @default false\n * **/\n valuesLimit?: number;\n /** Described grouped value groups count before text \"and X more\"\n * @default false\n * **/\n groupsLimit?: number;\n /** Additional field for extra text description to the data\n * **/\n additionalFields?: string[];\n /** Allows to format titles (e.g. axes) in alt text and data table */\n titlesFormatter?: (key: string | number | null) => string | undefined;\n /** Allows to format values in alt text and data table */\n valuesFormatter?: (value: unknown, key: string | number | null) => string | undefined;\n};\n\n/** @deprecated */\nexport type MapProps<Props, Ctx = {}, UCProps = {}> = Props & {\n children?:\n | ((props: Props & Ctx, handlers: UCProps) => Props | React.PropsWithChildren)\n | React.ReactNode;\n};\n\nexport type IntergalacticD3Component<BaseTag extends Intergalactic.Tag, Props, Context = {}> = (<\n Tag extends Intergalactic.Tag = BaseTag,\n>(\n props: Intergalactic.InternalTypings.PropsRenderingResultComponentProps<Tag, Props, Context>,\n) => Intergalactic.InternalTypings.ComponentRenderingResults) &\nIntergalactic.InternalTypings.ComponentAdditive<BaseTag, BaseTag, Props>;\n\ndeclare const Plot: IntergalacticD3Component<'svg', PlotProps, Context>;\nexport default Plot;\n"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"Reference.d.js","names":[],"sources":["../../../src/types/Reference.d.ts"],"sourcesContent":["import type { UnknownProperties } from '@semcore/core';\n\nimport type { Context } from './context';\nimport type { IntergalacticD3Component } from './Plot';\n\n/** @deprecated **/\nexport interface IReferenceLineProps extends ReferenceLineProps, UnknownProperties {}\nexport type ReferenceLineProps = Context & {\n /** The position of the title relative reference line\n * @default 'left' */\n position?: 'top' | 'right' | 'bottom' | 'left';\n /** Value element of data */\n value?: any;\n\n title?: string;\n};\n\n/** @deprecated **/\nexport interface IReferenceLineTitleProps extends ReferenceLineTitleProps, UnknownProperties {}\nexport type ReferenceLineTitleProps = Context & {\n /** The position of the axis relative reference line */\n position?: 'top' | 'right' | 'bottom' | 'left';\n /** Value element of data */\n value: any;\n};\n\n/** @deprecated **/\nexport interface IReferenceLineBackgroundProps\n extends ReferenceLineBackgroundProps,\n UnknownProperties {}\nexport type ReferenceBackgroundProps = Context & {\n /** The position relative the `value` */\n position?: 'top' | 'right' | 'bottom' | 'left';\n /** Value element of data */\n value?: any;\n /** Value of the background end */\n endValue?: number | string;\n};\n/** @deprecated use ReferenceBackgroundProps instead **/\nexport type ReferenceLineBackgroundProps = ReferenceBackgroundProps;\n\nexport type ReferenceStripesProps = Context & {\n /** The position relative the `value` */\n position?: 'top' | 'right' | 'bottom' | 'left';\n /** Value element of data */\n value?: any;\n /** Value of the background end */\n endValue?: number | string;\n};\n\nexport declare const ReferenceLine: IntergalacticD3Component<\n 'line',\n ReferenceLineProps,\n Context\n> & {\n Title: IntergalacticD3Component<'text', ReferenceLineTitleProps, Context>;\n /**\n * @deprecated use `ReferenceBackground` instead.\n */\n Background: IntergalacticD3Component<'rect', ReferenceLineBackgroundProps, Context>;\n};\nexport declare const ReferenceBackground: IntergalacticD3Component<\n 'rect',\n ReferenceLineBackgroundProps,\n Context\n>;\nexport declare const ReferenceStripes: IntergalacticD3Component<\n 'rect',\n ReferenceStripesProps,\n Context\n>;\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"Reference.d.js","names":[],"sources":["../../../src/types/Reference.d.ts"],"sourcesContent":["import type { UnknownProperties } from '@semcore/core';\n\nimport type { Context } from './context';\nimport type { IntergalacticD3Component } from './Plot';\n\n/** @deprecated **/\nexport interface IReferenceLineProps extends ReferenceLineProps, UnknownProperties {}\nexport type ReferenceLineProps = Context & {\n /** The position of the title relative reference line\n * @default 'left' */\n position?: 'top' | 'right' | 'bottom' | 'left';\n /** Value element of data */\n value?: any;\n /** Reference line title */\n title?: string;\n};\n\n/** @deprecated **/\nexport interface IReferenceLineTitleProps extends ReferenceLineTitleProps, UnknownProperties {}\nexport type ReferenceLineTitleProps = Context & {\n /** The position of the axis relative reference line */\n position?: 'top' | 'right' | 'bottom' | 'left';\n /** Value element of data */\n value: any;\n};\n\n/** @deprecated **/\nexport interface IReferenceLineBackgroundProps\n extends ReferenceLineBackgroundProps,\n UnknownProperties {}\nexport type ReferenceBackgroundProps = Context & {\n /** The position relative the `value` */\n position?: 'top' | 'right' | 'bottom' | 'left';\n /** Value element of data */\n value?: any;\n /** Value of the background end */\n endValue?: number | string;\n};\n/** @deprecated use ReferenceBackgroundProps instead **/\nexport type ReferenceLineBackgroundProps = ReferenceBackgroundProps;\n\nexport type ReferenceStripesProps = Context & {\n /** The position relative the `value` */\n position?: 'top' | 'right' | 'bottom' | 'left';\n /** Value element of data */\n value?: any;\n /** Value of the background end */\n endValue?: number | string;\n};\n\nexport declare const ReferenceLine: IntergalacticD3Component<\n 'line',\n ReferenceLineProps,\n Context\n> & {\n Title: IntergalacticD3Component<'text', ReferenceLineTitleProps, Context>;\n /**\n * @deprecated use `ReferenceBackground` instead.\n */\n Background: IntergalacticD3Component<'rect', ReferenceLineBackgroundProps, Context>;\n};\nexport declare const ReferenceBackground: IntergalacticD3Component<\n 'rect',\n ReferenceLineBackgroundProps,\n Context\n>;\nexport declare const ReferenceStripes: IntergalacticD3Component<\n 'rect',\n ReferenceStripesProps,\n Context\n>;\n"],"mappings":"","ignoreList":[]}
package/lib/cjs/utils.js CHANGED
@@ -119,6 +119,7 @@ var getIndexFromData = exports.getIndexFromData = function getIndexFromData(data
119
119
  }
120
120
  return _key2;
121
121
  } else {
122
+ // eslint-disable-next-line no-console
122
123
  console.warn('[d3-chart/utils/getIndexFromData] encountered incompatible scale type');
123
124
  return null;
124
125
  }
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","names":["_eventEmitter","_interopRequireDefault","require","_d3Array","_d3Scale","eventToPoint","exports","event","svgRoot","node","currentTarget","target","rect","getBoundingClientRect","clientX","left","clientLeft","clientY","top","clientTop","invert","scale","value","range","domain","paddingOuter","step","scaleQuantize","slice","reverse","definedNullData","x","y","plot","definedData","undefined","scaleOfBandwidth","bandwidth","minMax","data","key","extent","d","getNullData","defined","name","reduce","acc","i","push","_defineProperty2","prev","next","defNext","find","_objectSpread4","length","defPrev","getIndexFromData","Array","isArray","bisect","bisector","center","index","findIndex","keys","Object","map","_key","item","interpolateValue","lastKeyIndex","console","warn","roundedPath","w","h","r","tl","arguments","tr","bl","br","result","concat","scaleToBand","band","scaleBand","memoize","func","results","_len","args","_key3","argsKey","join","apply","measureText","text","fontSize","span","document","createElement","style","_iterator","_createForOfIteratorHelper2","split","_step","s","n","done","line","append","createTextNode","err","e","f","display","body","textWidth","offsetWidth","textHeight","offsetHeight","remove","Math","max","idCounter","uniqueId","prefix","Symbol","getChartDefaultColorName","getBubbleChartValueScale","z","scaleSqrt","_toConsumableArray2","el","getScatterPlotRadius","valueKey","calculateBubbleDomain","miniestValue","min","maxestValue","_minMax","_minMax2","_slicedToArray2","pixelRatio","abs","valueScale","minValueShift","maxValueShift","PlotEventEmitter","EventEmitter"],"sources":["../../src/utils.ts"],"sourcesContent":["import EventEmitter from '@semcore/core/lib/utils/eventEmitter';\nimport { extent, bisector, type Numeric } from 'd3-array';\nimport {\n scaleQuantize,\n type ScaleIdentity,\n type ScaleTime,\n type ScaleContinuousNumeric,\n type ScaleBand,\n type ScalePoint,\n type NumberValue,\n scaleBand,\n scaleSqrt,\n} from 'd3-scale';\nimport type React from 'react';\n\nexport const eventToPoint = (event: React.MouseEvent<HTMLElement>, svgRoot: SVGElement) => {\n const node = (event.currentTarget || event.target) as HTMLElement;\n const rect = svgRoot.getBoundingClientRect();\n return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop];\n};\n\ntype InvertableScale =\n | ScaleIdentity\n | ScaleBand<{}>\n | ScaleTime<unknown, unknown>\n | ScaleContinuousNumeric<unknown, unknown>;\nexport const invert = <Scale extends InvertableScale = InvertableScale>(\n scale: Scale,\n value: number,\n) => {\n if ('invert' in scale && scale.invert) return scale.invert(value);\n\n const range = scale.range() as [number, number];\n const domain = scale.domain();\n if ('paddingOuter' in scale) {\n range[0] += scale.paddingOuter() * scale.step();\n range[1] -= scale.paddingOuter() * scale.step();\n }\n\n return scaleQuantize()\n .domain((range[0] <= range[1] ? range : range.slice().reverse()) as NumberValue[])\n .range((range[0] <= range[1] ? domain : domain.slice().reverse()) as number[])(value);\n};\n\nexport const definedNullData = (x: number, y: number) => (plot: { [xOrY: number]: unknown }) =>\n plot[x] !== null && plot[y] !== null;\n\nexport const definedData = (x: number, y: number) => (plot: { [xOrY: number]: unknown }) =>\n plot[x] !== null && plot[x] !== undefined && plot[y] !== null && plot[y] !== undefined;\n\nexport const scaleOfBandwidth = <Scale extends ScaleBand<{}>>(scale: Scale, value: number) =>\n scale.bandwidth ? scale(value)! + scale.bandwidth() / 2 : scale(value);\n\nexport const minMax = <\n Key extends string = string,\n Data extends { [key: string]: Numeric | null | undefined }[] = {\n [key: string]: Numeric | null | undefined;\n }[],\n>(\n data: Data,\n key: Key,\n): [min: Data[0][Key], max: Data[0][Key]] => {\n if (typeof key === 'string') {\n return extent(data, (d) => d[key]) as any;\n }\n return extent(data, key) as any;\n};\n\nexport const getNullData = <\n Name extends string = string,\n Data extends { [name in Name]?: unknown | null } = {},\n>(\n data: Data[],\n defined: (data: Data) => boolean,\n name: Name,\n) =>\n data.reduce((acc, d, i, data) => {\n if (defined(d)) {\n acc.push({\n [name]: null,\n } as Data);\n } else {\n const prev = data[i - 1];\n const next = data[i + 1];\n\n if (i === 0) {\n const defNext = data.find(defined);\n acc.push({\n ...d,\n [name]: defNext ? defNext[name] : null,\n });\n }\n\n // prev\n if (prev && defined(prev)) {\n acc.push(prev);\n }\n\n // next\n if (next && defined(next)) {\n acc.push(next);\n }\n\n if (data.length - 1 === i) {\n const defPrev = data.slice().reverse().find(defined);\n acc.push({\n ...d,\n [name]: defPrev ? defPrev[name] : null,\n });\n }\n }\n return acc;\n }, [] as Data[]);\n\ntype IndexFromDataScale =\n | ScaleIdentity\n | ScaleTime<unknown, unknown>\n | ScaleContinuousNumeric<unknown, unknown>\n | ScaleBand<{}>\n | ScalePoint<{}>;\nexport const getIndexFromData = <\n Key extends string,\n Data extends {\n [key in Key]: number;\n } = { [key in Key]: number },\n Scale extends IndexFromDataScale = IndexFromDataScale,\n>(\n data: Data[],\n scale: Scale,\n key: Key,\n value: number,\n) => {\n // detect line chart\n if ('invert' in scale && typeof scale.invert === 'function' && Array.isArray(data)) {\n const bisect = bisector((d: { [key: string]: number }) => d[key]).center;\n return bisect(data, value);\n } else if ('step' in scale && typeof scale.step !== 'undefined' && Array.isArray(data)) { // detect bar chart\n const index = data.findIndex((d) => d[key] === value);\n return index >= 0 ? index : null;\n } else if ('invert' in scale && typeof scale.invert === 'function' && !Array.isArray(data)) { // detect cigarette chart\n const keys = Object.keys(data);\n const domain = keys.map((_key, index) => {\n return keys.slice(0, index).reduce((acc, item) => {\n if (data[item] !== interpolateValue) {\n acc = acc + data[item];\n }\n\n return acc;\n }, 0);\n });\n\n let key = null;\n\n const lastKeyIndex = keys.length - 1;\n\n if (value > domain[lastKeyIndex]) {\n key = keys[lastKeyIndex];\n } else {\n for (let i = 0; i < lastKeyIndex; i++) {\n if (i === 0 && value < domain[i]) {\n break;\n }\n\n if (value > domain[i] && value < domain[i + 1]) {\n key = keys[i];\n break;\n }\n }\n }\n\n return key;\n } else {\n console.warn('[d3-chart/utils/getIndexFromData] encountered incompatible scale type');\n return null;\n }\n};\n\nexport const roundedPath = (\n x: number,\n y: number,\n w: number,\n h: number,\n r: number,\n tl = false,\n tr = false,\n bl = false,\n br = false,\n) => {\n let result = `M${x + r},${y}`;\n result += `h${w - 2 * r}`;\n if (tr) {\n result += `a${r},${r} 0 0 1 ${r},${r}`;\n } else {\n result += `h${r}`;\n result += `v${r}`;\n }\n result += `v${h - 2 * r}`;\n if (br) {\n result += `a${r},${r} 0 0 1 ${-r},${r}`;\n } else {\n result += `v${r}`;\n result += `h${-r}`;\n }\n result += `h${2 * r - w}`;\n if (bl) {\n result += `a${r},${r} 0 0 1 ${-r},${-r}`;\n } else {\n result += `h${-r}`;\n result += `v${-r}`;\n }\n result += `v${2 * r - h}`;\n if (tl) {\n result += `a${r},${r} 0 0 1 ${r},${-r}`;\n } else {\n result += `v${-r}`;\n result += `h${r}`;\n }\n result += 'z';\n return result;\n};\n\nexport const scaleToBand = (scale: ScaleBand<{}>) => {\n if ('bandwidth' in scale) {\n return scale;\n }\n\n const band = scaleBand()\n .range((scale as any).range())\n .domain((scale as any).domain());\n\n return band;\n};\n\nexport const memoize = <Func extends (...args: any[]) => any>(func: Func): Func => {\n const results: { [cacheKey: string]: any } = {};\n return ((...args: any[]) => {\n const argsKey = args.join(',');\n if (!results[argsKey]) {\n results[argsKey] = func(...args);\n }\n return results[argsKey];\n }) as Func;\n};\n\nexport const measureText = memoize((text: string, fontSize?: number) => {\n if (!text) return 0;\n\n const span = document.createElement('span');\n if (fontSize) {\n span.style.fontSize = `${fontSize}px`;\n }\n for (const line of text.split('\\n')) {\n span.append(document.createTextNode(line));\n span.append(document.createElement('br'));\n }\n span.style.display = 'inline-block';\n document.body.append(span);\n const textWidth = span.offsetWidth;\n const textHeight = span.offsetHeight;\n span.remove();\n return Math.max(textWidth, textHeight);\n});\n\nlet idCounter = 0;\nexport const uniqueId = (prefix = 'id-') => `${prefix}${idCounter++}`;\n\nexport const interpolateValue = Symbol('intergalactic-d3-chart-line-interpolate');\n\nexport const getChartDefaultColorName = (index: number) => {\n index++;\n if (index < 1) index = 1;\n if (index > 24) index %= 24;\n\n return `chart-palette-order-${index}`;\n};\n\nexport const getBubbleChartValueScale = (data: any[], key: string) => {\n const z = scaleSqrt()\n .domain([0, Math.max(...data.map((el) => el[key]))])\n .range([5.5, 50.5]);\n\n return z;\n};\n\nexport const getScatterPlotRadius = (valueKey?: string): number => {\n return valueKey !== undefined ? 12 : 5.5;\n};\n\ntype BubbleChartDataItem = {\n value: number;\n x: number;\n y: number;\n};\n\nexport const calculateBubbleDomain = (\n data: Array<BubbleChartDataItem>,\n key: 'x' | 'y',\n range: [number, number],\n): [min: number, max: number] => {\n const miniestValue = data.reduce(\n (acc, item) => {\n if (item[key] - item.value < acc.min) {\n acc.min = item[key] - item.value;\n acc.value = item.value;\n }\n return acc;\n },\n { value: data[0].value, min: data[0][key] - data[0].value },\n ).value;\n const maxestValue = data.reduce(\n (acc, item) => {\n if (item.value + item[key] > acc.max) {\n acc.max = item.value + item.x;\n acc.value = item.value;\n }\n return acc;\n },\n { value: data[0].value, max: data[0].value + data[0][key] },\n ).value;\n\n let [min, max] = minMax(data, key);\n\n const pixelRatio = Math.abs(max - min) / Math.abs(range[0] - range[1]);\n const valueScale = getBubbleChartValueScale(data, 'value');\n const minValueShift = valueScale(miniestValue) * pixelRatio;\n const maxValueShift = valueScale(maxestValue) * pixelRatio;\n min -= minValueShift * 2;\n max += maxValueShift * 2;\n\n return [min, max];\n};\n\ninterface PlotEventEmitterEmit {\n (event: 'setTooltipVisible', visible: boolean): void;\n (event: 'setTooltipPosition', x: number, y: number): void;\n}\ntype Unsubscribe = () => void;\ninterface PlotEventEmitterSubscribe {\n (event: 'setTooltipVisible', callback: (visible: boolean) => void): Unsubscribe;\n (event: 'setTooltipPosition', callback: (x: number, y: number) => void): Unsubscribe;\n}\nexport const PlotEventEmitter = EventEmitter as typeof EventEmitter<\n PlotEventEmitterEmit,\n PlotEventEmitterSubscribe\n>;\n"],"mappings":";;;;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","ignoreList":[]}
1
+ {"version":3,"file":"utils.js","names":["_eventEmitter","_interopRequireDefault","require","_d3Array","_d3Scale","eventToPoint","exports","event","svgRoot","node","currentTarget","target","rect","getBoundingClientRect","clientX","left","clientLeft","clientY","top","clientTop","invert","scale","value","range","domain","paddingOuter","step","scaleQuantize","slice","reverse","definedNullData","x","y","plot","definedData","undefined","scaleOfBandwidth","bandwidth","minMax","data","key","extent","d","getNullData","defined","name","reduce","acc","i","push","_defineProperty2","prev","next","defNext","find","_objectSpread4","length","defPrev","getIndexFromData","Array","isArray","bisect","bisector","center","index","findIndex","keys","Object","map","_key","item","interpolateValue","lastKeyIndex","console","warn","roundedPath","w","h","r","tl","arguments","tr","bl","br","result","concat","scaleToBand","band","scaleBand","memoize","func","results","_len","args","_key3","argsKey","join","apply","measureText","text","fontSize","span","document","createElement","style","_iterator","_createForOfIteratorHelper2","split","_step","s","n","done","line","append","createTextNode","err","e","f","display","body","textWidth","offsetWidth","textHeight","offsetHeight","remove","Math","max","idCounter","uniqueId","prefix","Symbol","getChartDefaultColorName","getBubbleChartValueScale","z","scaleSqrt","_toConsumableArray2","el","getScatterPlotRadius","valueKey","calculateBubbleDomain","miniestValue","min","maxestValue","_minMax","_minMax2","_slicedToArray2","pixelRatio","abs","valueScale","minValueShift","maxValueShift","PlotEventEmitter","EventEmitter"],"sources":["../../src/utils.ts"],"sourcesContent":["import EventEmitter from '@semcore/core/lib/utils/eventEmitter';\nimport { extent, bisector, type Numeric } from 'd3-array';\nimport {\n scaleQuantize,\n type ScaleIdentity,\n type ScaleTime,\n type ScaleContinuousNumeric,\n type ScaleBand,\n type ScalePoint,\n type NumberValue,\n scaleBand,\n scaleSqrt,\n} from 'd3-scale';\nimport type React from 'react';\n\nexport const eventToPoint = (event: React.MouseEvent<HTMLElement>, svgRoot: SVGElement) => {\n const node = (event.currentTarget || event.target) as HTMLElement;\n const rect = svgRoot.getBoundingClientRect();\n return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop];\n};\n\ntype InvertableScale =\n | ScaleIdentity\n | ScaleBand<{}>\n | ScaleTime<unknown, unknown>\n | ScaleContinuousNumeric<unknown, unknown>;\nexport const invert = <Scale extends InvertableScale = InvertableScale>(\n scale: Scale,\n value: number,\n) => {\n if ('invert' in scale && scale.invert) return scale.invert(value);\n\n const range = scale.range() as [number, number];\n const domain = scale.domain();\n if ('paddingOuter' in scale) {\n range[0] += scale.paddingOuter() * scale.step();\n range[1] -= scale.paddingOuter() * scale.step();\n }\n\n return scaleQuantize()\n .domain((range[0] <= range[1] ? range : range.slice().reverse()) as NumberValue[])\n .range((range[0] <= range[1] ? domain : domain.slice().reverse()) as number[])(value);\n};\n\nexport const definedNullData = (x: number, y: number) => (plot: { [xOrY: number]: unknown }) =>\n plot[x] !== null && plot[y] !== null;\n\nexport const definedData = (x: number, y: number) => (plot: { [xOrY: number]: unknown }) =>\n plot[x] !== null && plot[x] !== undefined && plot[y] !== null && plot[y] !== undefined;\n\nexport const scaleOfBandwidth = <Scale extends ScaleBand<{}>>(scale: Scale, value: number) =>\n scale.bandwidth ? scale(value)! + scale.bandwidth() / 2 : scale(value);\n\nexport const minMax = <\n Key extends string = string,\n Data extends { [key: string]: Numeric | null | undefined }[] = {\n [key: string]: Numeric | null | undefined;\n }[],\n>(\n data: Data,\n key: Key,\n): [min: Data[0][Key], max: Data[0][Key]] => {\n if (typeof key === 'string') {\n return extent(data, (d) => d[key]) as any;\n }\n return extent(data, key) as any;\n};\n\nexport const getNullData = <\n Name extends string = string,\n Data extends { [name in Name]?: unknown | null } = {},\n>(\n data: Data[],\n defined: (data: Data) => boolean,\n name: Name,\n) =>\n data.reduce((acc, d, i, data) => {\n if (defined(d)) {\n acc.push({\n [name]: null,\n } as Data);\n } else {\n const prev = data[i - 1];\n const next = data[i + 1];\n\n if (i === 0) {\n const defNext = data.find(defined);\n acc.push({\n ...d,\n [name]: defNext ? defNext[name] : null,\n });\n }\n\n // prev\n if (prev && defined(prev)) {\n acc.push(prev);\n }\n\n // next\n if (next && defined(next)) {\n acc.push(next);\n }\n\n if (data.length - 1 === i) {\n const defPrev = data.slice().reverse().find(defined);\n acc.push({\n ...d,\n [name]: defPrev ? defPrev[name] : null,\n });\n }\n }\n return acc;\n }, [] as Data[]);\n\ntype IndexFromDataScale =\n | ScaleIdentity\n | ScaleTime<unknown, unknown>\n | ScaleContinuousNumeric<unknown, unknown>\n | ScaleBand<{}>\n | ScalePoint<{}>;\nexport const getIndexFromData = <\n Key extends string,\n Data extends {\n [key in Key]: number;\n } = { [key in Key]: number },\n Scale extends IndexFromDataScale = IndexFromDataScale,\n>(\n data: Data[],\n scale: Scale,\n key: Key,\n value: number,\n) => {\n // detect line chart\n if ('invert' in scale && typeof scale.invert === 'function' && Array.isArray(data)) {\n const bisect = bisector((d: { [key: string]: number }) => d[key]).center;\n return bisect(data, value);\n } else if ('step' in scale && typeof scale.step !== 'undefined' && Array.isArray(data)) { // detect bar chart\n const index = data.findIndex((d) => d[key] === value);\n return index >= 0 ? index : null;\n } else if ('invert' in scale && typeof scale.invert === 'function' && !Array.isArray(data)) { // detect cigarette chart\n const keys = Object.keys(data);\n const domain = keys.map((_key, index) => {\n return keys.slice(0, index).reduce((acc, item) => {\n if (data[item] !== interpolateValue) {\n acc = acc + data[item];\n }\n\n return acc;\n }, 0);\n });\n\n let key = null;\n\n const lastKeyIndex = keys.length - 1;\n\n if (value > domain[lastKeyIndex]) {\n key = keys[lastKeyIndex];\n } else {\n for (let i = 0; i < lastKeyIndex; i++) {\n if (i === 0 && value < domain[i]) {\n break;\n }\n\n if (value > domain[i] && value < domain[i + 1]) {\n key = keys[i];\n break;\n }\n }\n }\n\n return key;\n } else {\n // eslint-disable-next-line no-console\n console.warn('[d3-chart/utils/getIndexFromData] encountered incompatible scale type');\n return null;\n }\n};\n\nexport const roundedPath = (\n x: number,\n y: number,\n w: number,\n h: number,\n r: number,\n tl = false,\n tr = false,\n bl = false,\n br = false,\n) => {\n let result = `M${x + r},${y}`;\n result += `h${w - 2 * r}`;\n if (tr) {\n result += `a${r},${r} 0 0 1 ${r},${r}`;\n } else {\n result += `h${r}`;\n result += `v${r}`;\n }\n result += `v${h - 2 * r}`;\n if (br) {\n result += `a${r},${r} 0 0 1 ${-r},${r}`;\n } else {\n result += `v${r}`;\n result += `h${-r}`;\n }\n result += `h${2 * r - w}`;\n if (bl) {\n result += `a${r},${r} 0 0 1 ${-r},${-r}`;\n } else {\n result += `h${-r}`;\n result += `v${-r}`;\n }\n result += `v${2 * r - h}`;\n if (tl) {\n result += `a${r},${r} 0 0 1 ${r},${-r}`;\n } else {\n result += `v${-r}`;\n result += `h${r}`;\n }\n result += 'z';\n return result;\n};\n\nexport const scaleToBand = (scale: ScaleBand<{}>) => {\n if ('bandwidth' in scale) {\n return scale;\n }\n\n const band = scaleBand()\n .range((scale as any).range())\n .domain((scale as any).domain());\n\n return band;\n};\n\nexport const memoize = <Func extends (...args: any[]) => any>(func: Func): Func => {\n const results: { [cacheKey: string]: any } = {};\n return ((...args: any[]) => {\n const argsKey = args.join(',');\n if (!results[argsKey]) {\n results[argsKey] = func(...args);\n }\n return results[argsKey];\n }) as Func;\n};\n\nexport const measureText = memoize((text: string, fontSize?: number) => {\n if (!text) return 0;\n\n const span = document.createElement('span');\n if (fontSize) {\n span.style.fontSize = `${fontSize}px`;\n }\n for (const line of text.split('\\n')) {\n span.append(document.createTextNode(line));\n span.append(document.createElement('br'));\n }\n span.style.display = 'inline-block';\n document.body.append(span);\n const textWidth = span.offsetWidth;\n const textHeight = span.offsetHeight;\n span.remove();\n return Math.max(textWidth, textHeight);\n});\n\nlet idCounter = 0;\nexport const uniqueId = (prefix = 'id-') => `${prefix}${idCounter++}`;\n\nexport const interpolateValue = Symbol('intergalactic-d3-chart-line-interpolate');\n\nexport const getChartDefaultColorName = (index: number) => {\n index++;\n if (index < 1) index = 1;\n if (index > 24) index %= 24;\n\n return `chart-palette-order-${index}`;\n};\n\nexport const getBubbleChartValueScale = (data: any[], key: string) => {\n const z = scaleSqrt()\n .domain([0, Math.max(...data.map((el) => el[key]))])\n .range([5.5, 50.5]);\n\n return z;\n};\n\nexport const getScatterPlotRadius = (valueKey?: string): number => {\n return valueKey !== undefined ? 12 : 5.5;\n};\n\ntype BubbleChartDataItem = {\n value: number;\n x: number;\n y: number;\n};\n\nexport const calculateBubbleDomain = (\n data: Array<BubbleChartDataItem>,\n key: 'x' | 'y',\n range: [number, number],\n): [min: number, max: number] => {\n const miniestValue = data.reduce(\n (acc, item) => {\n if (item[key] - item.value < acc.min) {\n acc.min = item[key] - item.value;\n acc.value = item.value;\n }\n return acc;\n },\n { value: data[0].value, min: data[0][key] - data[0].value },\n ).value;\n const maxestValue = data.reduce(\n (acc, item) => {\n if (item.value + item[key] > acc.max) {\n acc.max = item.value + item.x;\n acc.value = item.value;\n }\n return acc;\n },\n { value: data[0].value, max: data[0].value + data[0][key] },\n ).value;\n\n let [min, max] = minMax(data, key);\n\n const pixelRatio = Math.abs(max - min) / Math.abs(range[0] - range[1]);\n const valueScale = getBubbleChartValueScale(data, 'value');\n const minValueShift = valueScale(miniestValue) * pixelRatio;\n const maxValueShift = valueScale(maxestValue) * pixelRatio;\n min -= minValueShift * 2;\n max += maxValueShift * 2;\n\n return [min, max];\n};\n\ninterface PlotEventEmitterEmit {\n (event: 'setTooltipVisible', visible: boolean): void;\n (event: 'setTooltipPosition', x: number, y: number): void;\n}\ntype Unsubscribe = () => void;\ninterface PlotEventEmitterSubscribe {\n (event: 'setTooltipVisible', callback: (visible: boolean) => void): Unsubscribe;\n (event: 'setTooltipPosition', callback: (x: number, y: number) => void): Unsubscribe;\n}\nexport const PlotEventEmitter = EventEmitter as typeof EventEmitter<\n PlotEventEmitterEmit,\n PlotEventEmitterSubscribe\n>;\n"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAaO,IAAMG,YA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AG,GAAGxD,IAAI,CAAChD,KAAK,GAAGgD,IAAI,CAACvC,CAAC;MAC7BgB,GAAG,CAACzB,KAAK,GAAGgD,IAAI,CAAChD,KAAK;IACxB;IACA,OAAOyB,GAAG;EACZ,CAAC,EACD;IAAEzB,KAAK,EAAEiB,IAAI,CAAC,CAAC,CAAC,CAACjB,KAAK;IAAEwG,GAAG,EAAEvF,IAAI,CAAC,CAAC,CAAC,CAACjB,KAAK,GAAGiB,IAAI,CAAC,CAAC,CAAC,CAACC,GAAG;EAAE,CAC5D,CAAC,CAAClB,KAAK;EAEP,IAAAyH,OAAA,GAAiBzG,MAAM,CAACC,IAAI,EAAEC,GAAG,CAAC;IAAAwG,QAAA,OAAAC,eAAA,aAAAF,OAAA;IAA7BF,GAAG,GAAAG,QAAA;IAAElB,GAAG,GAAAkB,QAAA;EAEb,IAAME,UAAU,GAAGrB,IAAI,CAACsB,GAAG,CAACrB,GAAG,GAAGe,GAAG,CAAC,GAAGhB,IAAI,CAACsB,GAAG,CAAC5H,KAAK,CAAC,CAAC,CAAC,GAAGA,KAAK,CAAC,CAAC,CAAC,CAAC;EACtE,IAAM6H,UAAU,GAAGhB,wBAAwB,CAAC7F,IAAI,EAAE,OAAO,CAAC;EAC1D,IAAM8G,aAAa,GAAGD,UAAU,CAACR,YAAY,CAAC,GAAGM,UAAU;EAC3D,IAAMI,aAAa,GAAGF,UAAU,CAACN,WAAW,CAAC,GAAGI,UAAU;EAC1DL,GAAG,IAAIQ,aAAa,GAAG,CAAC;EACxBvB,GAAG,IAAIwB,aAAa,GAAG,CAAC;EAExB,OAAO,CAACT,GAAG,EAAEf,GAAG,CAAC;AACnB,CAAC;AAWM,IAAMyB,gBAAgB,GAAAjJ,OAAA,CAAAiJ,gBAAA,GAAGC,wBAG/B","ignoreList":[]}
package/lib/es6/Area.js CHANGED
@@ -20,19 +20,19 @@ import createElement from './createElement';
20
20
  import Dots from './Dots';
21
21
  import { PatternFill } from './Pattern';
22
22
  /*!__reshadow-styles__:"./style/area.shadow.css"*/
23
- var style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SArea_7a1fm_gg_{fill:var(--intergalactic-chart-palette-order-1, #2bb3ff);fill-opacity:.2}.___SArea_7a1fm_gg_.__color_7a1fm_gg_{fill:var(--color_7a1fm)}.___SArea_7a1fm_gg_.__pattern_7a1fm_gg_{fill:var(--pattern_7a1fm);fill-opacity:.7}.___SArea_7a1fm_gg_.__transparent_7a1fm_gg_{opacity:.3}.___SAreaLine_7a1fm_gg_{stroke:var(--intergalactic-chart-palette-order-1, #2bb3ff);stroke-width:3;fill:transparent}.___SAreaLine_7a1fm_gg_.__color_7a1fm_gg_{stroke:var(--color_7a1fm)}.___SAreaLine_7a1fm_gg_.__transparent_7a1fm_gg_{opacity:.3}.___SAreaLine_7a1fm_gg_,.___SArea_7a1fm_gg_{transition-property:d;transition-duration:var(--duration_7a1fm);transition-timing-function:ease-in-out}.___SNull_7a1fm_gg_{fill:transparent;stroke:var(--intergalactic-chart-grid-x-axis, #c4c7cf);stroke-dasharray:4}.___SNull_7a1fm_gg_.__hide_7a1fm_gg_{display:none}", /*__inner_css_end__*/"7a1fm_gg_"),
23
+ var style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SArea_1fmni_gg_{fill:var(--intergalactic-chart-palette-order-1, #2bb3ff);fill-opacity:.2}.___SArea_1fmni_gg_.__color_1fmni_gg_{fill:var(--color_1fmni)}.___SArea_1fmni_gg_.__pattern_1fmni_gg_{fill:var(--pattern_1fmni);fill-opacity:.7}.___SArea_1fmni_gg_.__transparent_1fmni_gg_{opacity:.3}.___SAreaLine_1fmni_gg_{stroke:var(--intergalactic-chart-palette-order-1, #2bb3ff);stroke-width:3;fill:transparent}.___SAreaLine_1fmni_gg_.__color_1fmni_gg_{stroke:var(--color_1fmni)}.___SAreaLine_1fmni_gg_.__transparent_1fmni_gg_{opacity:.3}.___SAreaLine_1fmni_gg_,.___SArea_1fmni_gg_{transition-property:d;transition-duration:var(--duration_1fmni);transition-timing-function:ease-in-out}.___SNull_1fmni_gg_{fill:transparent;stroke:var(--intergalactic-chart-grid-x-axis, #c4c7cf);stroke-dasharray:4}.___SNull_1fmni_gg_.__hide_1fmni_gg_{display:none}", /*__inner_css_end__*/"1fmni_gg_"),
24
24
  /*__reshadow_css_end__*/
25
25
  {
26
- "__SArea": "___SArea_7a1fm_gg_",
27
- "_color": "__color_7a1fm_gg_",
28
- "--color": "--color_7a1fm",
29
- "_pattern": "__pattern_7a1fm_gg_",
30
- "--pattern": "--pattern_7a1fm",
31
- "_transparent": "__transparent_7a1fm_gg_",
32
- "__SAreaLine": "___SAreaLine_7a1fm_gg_",
33
- "--duration": "--duration_7a1fm",
34
- "__SNull": "___SNull_7a1fm_gg_",
35
- "_hide": "__hide_7a1fm_gg_"
26
+ "__SArea": "___SArea_1fmni_gg_",
27
+ "_color": "__color_1fmni_gg_",
28
+ "--color": "--color_1fmni",
29
+ "_pattern": "__pattern_1fmni_gg_",
30
+ "--pattern": "--pattern_1fmni",
31
+ "_transparent": "__transparent_1fmni_gg_",
32
+ "__SAreaLine": "___SAreaLine_1fmni_gg_",
33
+ "--duration": "--duration_1fmni",
34
+ "__SNull": "___SNull_1fmni_gg_",
35
+ "_hide": "__hide_1fmni_gg_"
36
36
  });
37
37
  import { definedData, scaleOfBandwidth, getNullData, definedNullData, interpolateValue, eventToPoint, invert } from './utils';
38
38
  var AreaRoot = /*#__PURE__*/function (_Component) {
package/lib/es6/Axis.js CHANGED
@@ -13,22 +13,22 @@ import { Component, sstyled } from '@semcore/core';
13
13
  import React from 'react';
14
14
  import createElement from './createElement';
15
15
  /*!__reshadow-styles__:"./style/axis.shadow.css"*/
16
- var style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SAxis_1m5u2_gg_{stroke:var(--intergalactic-chart-grid-x-axis, #c4c7cf)}.___SAxis_1m5u2_gg_.__hide_1m5u2_gg_,.___STick_1m5u2_gg_.__hide_1m5u2_gg_{display:none}.___STick_1m5u2_gg_{font-size:var(--intergalactic-fs-100, 12px);fill:var(--intergalactic-chart-grid-text-label, #6c6e79)}.___SGrid_1m5u2_gg_{fill:transparent;stroke:var(--intergalactic-border-secondary, #e0e1e9)}.___STitle_1m5u2_gg_{font-size:var(--intergalactic-fs-100, 12px);fill:var(--intergalactic-text-hint, #6c6e79);transform-origin:var(--transform-origin_1m5u2)}.___STitle_1m5u2_gg_._position_top_1m5u2_gg_{text-anchor:middle}.___STitle_1m5u2_gg_._position_bottom_1m5u2_gg_{text-anchor:middle;dominant-baseline:hanging}.___STitle_1m5u2_gg_._position_left_1m5u2_gg_,.___STitle_1m5u2_gg_._position_right_1m5u2_gg_{transform:rotate(-90deg);text-anchor:middle;dominant-baseline:middle}.___STitle_1m5u2_gg_._position_left_1m5u2_gg_.__verticalWritingMode_1m5u2_gg_,.___STitle_1m5u2_gg_._position_right_1m5u2_gg_.__verticalWritingMode_1m5u2_gg_{writing-mode:vertical-rl;transform:none}.___STick_1m5u2_gg_._position_top_1m5u2_gg_{transform:translateY(-12px);text-anchor:middle}.___STick_1m5u2_gg_._position_bottom_1m5u2_gg_{transform:translateY(12px);text-anchor:middle;dominant-baseline:hanging}.___STick_1m5u2_gg_._position_right_1m5u2_gg_{transform:translateX(16px);text-anchor:start;dominant-baseline:middle}.___STick_1m5u2_gg_._position_left_1m5u2_gg_{transform:translateX(-16px);text-anchor:end;dominant-baseline:middle}.___STick_1m5u2_gg_._position_custom_0_1m5u2_gg_{transform:translateY(12px);text-anchor:middle;dominant-baseline:hanging}.___STick_1m5u2_gg_._position_custom_1_1m5u2_gg_{transform:translateX(-16px);text-anchor:end;dominant-baseline:middle}", /*__inner_css_end__*/"1m5u2_gg_"),
16
+ var style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SAxis_dz6pc_gg_{stroke:var(--intergalactic-chart-grid-x-axis, #c4c7cf)}.___SAxis_dz6pc_gg_.__hide_dz6pc_gg_,.___STick_dz6pc_gg_.__hide_dz6pc_gg_{display:none}.___STick_dz6pc_gg_{font-size:var(--intergalactic-fs-100, 12px);fill:var(--intergalactic-chart-grid-text-label, #6c6e79)}.___SGrid_dz6pc_gg_{fill:transparent;stroke:var(--intergalactic-border-secondary, #e0e1e9)}.___STitle_dz6pc_gg_{font-size:var(--intergalactic-fs-100, 12px);fill:var(--intergalactic-text-hint, #6c6e79);transform-origin:var(--transform-origin_dz6pc)}.___STitle_dz6pc_gg_._position_top_dz6pc_gg_{text-anchor:middle}.___STitle_dz6pc_gg_._position_bottom_dz6pc_gg_{text-anchor:middle;dominant-baseline:hanging}.___STitle_dz6pc_gg_._position_left_dz6pc_gg_,.___STitle_dz6pc_gg_._position_right_dz6pc_gg_{transform:rotate(-90deg);text-anchor:middle;dominant-baseline:middle}.___STitle_dz6pc_gg_._position_left_dz6pc_gg_.__verticalWritingMode_dz6pc_gg_,.___STitle_dz6pc_gg_._position_right_dz6pc_gg_.__verticalWritingMode_dz6pc_gg_{writing-mode:vertical-rl;transform:none}.___STick_dz6pc_gg_._position_top_dz6pc_gg_{transform:translateY(-12px);text-anchor:middle}.___STick_dz6pc_gg_._position_bottom_dz6pc_gg_{transform:translateY(12px);text-anchor:middle;dominant-baseline:hanging}.___STick_dz6pc_gg_._position_right_dz6pc_gg_{transform:translateX(16px);text-anchor:start;dominant-baseline:middle}.___STick_dz6pc_gg_._position_left_dz6pc_gg_{transform:translateX(-16px);text-anchor:end;dominant-baseline:middle}.___STick_dz6pc_gg_._position_custom_0_dz6pc_gg_{transform:translateY(12px);text-anchor:middle;dominant-baseline:hanging}.___STick_dz6pc_gg_._position_custom_1_dz6pc_gg_{transform:translateX(-16px);text-anchor:end;dominant-baseline:middle}", /*__inner_css_end__*/"dz6pc_gg_"),
17
17
  /*__reshadow_css_end__*/
18
18
  {
19
- "__SAxis": "___SAxis_1m5u2_gg_",
20
- "_hide": "__hide_1m5u2_gg_",
21
- "__STick": "___STick_1m5u2_gg_",
22
- "__SGrid": "___SGrid_1m5u2_gg_",
23
- "__STitle": "___STitle_1m5u2_gg_",
24
- "--transform-origin": "--transform-origin_1m5u2",
25
- "_position_top": "_position_top_1m5u2_gg_",
26
- "_position_bottom": "_position_bottom_1m5u2_gg_",
27
- "_position_right": "_position_right_1m5u2_gg_",
28
- "_position_left": "_position_left_1m5u2_gg_",
29
- "_verticalWritingMode": "__verticalWritingMode_1m5u2_gg_",
30
- "_position_custom_0": "_position_custom_0_1m5u2_gg_",
31
- "_position_custom_1": "_position_custom_1_1m5u2_gg_"
19
+ "__SAxis": "___SAxis_dz6pc_gg_",
20
+ "_hide": "__hide_dz6pc_gg_",
21
+ "__STick": "___STick_dz6pc_gg_",
22
+ "__SGrid": "___SGrid_dz6pc_gg_",
23
+ "__STitle": "___STitle_dz6pc_gg_",
24
+ "--transform-origin": "--transform-origin_dz6pc",
25
+ "_position_top": "_position_top_dz6pc_gg_",
26
+ "_position_bottom": "_position_bottom_dz6pc_gg_",
27
+ "_position_right": "_position_right_dz6pc_gg_",
28
+ "_position_left": "_position_left_dz6pc_gg_",
29
+ "_verticalWritingMode": "__verticalWritingMode_dz6pc_gg_",
30
+ "_position_custom_0": "_position_custom_0_dz6pc_gg_",
31
+ "_position_custom_1": "_position_custom_1_dz6pc_gg_"
32
32
  });
33
33
  import { scaleOfBandwidth } from './utils';
34
34
  var CUSTOM_0 = Symbol('custom_0');
package/lib/es6/Bar.js CHANGED
@@ -16,24 +16,24 @@ import AnimatedClipPath from './AnimatedClipPath';
16
16
  import createElement from './createElement';
17
17
  import { PatternFill } from './Pattern';
18
18
  /*!__reshadow-styles__:"./style/bar.shadow.css"*/
19
- var style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SBar_1l8nu_gg_{fill:var(--intergalactic-chart-palette-order-1, #2bb3ff);transition-property:height,width,y;transition-duration:var(--duration_1l8nu);transition-timing-function:ease-in-out}.___SBar_1l8nu_gg_.__color_1l8nu_gg_{fill:var(--color_1l8nu)}.___SBar_1l8nu_gg_.__pattern_1l8nu_gg_.__color_1l8nu_gg_{fill:var(--pattern_1l8nu);stroke:var(--color_1l8nu);stroke-width:1px}.___SBar_1l8nu_gg_.__hide_1l8nu_gg_{display:none}.___SBar_1l8nu_gg_.__transparent_1l8nu_gg_{opacity:.3}.___SBackground_1l8nu_gg_.__onClick_1l8nu_gg_,.___SBar_1l8nu_gg_.__onClick_1l8nu_gg_{cursor:pointer}.___SBackground_1l8nu_gg_{fill:var(--intergalactic-chart-grid-bar-chart-base-bg, #e0e1e9)}.___SBarAnnotation_1l8nu_gg_{display:flex;justify-content:space-between}.___SBarLabel_1l8nu_gg_{color:var(--intergalactic-text-primary, #191b23);margin-right:auto}.___SBarLabel_1l8nu_gg_,.___SBarPercent_1l8nu_gg_,.___SBarValue_1l8nu_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%)}.___SBarPercent_1l8nu_gg_{color:var(--intergalactic-text-secondary, #6c6e79);margin-right:var(--intergalactic-spacing-2x, 8px)}.___SBarValue_1l8nu_gg_{min-width:52px;display:flex;justify-content:flex-end;color:var(--intergalactic-text-primary, #191b23);text-align:right}.___SCompactHorizontalBarHoverRect_1l8nu_gg_{fill:var(--intergalactic-chart-grid-bar-chart-hover, rgba(196, 199, 207, 0.3))}", /*__inner_css_end__*/"1l8nu_gg_"),
19
+ var style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SBar_1ex5k_gg_{fill:var(--intergalactic-chart-palette-order-1, #2bb3ff);transition-property:height,width,y;transition-duration:var(--duration_1ex5k);transition-timing-function:ease-in-out}.___SBar_1ex5k_gg_.__color_1ex5k_gg_{fill:var(--color_1ex5k)}.___SBar_1ex5k_gg_.__pattern_1ex5k_gg_.__color_1ex5k_gg_{fill:var(--pattern_1ex5k);stroke:var(--color_1ex5k);stroke-width:1px}.___SBar_1ex5k_gg_.__hide_1ex5k_gg_{display:none}.___SBar_1ex5k_gg_.__transparent_1ex5k_gg_{opacity:.3}.___SBackground_1ex5k_gg_.__onClick_1ex5k_gg_,.___SBar_1ex5k_gg_.__onClick_1ex5k_gg_{cursor:pointer}.___SBackground_1ex5k_gg_{fill:var(--intergalactic-chart-grid-bar-chart-base-bg, #e0e1e9)}.___SBarAnnotation_1ex5k_gg_{display:flex;justify-content:space-between}.___SBarLabel_1ex5k_gg_{color:var(--intergalactic-text-primary, #191b23);margin-right:auto}.___SBarLabel_1ex5k_gg_,.___SBarPercent_1ex5k_gg_,.___SBarValue_1ex5k_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%)}.___SBarPercent_1ex5k_gg_{color:var(--intergalactic-text-secondary, #6c6e79);margin-right:var(--intergalactic-spacing-2x, 8px)}.___SBarValue_1ex5k_gg_{min-width:52px;display:flex;justify-content:flex-end;color:var(--intergalactic-text-primary, #191b23);text-align:right}.___SCompactHorizontalBarHoverRect_1ex5k_gg_{fill:var(--intergalactic-chart-grid-bar-chart-hover, rgba(196, 199, 207, 0.3))}", /*__inner_css_end__*/"1ex5k_gg_"),
20
20
  /*__reshadow_css_end__*/
21
21
  {
22
- "__SBar": "___SBar_1l8nu_gg_",
23
- "--duration": "--duration_1l8nu",
24
- "_color": "__color_1l8nu_gg_",
25
- "--color": "--color_1l8nu",
26
- "_pattern": "__pattern_1l8nu_gg_",
27
- "--pattern": "--pattern_1l8nu",
28
- "_hide": "__hide_1l8nu_gg_",
29
- "_transparent": "__transparent_1l8nu_gg_",
30
- "_onClick": "__onClick_1l8nu_gg_",
31
- "__SBackground": "___SBackground_1l8nu_gg_",
32
- "__SBarAnnotation": "___SBarAnnotation_1l8nu_gg_",
33
- "__SBarLabel": "___SBarLabel_1l8nu_gg_",
34
- "__SBarPercent": "___SBarPercent_1l8nu_gg_",
35
- "__SBarValue": "___SBarValue_1l8nu_gg_",
36
- "__SCompactHorizontalBarHoverRect": "___SCompactHorizontalBarHoverRect_1l8nu_gg_"
22
+ "__SBar": "___SBar_1ex5k_gg_",
23
+ "--duration": "--duration_1ex5k",
24
+ "_color": "__color_1ex5k_gg_",
25
+ "--color": "--color_1ex5k",
26
+ "_pattern": "__pattern_1ex5k_gg_",
27
+ "--pattern": "--pattern_1ex5k",
28
+ "_hide": "__hide_1ex5k_gg_",
29
+ "_transparent": "__transparent_1ex5k_gg_",
30
+ "_onClick": "__onClick_1ex5k_gg_",
31
+ "__SBackground": "___SBackground_1ex5k_gg_",
32
+ "__SBarAnnotation": "___SBarAnnotation_1ex5k_gg_",
33
+ "__SBarLabel": "___SBarLabel_1ex5k_gg_",
34
+ "__SBarPercent": "___SBarPercent_1ex5k_gg_",
35
+ "__SBarValue": "___SBarValue_1ex5k_gg_",
36
+ "__SCompactHorizontalBarHoverRect": "___SCompactHorizontalBarHoverRect_1ex5k_gg_"
37
37
  });
38
38
  import { scaleToBand, roundedPath } from './utils';
39
39
  export var MIN_HEIGHT = 2;
package/lib/es6/Bubble.js CHANGED
@@ -19,21 +19,21 @@ import { SvgElement } from './component/SvgElement';
19
19
  import createElement from './createElement';
20
20
  import { PatternFill } from './Pattern';
21
21
  /*!__reshadow-styles__:"./style/bubble.shadow.css"*/
22
- var style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SBubble_148xz_gg_{fill:var(--intergalactic-chart-palette-order-1, #2bb3ff);stroke:var(--intergalactic-chart-grid-border, #ffffff);stroke-width:2px;transition-property:cx,cy;transition-duration:var(--duration_148xz);transition-timing-function:ease-in-out;opacity:.5}@media (hover:hover){.___SBubble_148xz_gg_:hover{opacity:.8}}g._visible_false_148xz_gg_{display:none}.___SBubble_148xz_gg_.__color_148xz_gg_{fill:var(--color_148xz)}.___SBubble_148xz_gg_.__pattern_148xz_gg_.__color_148xz_gg_{fill:var(--pattern_148xz);stroke:var(--color_148xz);stroke-width:1px}.___SBubble_148xz_gg_.__transparent_148xz_gg_{opacity:.3}.___SCenter_148xz_gg_{text-anchor:middle;font-size:calc(var(--intergalactic-fs-100, 12px) - 1px);stroke:var(--intergalactic-chart-palette-order-1, #2bb3ff)}.___SCenter_148xz_gg_.__color_148xz_gg_{stroke:var(--color_148xz)}.___SCenter_148xz_gg_.__transparent_148xz_gg_{opacity:.3}.___SLabel_148xz_gg_{fill:var(--intergalactic-chart-palette-order-1, #2bb3ff)}.___SLabel_148xz_gg_._position_right_148xz_gg_{text-anchor:end}.___SLabel_148xz_gg_._position_left_148xz_gg_{text-anchor:start}.___SLabel_148xz_gg_.__color_148xz_gg_{fill:var(--color_148xz)}.___SLabel_148xz_gg_.__transparent_148xz_gg_{opacity:.3}", /*__inner_css_end__*/"148xz_gg_"),
22
+ var style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SBubble_1u1zs_gg_{fill:var(--intergalactic-chart-palette-order-1, #2bb3ff);stroke:var(--intergalactic-chart-grid-border, #ffffff);stroke-width:2px;transition-property:cx,cy;transition-duration:var(--duration_1u1zs);transition-timing-function:ease-in-out;opacity:.5}@media (hover:hover){.___SBubble_1u1zs_gg_:hover{opacity:.8}}g._visible_false_1u1zs_gg_{display:none}.___SBubble_1u1zs_gg_.__color_1u1zs_gg_{fill:var(--color_1u1zs)}.___SBubble_1u1zs_gg_.__pattern_1u1zs_gg_.__color_1u1zs_gg_{fill:var(--pattern_1u1zs);stroke:var(--color_1u1zs);stroke-width:1px}.___SBubble_1u1zs_gg_.__transparent_1u1zs_gg_{opacity:.3}.___SCenter_1u1zs_gg_{text-anchor:middle;font-size:calc(var(--intergalactic-fs-100, 12px) - 1px);stroke:var(--intergalactic-chart-palette-order-1, #2bb3ff)}.___SCenter_1u1zs_gg_.__color_1u1zs_gg_{stroke:var(--color_1u1zs)}.___SCenter_1u1zs_gg_.__transparent_1u1zs_gg_{opacity:.3}.___SLabel_1u1zs_gg_{fill:var(--intergalactic-chart-palette-order-1, #2bb3ff)}.___SLabel_1u1zs_gg_._position_right_1u1zs_gg_{text-anchor:end}.___SLabel_1u1zs_gg_._position_left_1u1zs_gg_{text-anchor:start}.___SLabel_1u1zs_gg_.__color_1u1zs_gg_{fill:var(--color_1u1zs)}.___SLabel_1u1zs_gg_.__transparent_1u1zs_gg_{opacity:.3}", /*__inner_css_end__*/"1u1zs_gg_"),
23
23
  /*__reshadow_css_end__*/
24
24
  {
25
- "_visible_false": "_visible_false_148xz_gg_",
26
- "__SBubble": "___SBubble_148xz_gg_",
27
- "_color": "__color_148xz_gg_",
28
- "--color": "--color_148xz",
29
- "_pattern": "__pattern_148xz_gg_",
30
- "--pattern": "--pattern_148xz",
31
- "_transparent": "__transparent_148xz_gg_",
32
- "__SCenter": "___SCenter_148xz_gg_",
33
- "__SLabel": "___SLabel_148xz_gg_",
34
- "_position_right": "_position_right_148xz_gg_",
35
- "_position_left": "_position_left_148xz_gg_",
36
- "--duration": "--duration_148xz"
25
+ "_visible_false": "_visible_false_1u1zs_gg_",
26
+ "__SBubble": "___SBubble_1u1zs_gg_",
27
+ "_color": "__color_1u1zs_gg_",
28
+ "--color": "--color_1u1zs",
29
+ "_pattern": "__pattern_1u1zs_gg_",
30
+ "--pattern": "--pattern_1u1zs",
31
+ "_transparent": "__transparent_1u1zs_gg_",
32
+ "__SCenter": "___SCenter_1u1zs_gg_",
33
+ "__SLabel": "___SLabel_1u1zs_gg_",
34
+ "_position_right": "_position_right_1u1zs_gg_",
35
+ "_position_left": "_position_left_1u1zs_gg_",
36
+ "--duration": "--duration_1u1zs"
37
37
  });
38
38
  import Tooltip from './Tooltip';
39
39
  import { getBubbleChartValueScale, measureText } from './utils';
@@ -25,24 +25,24 @@ import AnimatedClipPath from './AnimatedClipPath';
25
25
  import createElement from './createElement';
26
26
  import { PatternFill } from './Pattern';
27
27
  /*!__reshadow-styles__:"./style/bar.shadow.css"*/
28
- var style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SBar_1l8nu_gg_{fill:var(--intergalactic-chart-palette-order-1, #2bb3ff);transition-property:height,width,y;transition-duration:var(--duration_1l8nu);transition-timing-function:ease-in-out}.___SBar_1l8nu_gg_.__color_1l8nu_gg_{fill:var(--color_1l8nu)}.___SBar_1l8nu_gg_.__pattern_1l8nu_gg_.__color_1l8nu_gg_{fill:var(--pattern_1l8nu);stroke:var(--color_1l8nu);stroke-width:1px}.___SBar_1l8nu_gg_.__hide_1l8nu_gg_{display:none}.___SBar_1l8nu_gg_.__transparent_1l8nu_gg_{opacity:.3}.___SBackground_1l8nu_gg_.__onClick_1l8nu_gg_,.___SBar_1l8nu_gg_.__onClick_1l8nu_gg_{cursor:pointer}.___SBackground_1l8nu_gg_{fill:var(--intergalactic-chart-grid-bar-chart-base-bg, #e0e1e9)}.___SBarAnnotation_1l8nu_gg_{display:flex;justify-content:space-between}.___SBarLabel_1l8nu_gg_{color:var(--intergalactic-text-primary, #191b23);margin-right:auto}.___SBarLabel_1l8nu_gg_,.___SBarPercent_1l8nu_gg_,.___SBarValue_1l8nu_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%)}.___SBarPercent_1l8nu_gg_{color:var(--intergalactic-text-secondary, #6c6e79);margin-right:var(--intergalactic-spacing-2x, 8px)}.___SBarValue_1l8nu_gg_{min-width:52px;display:flex;justify-content:flex-end;color:var(--intergalactic-text-primary, #191b23);text-align:right}.___SCompactHorizontalBarHoverRect_1l8nu_gg_{fill:var(--intergalactic-chart-grid-bar-chart-hover, rgba(196, 199, 207, 0.3))}", /*__inner_css_end__*/"1l8nu_gg_"),
28
+ var style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SBar_1ex5k_gg_{fill:var(--intergalactic-chart-palette-order-1, #2bb3ff);transition-property:height,width,y;transition-duration:var(--duration_1ex5k);transition-timing-function:ease-in-out}.___SBar_1ex5k_gg_.__color_1ex5k_gg_{fill:var(--color_1ex5k)}.___SBar_1ex5k_gg_.__pattern_1ex5k_gg_.__color_1ex5k_gg_{fill:var(--pattern_1ex5k);stroke:var(--color_1ex5k);stroke-width:1px}.___SBar_1ex5k_gg_.__hide_1ex5k_gg_{display:none}.___SBar_1ex5k_gg_.__transparent_1ex5k_gg_{opacity:.3}.___SBackground_1ex5k_gg_.__onClick_1ex5k_gg_,.___SBar_1ex5k_gg_.__onClick_1ex5k_gg_{cursor:pointer}.___SBackground_1ex5k_gg_{fill:var(--intergalactic-chart-grid-bar-chart-base-bg, #e0e1e9)}.___SBarAnnotation_1ex5k_gg_{display:flex;justify-content:space-between}.___SBarLabel_1ex5k_gg_{color:var(--intergalactic-text-primary, #191b23);margin-right:auto}.___SBarLabel_1ex5k_gg_,.___SBarPercent_1ex5k_gg_,.___SBarValue_1ex5k_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%)}.___SBarPercent_1ex5k_gg_{color:var(--intergalactic-text-secondary, #6c6e79);margin-right:var(--intergalactic-spacing-2x, 8px)}.___SBarValue_1ex5k_gg_{min-width:52px;display:flex;justify-content:flex-end;color:var(--intergalactic-text-primary, #191b23);text-align:right}.___SCompactHorizontalBarHoverRect_1ex5k_gg_{fill:var(--intergalactic-chart-grid-bar-chart-hover, rgba(196, 199, 207, 0.3))}", /*__inner_css_end__*/"1ex5k_gg_"),
29
29
  /*__reshadow_css_end__*/
30
30
  {
31
- "__SBar": "___SBar_1l8nu_gg_",
32
- "--duration": "--duration_1l8nu",
33
- "_color": "__color_1l8nu_gg_",
34
- "--color": "--color_1l8nu",
35
- "_pattern": "__pattern_1l8nu_gg_",
36
- "--pattern": "--pattern_1l8nu",
37
- "_hide": "__hide_1l8nu_gg_",
38
- "_transparent": "__transparent_1l8nu_gg_",
39
- "_onClick": "__onClick_1l8nu_gg_",
40
- "__SBackground": "___SBackground_1l8nu_gg_",
41
- "__SBarAnnotation": "___SBarAnnotation_1l8nu_gg_",
42
- "__SBarLabel": "___SBarLabel_1l8nu_gg_",
43
- "__SBarPercent": "___SBarPercent_1l8nu_gg_",
44
- "__SBarValue": "___SBarValue_1l8nu_gg_",
45
- "__SCompactHorizontalBarHoverRect": "___SCompactHorizontalBarHoverRect_1l8nu_gg_"
31
+ "__SBar": "___SBar_1ex5k_gg_",
32
+ "--duration": "--duration_1ex5k",
33
+ "_color": "__color_1ex5k_gg_",
34
+ "--color": "--color_1ex5k",
35
+ "_pattern": "__pattern_1ex5k_gg_",
36
+ "--pattern": "--pattern_1ex5k",
37
+ "_hide": "__hide_1ex5k_gg_",
38
+ "_transparent": "__transparent_1ex5k_gg_",
39
+ "_onClick": "__onClick_1ex5k_gg_",
40
+ "__SBackground": "___SBackground_1ex5k_gg_",
41
+ "__SBarAnnotation": "___SBarAnnotation_1ex5k_gg_",
42
+ "__SBarLabel": "___SBarLabel_1ex5k_gg_",
43
+ "__SBarPercent": "___SBarPercent_1ex5k_gg_",
44
+ "__SBarValue": "___SBarValue_1ex5k_gg_",
45
+ "__SCompactHorizontalBarHoverRect": "___SCompactHorizontalBarHoverRect_1ex5k_gg_"
46
46
  });
47
47
  import Tooltip from './Tooltip';
48
48
  import { roundedPath, scaleToBand, eventToPoint } from './utils';