@gravity-ui/chartkit 4.20.1 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/components/ChartKit.css +20 -20
- package/build/components/ChartKit.d.ts +2 -2
- package/build/components/ErrorBoundary/ErrorBoundary.js +1 -1
- package/build/libs/settings/settings.d.ts +1 -1
- package/build/libs/settings/settings.js +1 -1
- package/build/plugins/d3/examples/area/PercentStacking.js +1 -1
- package/build/plugins/d3/examples/area/StackedArea.js +1 -1
- package/build/plugins/d3/examples/combined/LineAndBarX.js +1 -1
- package/build/plugins/d3/examples/pie/DonutWithTotals.js +1 -1
- package/build/plugins/d3/renderer/D3Widget.d.ts +1 -1
- package/build/plugins/d3/renderer/D3Widget.js +1 -1
- package/build/plugins/d3/renderer/components/AxisX.d.ts +1 -1
- package/build/plugins/d3/renderer/components/AxisX.js +2 -2
- package/build/plugins/d3/renderer/components/AxisY.js +1 -1
- package/build/plugins/d3/renderer/components/Chart.js +4 -4
- package/build/plugins/d3/renderer/components/Legend.d.ts +1 -1
- package/build/plugins/d3/renderer/components/Legend.js +2 -2
- package/build/plugins/d3/renderer/components/Tooltip/DefaultContent.js +1 -1
- package/build/plugins/d3/renderer/components/Tooltip/TooltipTriggerArea.js +2 -2
- package/build/plugins/d3/renderer/components/Tooltip/index.js +1 -1
- package/build/plugins/d3/renderer/components/styles.css +1 -1
- package/build/plugins/d3/renderer/hooks/useAxisScales/index.d.ts +1 -1
- package/build/plugins/d3/renderer/hooks/useAxisScales/index.js +2 -2
- package/build/plugins/d3/renderer/hooks/useChartOptions/types.d.ts +1 -1
- package/build/plugins/d3/renderer/hooks/useChartOptions/x-axis.d.ts +1 -1
- package/build/plugins/d3/renderer/hooks/useChartOptions/x-axis.js +1 -1
- package/build/plugins/d3/renderer/hooks/useChartOptions/y-axis.js +2 -2
- package/build/plugins/d3/renderer/hooks/useSeries/index.d.ts +1 -1
- package/build/plugins/d3/renderer/hooks/useSeries/index.js +2 -2
- package/build/plugins/d3/renderer/hooks/useSeries/prepare-area.d.ts +1 -1
- package/build/plugins/d3/renderer/hooks/useSeries/prepare-area.js +1 -1
- package/build/plugins/d3/renderer/hooks/useSeries/prepare-bar-x.js +1 -1
- package/build/plugins/d3/renderer/hooks/useSeries/prepare-bar-y.js +2 -2
- package/build/plugins/d3/renderer/hooks/useSeries/prepare-legend.d.ts +1 -1
- package/build/plugins/d3/renderer/hooks/useSeries/prepare-legend.js +1 -1
- package/build/plugins/d3/renderer/hooks/useSeries/prepare-line.d.ts +1 -1
- package/build/plugins/d3/renderer/hooks/useSeries/prepare-line.js +1 -1
- package/build/plugins/d3/renderer/hooks/useSeries/prepare-pie.js +2 -2
- package/build/plugins/d3/renderer/hooks/useSeries/prepare-scatter.d.ts +1 -1
- package/build/plugins/d3/renderer/hooks/useSeries/prepare-scatter.js +2 -2
- package/build/plugins/d3/renderer/hooks/useSeries/prepareSeries.js +2 -2
- package/build/plugins/d3/renderer/hooks/useSeries/types.d.ts +2 -2
- package/build/plugins/d3/renderer/hooks/useSeries/utils.d.ts +2 -2
- package/build/plugins/d3/renderer/hooks/useSeries/utils.js +1 -1
- package/build/plugins/d3/renderer/hooks/useShapes/area/index.js +2 -2
- package/build/plugins/d3/renderer/hooks/useShapes/area/prepare-data.d.ts +2 -2
- package/build/plugins/d3/renderer/hooks/useShapes/area/prepare-data.js +1 -1
- package/build/plugins/d3/renderer/hooks/useShapes/area/types.d.ts +1 -1
- package/build/plugins/d3/renderer/hooks/useShapes/bar-x/index.js +1 -1
- package/build/plugins/d3/renderer/hooks/useShapes/bar-x/types.d.ts +1 -1
- package/build/plugins/d3/renderer/hooks/useShapes/bar-y/index.js +1 -1
- package/build/plugins/d3/renderer/hooks/useShapes/index.d.ts +6 -6
- package/build/plugins/d3/renderer/hooks/useShapes/index.js +6 -6
- package/build/plugins/d3/renderer/hooks/useShapes/line/index.js +1 -1
- package/build/plugins/d3/renderer/hooks/useShapes/line/prepare-data.d.ts +2 -2
- package/build/plugins/d3/renderer/hooks/useShapes/line/prepare-data.js +1 -1
- package/build/plugins/d3/renderer/hooks/useShapes/line/types.d.ts +2 -2
- package/build/plugins/d3/renderer/hooks/useShapes/marker.d.ts +1 -1
- package/build/plugins/d3/renderer/hooks/useShapes/marker.js +2 -2
- package/build/plugins/d3/renderer/hooks/useShapes/pie/index.js +2 -3
- package/build/plugins/d3/renderer/hooks/useShapes/pie/types.d.ts +2 -2
- package/build/plugins/d3/renderer/hooks/useShapes/pie/utils.js +1 -1
- package/build/plugins/d3/renderer/hooks/useShapes/scatter/index.js +2 -2
- package/build/plugins/d3/renderer/hooks/useShapes/treemap/index.js +1 -1
- package/build/plugins/d3/renderer/hooks/useShapes/utils.d.ts +1 -1
- package/build/plugins/d3/renderer/hooks/useTooltip/index.d.ts +1 -1
- package/build/plugins/d3/renderer/utils/axis-generators/bottom.js +1 -1
- package/build/plugins/d3/renderer/utils/axis.d.ts +1 -1
- package/build/plugins/d3/renderer/utils/index.js +3 -3
- package/build/plugins/d3/renderer/utils/symbol.js +1 -1
- package/build/plugins/d3/renderer/validation/index.js +1 -1
- package/build/plugins/highcharts/renderer/components/HighchartsComponent.d.ts +1 -1
- package/build/plugins/highcharts/renderer/components/HighchartsComponent.js +2 -2
- package/build/plugins/highcharts/renderer/components/HighchartsReact.js +7 -1
- package/build/plugins/highcharts/renderer/components/StyledSplitPane/StyledSplitPane.css +1 -1
- package/build/plugins/highcharts/renderer/helpers/config/config.js +15 -15
- package/build/plugins/highcharts/renderer/helpers/config/handleLegendItemClick.js +1 -1
- package/build/plugins/highcharts/renderer/helpers/config/options.d.ts +98 -98
- package/build/plugins/highcharts/renderer/helpers/config/options.js +1 -1
- package/build/plugins/highcharts/renderer/helpers/config/utils/index.d.ts +39 -10
- package/build/plugins/highcharts/renderer/helpers/graph.css +4 -4
- package/build/plugins/highcharts/renderer/helpers/graph.d.ts +1 -1
- package/build/plugins/highcharts/renderer/helpers/graph.js +2 -2
- package/build/plugins/highcharts/renderer/helpers/highcharts/highcharts.js +2 -2
- package/build/plugins/highcharts/renderer/helpers/prepare-data.js +2 -2
- package/build/plugins/highcharts/renderer/helpers/tooltip/index.js +1 -1
- package/build/plugins/highcharts/renderer/helpers/tooltip/tooltip.css +6 -7
- package/build/plugins/highcharts/types/highcharts-extends.d.ts +1 -0
- package/build/plugins/highcharts/types/widget.d.ts +2 -2
- package/build/plugins/indicator/renderer/IndicatorWidget.css +1 -1
- package/build/plugins/indicator/renderer/IndicatorWidget.js +1 -1
- package/build/plugins/shared/format-number/format-number.d.ts +1 -1
- package/build/plugins/shared/format-number/format-number.js +2 -2
- package/build/plugins/shared/format-number/format-number.test.js +1 -1
- package/build/plugins/yagr/renderer/YagrWidget.css +1 -1
- package/build/plugins/yagr/renderer/YagrWidget.js +5 -3
- package/build/plugins/yagr/renderer/tooltip/tooltip.css +15 -16
- package/build/plugins/yagr/renderer/utils.d.ts +1 -1
- package/build/plugins/yagr/renderer/utils.js +1 -1
- package/build/types/index.d.ts +1 -1
- package/build/types/widget-data/bar-x.d.ts +1 -1
- package/build/types/widget-data/bar-y.d.ts +1 -1
- package/build/types/widget-data/line.d.ts +1 -1
- package/build/types/widget-data/series.d.ts +6 -6
- package/build/types/widget-data/tooltip.d.ts +3 -3
- package/build/types/widget.d.ts +2 -2
- package/package.json +23 -24
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { group } from 'd3';
|
|
3
3
|
import { getOnlyVisibleSeries } from '../../utils';
|
|
4
|
+
import { AreaSeriesShapes } from './area';
|
|
5
|
+
import { prepareAreaData } from './area/prepare-data';
|
|
4
6
|
import { BarXSeriesShapes, prepareBarXData } from './bar-x';
|
|
5
|
-
import {
|
|
7
|
+
import { BarYSeriesShapes, prepareBarYData } from './bar-y';
|
|
8
|
+
import { LineSeriesShapes } from './line';
|
|
9
|
+
import { prepareLineData } from './line/prepare-data';
|
|
6
10
|
import { PieSeriesShapes } from './pie';
|
|
7
11
|
import { preparePieData } from './pie/prepare-data';
|
|
8
|
-
import {
|
|
9
|
-
import { LineSeriesShapes } from './line';
|
|
10
|
-
import { BarYSeriesShapes, prepareBarYData } from './bar-y';
|
|
11
|
-
import { AreaSeriesShapes } from './area';
|
|
12
|
-
import { prepareAreaData } from './area/prepare-data';
|
|
12
|
+
import { ScatterSeriesShape, prepareScatterData } from './scatter';
|
|
13
13
|
import { TreemapSeriesShape } from './treemap';
|
|
14
14
|
import { prepareTreemapData } from './treemap/prepare-data';
|
|
15
15
|
import './styles.css';
|
|
@@ -3,8 +3,8 @@ import { color, line as lineGenerator, select } from 'd3';
|
|
|
3
3
|
import get from 'lodash/get';
|
|
4
4
|
import { block } from '../../../../../../utils/cn';
|
|
5
5
|
import { filterOverlappingLabels } from '../../../utils';
|
|
6
|
-
import { getLineDashArray, setActiveState } from '../utils';
|
|
7
6
|
import { getMarkerHaloVisibility, getMarkerVisibility, renderMarker, selectMarkerHalo, selectMarkerSymbol, setMarker, } from '../marker';
|
|
7
|
+
import { getLineDashArray, setActiveState } from '../utils';
|
|
8
8
|
const b = block('d3-line');
|
|
9
9
|
export const LineSeriesShapes = (args) => {
|
|
10
10
|
const { dispatcher, preparedData, seriesOptions } = args;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { PreparedLineSeries } from '../../useSeries/types';
|
|
2
|
-
import { PreparedAxis } from '../../useChartOptions/types';
|
|
3
1
|
import { ChartScale } from '../../useAxisScales';
|
|
2
|
+
import { PreparedAxis } from '../../useChartOptions/types';
|
|
3
|
+
import { PreparedLineSeries } from '../../useSeries/types';
|
|
4
4
|
import { PreparedLineData } from './types';
|
|
5
5
|
export declare const prepareLineData: (args: {
|
|
6
6
|
series: PreparedLineSeries[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getXValue, getYValue } from '../utils';
|
|
2
1
|
import { getLabelsSize, getLeftPosition } from '../../../utils';
|
|
2
|
+
import { getXValue, getYValue } from '../utils';
|
|
3
3
|
function getLabelData(point, series, xMax) {
|
|
4
4
|
const text = String(point.data.label || point.data.y);
|
|
5
5
|
const style = series.dataLabels.style;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DashStyle, LineCap } from '../../../../../../constants';
|
|
2
2
|
import { LineSeriesData } from '../../../../../../types';
|
|
3
3
|
import { LabelData } from '../../../types';
|
|
4
|
-
import {
|
|
4
|
+
import { PreparedLineSeries } from '../../useSeries/types';
|
|
5
5
|
export type PointData = {
|
|
6
6
|
x: number;
|
|
7
7
|
y: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseType, Selection } from 'd3';
|
|
2
|
-
import { MarkerData as LineMarkerData } from './line/types';
|
|
3
2
|
import { MarkerData as AreaMarkerData } from './area/types';
|
|
3
|
+
import { MarkerData as LineMarkerData } from './line/types';
|
|
4
4
|
import { MarkerData as ScatterMarkerData } from './scatter/types';
|
|
5
5
|
type MarkerData = LineMarkerData | AreaMarkerData | ScatterMarkerData;
|
|
6
6
|
export declare function renderMarker<T extends MarkerData>(selection: Selection<BaseType | SVGGElement, T, SVGGElement, unknown>): Selection<BaseType | SVGGElement, T, SVGGElement, unknown>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { symbol } from 'd3';
|
|
2
|
-
import
|
|
2
|
+
import get from 'lodash/get';
|
|
3
3
|
import { SymbolType } from '../../../../../constants';
|
|
4
|
+
import { block } from '../../../../../utils/cn';
|
|
4
5
|
import { getSymbol } from '../../utils';
|
|
5
|
-
import get from 'lodash/get';
|
|
6
6
|
const b = block('d3-marker');
|
|
7
7
|
const haloClassName = b('halo');
|
|
8
8
|
const symbolClassName = b('symbol');
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { arc, color, line as lineGenerator, pointer, select } from 'd3';
|
|
2
3
|
import get from 'lodash/get';
|
|
3
|
-
import { arc, color, pointer, select } from 'd3';
|
|
4
4
|
import { block } from '../../../../../../utils/cn';
|
|
5
|
-
import { setActiveState } from '../utils';
|
|
6
|
-
import { line as lineGenerator } from 'd3-shape';
|
|
7
5
|
import { setEllipsisForOverflowTexts } from '../../../utils';
|
|
6
|
+
import { setActiveState } from '../utils';
|
|
8
7
|
import { getCurveFactory } from './utils';
|
|
9
8
|
const b = block('d3-pie');
|
|
10
9
|
export function getHaloVisibility(d) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { PieArcDatum } from 'd3';
|
|
2
|
-
import { PreparedPieSeries } from '../../useSeries/types';
|
|
3
|
-
import { LabelData } from '../../../types';
|
|
4
2
|
import { ConnectorCurve } from '../../../../../../types';
|
|
3
|
+
import { LabelData } from '../../../types';
|
|
4
|
+
import { PreparedPieSeries } from '../../useSeries/types';
|
|
5
5
|
export type SegmentData = {
|
|
6
6
|
value: number;
|
|
7
7
|
color: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import get from 'lodash/get';
|
|
3
2
|
import { pointer, select } from 'd3';
|
|
3
|
+
import get from 'lodash/get';
|
|
4
4
|
import { block } from '../../../../../../utils/cn';
|
|
5
|
-
import { setActiveState, shapeKey } from '../utils';
|
|
6
5
|
import { getMarkerHaloVisibility, renderMarker, selectMarkerHalo, selectMarkerSymbol, setMarker, } from '../marker';
|
|
6
|
+
import { setActiveState, shapeKey } from '../utils';
|
|
7
7
|
export { prepareScatterData } from './prepare-data';
|
|
8
8
|
const b = block('d3-scatter');
|
|
9
9
|
export function ScatterSeriesShape(props) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { color, pointer, select } from 'd3';
|
|
3
3
|
import get from 'lodash/get';
|
|
4
|
-
import { setEllipsisForOverflowTexts } from '../../../utils';
|
|
5
4
|
import { block } from '../../../../../../utils/cn';
|
|
5
|
+
import { setEllipsisForOverflowTexts } from '../../../utils';
|
|
6
6
|
const b = block('d3-treemap');
|
|
7
7
|
export const TreemapSeriesShape = (props) => {
|
|
8
8
|
const { dispatcher, preparedData, seriesOptions, svgContainer } = props;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { BaseType } from 'd3';
|
|
2
|
+
import { DashStyle } from '../../../../../constants';
|
|
2
3
|
import type { BasicInactiveState } from '../../../../../types';
|
|
3
4
|
import type { ChartScale } from '../useAxisScales';
|
|
4
5
|
import type { PreparedAxis } from '../useChartOptions/types';
|
|
5
|
-
import { DashStyle } from '../../../../../constants';
|
|
6
6
|
export declare function getXValue(args: {
|
|
7
7
|
point: {
|
|
8
8
|
x?: number | string;
|
|
@@ -7,7 +7,7 @@ type Args = {
|
|
|
7
7
|
tooltip: PreparedTooltip;
|
|
8
8
|
};
|
|
9
9
|
export declare const useTooltip: ({ dispatcher, tooltip }: Args) => {
|
|
10
|
-
hovered: TooltipDataChunk
|
|
10
|
+
hovered: TooltipDataChunk[] | undefined;
|
|
11
11
|
pointerPosition: PointerPosition | undefined;
|
|
12
12
|
};
|
|
13
13
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { select } from 'd3';
|
|
2
2
|
import { getXAxisItems, getXAxisOffset, getXTickPosition } from '../axis';
|
|
3
|
-
import { getLabelsSize, setEllipsisForOverflowText } from '../text';
|
|
4
3
|
import { calculateCos, calculateSin } from '../math';
|
|
4
|
+
import { getLabelsSize, setEllipsisForOverflowText } from '../text';
|
|
5
5
|
function addDomain(selection, options) {
|
|
6
6
|
const { size, color } = options;
|
|
7
7
|
selection
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
+
import { dateTime } from '@gravity-ui/date-utils';
|
|
1
2
|
import { group, select } from 'd3';
|
|
2
3
|
import get from 'lodash/get';
|
|
3
4
|
import isNil from 'lodash/isNil';
|
|
4
|
-
import { dateTime } from '@gravity-ui/date-utils';
|
|
5
5
|
import { formatNumber } from '../../../shared';
|
|
6
|
-
import { DEFAULT_AXIS_LABEL_FONT_SIZE } from '../constants';
|
|
7
6
|
import { getNumberUnitRate } from '../../../shared/format-number/format-number';
|
|
8
|
-
import {
|
|
7
|
+
import { DEFAULT_AXIS_LABEL_FONT_SIZE } from '../constants';
|
|
9
8
|
import { getSeriesStackId } from '../hooks/useSeries/utils';
|
|
9
|
+
import { getDefaultDateFormat } from './time';
|
|
10
10
|
export * from './math';
|
|
11
11
|
export * from './text';
|
|
12
12
|
export * from './time';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { symbolCircle, symbolDiamond2, symbolSquare, symbolTriangle2 } from 'd3';
|
|
2
2
|
import { SymbolType } from '../../../../constants';
|
|
3
3
|
export const getSymbolType = (index) => {
|
|
4
4
|
const scatterStyles = Object.values(SymbolType);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import get from 'lodash/get';
|
|
2
2
|
import isEmpty from 'lodash/isEmpty';
|
|
3
3
|
import { SeriesType } from '../../../../constants';
|
|
4
|
-
import { ChartKitError, CHARTKIT_ERROR_CODE } from '../../../../libs';
|
|
5
4
|
import { i18n } from '../../../../i18n';
|
|
5
|
+
import { CHARTKIT_ERROR_CODE, ChartKitError } from '../../../../libs';
|
|
6
6
|
import { DEFAULT_AXIS_TYPE } from '../constants';
|
|
7
7
|
const AVAILABLE_SERIES_TYPES = Object.values(SeriesType);
|
|
8
8
|
const validateXYSeries = (args) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import Highcharts, { ChartCallbackFunction, Options
|
|
2
|
+
import Highcharts, { Chart, ChartCallbackFunction, Options } from 'highcharts';
|
|
3
3
|
import type { ChartKitProps } from '../../../../types';
|
|
4
4
|
import type { HighchartsWidgetData, StringParams } from '../../types';
|
|
5
5
|
import './HighchartsComponent.css';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Highcharts from 'highcharts';
|
|
3
|
-
import HighchartsReact from './HighchartsReact';
|
|
4
3
|
import get from 'lodash/get';
|
|
5
4
|
import { settings } from '../../../../libs';
|
|
6
5
|
import { settingsEventEmitter } from '../../../../libs/settings/settings';
|
|
7
|
-
import {
|
|
6
|
+
import { getChartPerformanceDuration, getRandomCKId, markChartPerformance } from '../../../../utils';
|
|
8
7
|
import { getGraph } from '../helpers/graph';
|
|
9
8
|
import { initHighchartsLangOptions } from '../helpers/highcharts/highcharts';
|
|
9
|
+
import HighchartsReact from './HighchartsReact';
|
|
10
10
|
import { withSplitPane } from './withSplitPane/withSplitPane';
|
|
11
11
|
import './HighchartsComponent.css';
|
|
12
12
|
const HighcharsReactWithSplitPane = withSplitPane(HighchartsReact);
|
|
@@ -26,7 +26,13 @@ export const HighchartsReact = React.memo(React.forwardRef(function HighchartsRe
|
|
|
26
26
|
if (!chartRef.current) {
|
|
27
27
|
createChart();
|
|
28
28
|
}
|
|
29
|
-
}, [
|
|
29
|
+
}, [
|
|
30
|
+
props.options,
|
|
31
|
+
props.allowChartUpdate,
|
|
32
|
+
props.containerProps,
|
|
33
|
+
props.highcharts,
|
|
34
|
+
props.constructorType,
|
|
35
|
+
]);
|
|
30
36
|
useIsomorphicLayoutEffect(() => {
|
|
31
37
|
return () => {
|
|
32
38
|
if (chartRef.current) {
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
/* eslint new-cap: 0, complexity: 0 */
|
|
2
|
+
import { dateTime } from '@gravity-ui/date-utils';
|
|
2
3
|
import Highcharts from 'highcharts';
|
|
3
|
-
import merge from 'lodash/merge';
|
|
4
|
-
import mergeWith from 'lodash/mergeWith';
|
|
5
|
-
import get from 'lodash/get';
|
|
6
4
|
import clamp from 'lodash/clamp';
|
|
5
|
+
import debounce from 'lodash/debounce';
|
|
6
|
+
import get from 'lodash/get';
|
|
7
7
|
import isEmpty from 'lodash/isEmpty';
|
|
8
8
|
import isNumber from 'lodash/isNumber';
|
|
9
|
-
import
|
|
9
|
+
import merge from 'lodash/merge';
|
|
10
|
+
import mergeWith from 'lodash/mergeWith';
|
|
10
11
|
import pick from 'lodash/pick';
|
|
11
|
-
import
|
|
12
|
-
import { dateTime } from '@gravity-ui/date-utils';
|
|
12
|
+
import throttle from 'lodash/throttle';
|
|
13
13
|
import { i18n } from '../../../../../i18n';
|
|
14
|
-
import { formatNumber } from '../../../../shared';
|
|
15
14
|
import { block } from '../../../../../utils/cn';
|
|
16
|
-
import {
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import { calculatePrecision, isTooltipShared, isSafari, mergeArrayWithObject, concatStrings, buildNavigatorFallback, addShowInNavigatorToSeries, setNavigatorDefaultPeriod, numberFormat, getFormatOptionsFromLine, checkTooltipPinningAvailability, getSortedData, } from './utils';
|
|
15
|
+
import { formatNumber } from '../../../../shared';
|
|
16
|
+
import { drawComments, drawOnlyRendererComments, getCommentsOnLine, hideComments, } from '../comments/drawing';
|
|
17
|
+
import formatTooltip, { SERIES_NAME_DATA_ATTRIBUTE, TOOLTIP_CONTAINER_CLASS_NAME, TOOLTIP_FOOTER_CLASS_NAME, TOOLTIP_HEADER_CLASS_NAME, TOOLTIP_LIST_CLASS_NAME, TOOLTIP_ROW_CLASS_NAME, TOOLTIP_ROW_NAME_CLASS_NANE, } from '../tooltip';
|
|
20
18
|
import { handleLegendItemClick } from './handleLegendItemClick';
|
|
19
|
+
import defaultOptions from './options';
|
|
20
|
+
import { addShowInNavigatorToSeries, buildNavigatorFallback, calculatePrecision, checkTooltipPinningAvailability, concatStrings, getFormatOptionsFromLine, getSortedData, isSafari, isTooltipShared, mergeArrayWithObject, numberFormat, setNavigatorDefaultPeriod, } from './utils';
|
|
21
21
|
import { getChartKitFormattedValue } from './utils/getChartKitFormattedValue';
|
|
22
22
|
const b = block('tooltip');
|
|
23
23
|
const TOOLTIP_OFFSET_FROM_CURSOR = 15;
|
|
@@ -159,12 +159,12 @@ export function buildLegend(options) {
|
|
|
159
159
|
}
|
|
160
160
|
},
|
|
161
161
|
navigation: {
|
|
162
|
-
activeColor: 'var(--
|
|
163
|
-
inactiveColor: 'var(--
|
|
164
|
-
style: { color: 'var(--
|
|
162
|
+
activeColor: 'var(--g-color-text-brand)',
|
|
163
|
+
inactiveColor: 'var(--g-color-base-generic-accent-disabled)',
|
|
164
|
+
style: { color: 'var(--g-color-text-primary)' },
|
|
165
165
|
},
|
|
166
166
|
title: {
|
|
167
|
-
style: { color: 'var(--
|
|
167
|
+
style: { color: 'var(--g-color-text-secondary)' },
|
|
168
168
|
},
|
|
169
169
|
};
|
|
170
170
|
if (options.outsideLegend) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import Highcharts from 'highcharts';
|
|
1
2
|
import { drawComments, hideComments } from '../comments/drawing';
|
|
2
3
|
import { isNavigatorSeries } from './utils';
|
|
3
|
-
import Highcharts from 'highcharts';
|
|
4
4
|
const getSeriesIdentifier = (item) => {
|
|
5
5
|
if (item instanceof Highcharts.Point) {
|
|
6
6
|
return item.name;
|