@gravity-ui/chartkit 2.6.0 → 2.7.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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.7.0](https://github.com/gravity-ui/chartkit/compare/v2.6.0...v2.7.0) (2023-05-10)
4
+
5
+
6
+ ### Features
7
+
8
+ * **Highcharts plugin:** add config.onSeriesClick property ([#160](https://github.com/gravity-ui/chartkit/issues/160)) ([212ce4b](https://github.com/gravity-ui/chartkit/commit/212ce4b49693ef256ed2e46cb44d863a951020ac))
9
+
3
10
  ## [2.6.0](https://github.com/gravity-ui/chartkit/compare/v2.5.0...v2.6.0) (2023-05-04)
4
11
 
5
12
 
@@ -1255,6 +1255,9 @@ export function prepareConfig(data, options, isMobile, holidays) {
1255
1255
  else {
1256
1256
  fixTooltipOnClick.bind(this)(event, { options });
1257
1257
  }
1258
+ if (options.onSeriesClick) {
1259
+ options.onSeriesClick({ event, series: this });
1260
+ }
1258
1261
  },
1259
1262
  },
1260
1263
  point: {
@@ -79,16 +79,23 @@ export declare type HighchartsWidgetData = {
79
79
  drillDown?: DrillDownConfig;
80
80
  enableSum?: boolean;
81
81
  unsafe?: boolean;
82
- /**
83
- * Used to modify tooltip data
84
- */
85
- manageTooltipConfig?: HighchartsManageTooltipConfig;
86
82
  /**
87
83
  * Tooltip config
88
84
  */
89
85
  tooltip?: {
90
86
  pinable?: boolean;
91
87
  };
88
+ /**
89
+ * Used to modify tooltip data
90
+ */
91
+ manageTooltipConfig?: HighchartsManageTooltipConfig;
92
+ /**
93
+ * Highcharts series click handler
94
+ */
95
+ onSeriesClick?: (args: {
96
+ event: Highcharts.SeriesClickEventObject;
97
+ series: Highcharts.Series;
98
+ }) => void;
92
99
  };
93
100
  libraryConfig: Highcharts.Options;
94
101
  params?: StringParams;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/chartkit",
3
- "version": "2.6.0",
3
+ "version": "2.7.0",
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",