Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: bump major yagr #353

Merged
merged 3 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"dependencies": {
"@bem-react/classname": "^1.6.0",
"@gravity-ui/date-utils": "^1.4.1",
"@gravity-ui/yagr": "^3.11.4",
"@gravity-ui/yagr": "^4.0.0",
"afterframe": "^1.0.2",
"d3": "^7.8.5",
"lodash": "^4.17.21",
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/yagr/renderer/YagrWidget.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import isEmpty from 'lodash/isEmpty';

import YagrComponent, {YagrChartProps, YagrReactRef} from '@gravity-ui/yagr/dist/react';
import YagrComponent, {YagrChartProps, YagrReactRef} from '@gravity-ui/yagr/react';

import {i18n} from '../../../i18n';
import type {ChartKitWidgetRef} from '../../../types';
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/yagr/renderer/useWidgetData.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import {useThemeValue} from '@gravity-ui/uikit';
import type {YagrChartProps} from '@gravity-ui/yagr/dist/react';
import type {YagrChartProps} from '@gravity-ui/yagr/react';
import type {YagrTheme, MinimalValidConfig, YagrWidgetProps} from '../types';
import {shapeYagrConfig} from './utils';

Expand Down
7 changes: 7 additions & 0 deletions src/plugins/yagr/renderer/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,13 @@ export const shapeYagrConfig = (args: ShapeYagrConfigArgs): MinimalValidConfig =
if (args.customTooltip) {
config.tooltip.virtual = true;
}

/**
* @todo remove this on next chartkit major release
* This added to prevent breaking changes in chartkit, while updating yagr@4 which
* has fixed tooltip sorting (@see https://github.com/gravity-ui/yagr/issues/149)
*/
config.tooltip.sort = config.tooltip.sort || ((a, b) => b.rowIdx - a.rowIdx);
}

config.axes = config.axes || {};
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/yagr/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type Yagr from '@gravity-ui/yagr';
import {ChartKitProps} from 'src/types';

export type {default as Yagr} from '@gravity-ui/yagr';
export type {YagrReactRef} from '@gravity-ui/yagr/dist/react';
export type {YagrReactRef} from '@gravity-ui/yagr/react';
export * from '@gravity-ui/yagr/dist/types';

export interface CustomTooltipProps {
Expand Down
Loading