Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@gravity-ui/chartkit

Package Overview
Dependencies
Maintainers
3
Versions
183
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gravity-ui/chartkit - npm Package Compare versions

Comparing version 2.1.0 to 2.2.0

6

build/plugins/highcharts/mocks/line.js

@@ -92,2 +92,8 @@ export const data = {

normalizeSub: false,
manageTooltipConfig: (config) => {
config.lines.forEach((line, index) => {
line.commentText = `Some comment ${index + 1}`;
});
return config;
},
},

@@ -94,0 +100,0 @@ libraryConfig: {

3

build/plugins/highcharts/renderer/components/HighchartsComponent.d.ts

@@ -490,2 +490,5 @@ import React from 'react';

};
events: {
setExtremes: () => void;
};
};

@@ -492,0 +495,0 @@ yAxis: {

@@ -568,2 +568,5 @@ export function synchronizeTooltipTablesCellsWidth(tooltipContainer: any, isMobile: any): false | undefined;

};
events: {
setExtremes: () => void;
};
};

@@ -570,0 +573,0 @@ yAxis: {

@@ -484,2 +484,5 @@ import type { ChartKitHolidays } from '../../../../types';

};
events: {
setExtremes: () => void;
};
};

@@ -486,0 +489,0 @@ yAxis: {

14

build/plugins/highcharts/renderer/helpers/highcharts/highcharts.js

@@ -34,7 +34,11 @@ /* eslint-disable complexity */

theme: {
width: 16,
height: 16,
r: 6,
width: 12,
height: 12,
'text-align': 'center',
opacity: '0.8',
cursor: 'pointer',
style: {
fontSize: '20px',
},
},

@@ -227,3 +231,3 @@ position: {

if (this.lastVisibleRowIndex) {
this.lastVisibleRowIndex = null;
this.lastVisibleRowIndex = undefined;
}

@@ -262,3 +266,3 @@ if (this.scrollHandler && !this.fixed) {

if (isFixation) {
this.lastVisibleRowIndex = null;
this.lastVisibleRowIndex = undefined;
}

@@ -298,3 +302,3 @@ proceed.apply(this, [points, ...rest]);

const rows = tooltipNode.querySelectorAll(`.${TOOLTIP_LIST_CLASS_NAME} .${TOOLTIP_ROW_CLASS_NAME}`);
let lastVisibleRowIndex = null;
let lastVisibleRowIndex;
const selectedSeriesIndex = this.chart.hoverPoints.indexOf(this.chart.hoverPoint);

@@ -301,0 +305,0 @@ const rowForSelectedSeriesHeight = selectedSeriesIndex >= 0

@@ -163,3 +163,4 @@ /* eslint-disable complexity */

isSelectedLine: true,
allowComment: selectedLineIndex > tooltip.lastVisibleRowIndex,
allowComment: typeof tooltip.lastVisibleRowIndex === 'number' &&
selectedLineIndex > tooltip.lastVisibleRowIndex,
};

@@ -166,0 +167,0 @@ // @ts-ignore

import type { Highcharts } from './lib';
import type { HighchartsComment } from './comments';
import type { DrillDownConfig, StringParams } from './misc';
import type { TooltipData, TooltipLine } from '../renderer/helpers/tooltip/types';
export declare type CkHighchartsSeriesOptionsType = Highcharts.SeriesOptionsType & {

@@ -9,2 +10,22 @@ title?: string;

};
export declare type HighchartsManageTooltipConfigOptions = {
count: number;
lines: TooltipLine[];
shared: boolean;
this: {
x: string;
y: number;
points: Highcharts.Point[];
};
activeRowAlwaysFirstInTooltip?: boolean;
hiddenRowsNumber?: number;
hiddenRowsSum?: string;
splitTooltip?: boolean;
tooltipHeader?: string;
unsafe?: boolean;
useCompareFrom?: boolean;
withPercent?: boolean;
xComments?: TooltipData['xComments'];
};
export declare type HighchartsManageTooltipConfig = (options: HighchartsManageTooltipConfigOptions, chart: Highcharts.Chart) => HighchartsManageTooltipConfigOptions;
export declare type HighchartsWidgetData = {

@@ -62,2 +83,6 @@ data: (CkHighchartsSeriesOptionsType[] | {

unsafe?: boolean;
/**
* Used to modify tooltip data
*/
manageTooltipConfig?: HighchartsManageTooltipConfig;
};

@@ -64,0 +89,0 @@ libraryConfig: Highcharts.Options;

# Changelog
## [2.2.0](https://github.com/gravity-ui/chartkit/compare/v2.1.0...v2.2.0) (2023-03-21)
### Features
* **Higcharts plugin:** add type for manageTooltipConfig ([#139](https://github.com/gravity-ui/chartkit/issues/139)) ([f781cca](https://github.com/gravity-ui/chartkit/commit/f781cca112bb1e87607d24916aa38bf44fe2abf6))
### Bug Fixes
* **Highcharts:** fix resetZoomButton styles ([#137](https://github.com/gravity-ui/chartkit/issues/137)) ([07f610e](https://github.com/gravity-ui/chartkit/commit/07f610e443f2c9a2543ac68bbff443112a1d650a))
## [2.1.0](https://github.com/gravity-ui/chartkit/compare/v2.0.0...v2.1.0) (2023-03-13)

@@ -4,0 +16,0 @@

{
"name": "@gravity-ui/chartkit",
"version": "2.1.0",
"version": "2.2.0",
"description": "React component used to render charts based on any sources you need",

@@ -5,0 +5,0 @@ "license": "MIT",

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc