@gravity-ui/chartkit 6.1.1 → 6.1.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.
@@ -7,6 +7,7 @@ import { usePrevious } from '../../../../hooks';
7
7
  import { isScreenOrientationEventType } from '../../../../utils';
8
8
  import { TooltipContent } from './TooltipContent';
9
9
  import { RESIZER_HEIGHT, getVerticalSize, useWithSplitPaneState } from './useWithSplitPaneState';
10
+ const tooltipPaneStyles = { overflow: 'auto' };
10
11
  export function withSplitPane(ChartComponent) {
11
12
  const componentName = getComponentName(ChartComponent);
12
13
  const component = React.forwardRef(function WithSplitPaneComponent(props, _ref) {
@@ -93,7 +94,7 @@ export function withSplitPane(ChartComponent) {
93
94
  }, [handleOrientationChange, handleScreenOrientationChange]);
94
95
  return (React.createElement("div", { ref: containerRef, style: { position: 'relative', height: '100%' } },
95
96
  React.createElement(StyledSplitPane, { allowResize: allowResize, maxSize: maxSize, minSize: minSize, size: size, split: split, onChange: handleSizeChange, paneOneRender: () => (React.createElement(ChartComponent, Object.assign({}, restProps, { ref: chartRef, data: resultData }))), paneTwoRender: () => (React.createElement("div", { ref: tooltipContainerRef },
96
- React.createElement(TooltipContent, { ref: tooltipRef, renderer: resultData.tooltip.renderer }))) })));
97
+ React.createElement(TooltipContent, { ref: tooltipRef, renderer: resultData.tooltip.renderer }))), pane2Style: tooltipPaneStyles })));
97
98
  });
98
99
  component.displayName = `withSplitPane(${componentName})`;
99
100
  return component;
@@ -1,4 +1,5 @@
1
1
  import type { ChartData } from '@gravity-ui/charts';
2
+ export type * from '@gravity-ui/charts';
2
3
  export type D3WidgetData = {
3
4
  data: ChartData;
4
5
  };
@@ -13,6 +13,7 @@ const CHART_SECTION_PERCENTAGE = 0.6;
13
13
  const MIN_TOOLTIP_SECTION_HEIGHT = 62;
14
14
  const seriesTypesNeedsOnlyHoverState = ['line', 'area', 'arearange', 'bubble', 'map'];
15
15
  const deviceWithNavBarHeight = window.innerHeight;
16
+ const tooltipPaneStyles = { overflow: 'auto' };
16
17
  function getPointsForInitialRefresh(chart) {
17
18
  let minX = Infinity;
18
19
  let points = null;
@@ -202,12 +203,12 @@ export const withSplitPane = (ComposedComponent) => {
202
203
  renderHorizontal() {
203
204
  const { paneSize, maxPaneSize, componentKey } = this.state;
204
205
  const thirdOfViewport = window.innerHeight / 3;
205
- return (React.createElement(StyledSplitPane, { split: "horizontal", onChange: this.debouncedHandlePaneChange, minSize: thirdOfViewport, maxSize: maxPaneSize || undefined, size: paneSize, paneOneRender: () => (React.createElement(ComposedComponent, Object.assign({}, this.props, { key: componentKey, ref: this.props.forwardedRef, callback: this.afterCreateCallback }))), paneTwoRender: () => React.createElement("div", { ref: this.tooltipContainerRef }) }));
206
+ return (React.createElement(StyledSplitPane, { split: "horizontal", onChange: this.debouncedHandlePaneChange, minSize: thirdOfViewport, maxSize: maxPaneSize || undefined, size: paneSize, paneOneRender: () => (React.createElement(ComposedComponent, Object.assign({}, this.props, { key: componentKey, ref: this.props.forwardedRef, callback: this.afterCreateCallback }))), paneTwoRender: () => React.createElement("div", { ref: this.tooltipContainerRef }), pane2Style: tooltipPaneStyles }));
206
207
  }
207
208
  renderVertical() {
208
209
  const { componentKey } = this.state;
209
210
  const paneSize = window.innerWidth * CHART_SECTION_PERCENTAGE;
210
- return (React.createElement(StyledSplitPane, { split: "vertical", allowResize: false, size: paneSize, paneOneRender: () => (React.createElement(ComposedComponent, Object.assign({}, this.props, { key: componentKey, ref: this.props.forwardedRef, callback: this.afterCreateCallback }))), paneTwoRender: () => React.createElement("div", { ref: this.tooltipContainerRef }) }));
211
+ return (React.createElement(StyledSplitPane, { split: "vertical", allowResize: false, size: paneSize, paneOneRender: () => (React.createElement(ComposedComponent, Object.assign({}, this.props, { key: componentKey, ref: this.props.forwardedRef, callback: this.afterCreateCallback }))), paneTwoRender: () => React.createElement("div", { ref: this.tooltipContainerRef }), pane2Style: tooltipPaneStyles }));
211
212
  }
212
213
  }
213
214
  return React.forwardRef((props, ref) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/chartkit",
3
- "version": "6.1.1",
3
+ "version": "6.1.2",
4
4
  "description": "React component used to render charts based on any sources you need",
5
5
  "license": "MIT",
6
6
  "repository": "git@github.com:gravity-ui/ChartKit.git",