@trackunit/react-chart-components 0.0.71 → 0.0.73

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/index.cjs CHANGED
@@ -96636,7 +96636,7 @@ var EChartsReact = /** @class */ (function (_super) {
96636
96636
  * @param {ChartProps} props - The props for the Chart component
96637
96637
  * @returns {JSX.Element} Chart component
96638
96638
  */
96639
- const Chart = ({ options, showLoading, className, style, onChartReady, onClick, onDataZoom, onBrush, onBrushSelected, mouseLeaveChart, mouseMoveChart, merge = true, loadingOption, timezoneLabel, renderer = "canvas", dataTestId, }) => {
96639
+ const Chart = ({ options, showLoading, className, style, onChartReady, onClick, onDataZoom, onBrush, onBrushSelected, mouseLeaveChart, mouseMoveChart, mouseOverChart, merge = true, loadingOption, timezoneLabel, renderer = "canvas", dataTestId, }) => {
96640
96640
  var _a, _b;
96641
96641
  const echartsRef = React__namespace.useRef(null);
96642
96642
  const eventHandlers = React__namespace.useMemo(() => {
@@ -96659,8 +96659,14 @@ const Chart = ({ options, showLoading, className, style, onChartReady, onClick,
96659
96659
  mouseMoveChart(event, (_a = echartsRef === null || echartsRef === void 0 ? void 0 : echartsRef.current) === null || _a === void 0 ? void 0 : _a.getEchartsInstance());
96660
96660
  };
96661
96661
  }
96662
+ if (mouseOverChart !== undefined) {
96663
+ values.mouseOver = (event) => {
96664
+ var _a;
96665
+ mouseOverChart(event, (_a = echartsRef === null || echartsRef === void 0 ? void 0 : echartsRef.current) === null || _a === void 0 ? void 0 : _a.getEchartsInstance());
96666
+ };
96667
+ }
96662
96668
  return values;
96663
- }, [onDataZoom, onBrush, onBrushSelected, mouseLeaveChart, mouseMoveChart]);
96669
+ }, [onDataZoom, onBrush, onBrushSelected, mouseLeaveChart, mouseMoveChart, mouseOverChart]);
96664
96670
  React__namespace.useEffect(() => {
96665
96671
  var _a;
96666
96672
  const instance = (_a = echartsRef === null || echartsRef === void 0 ? void 0 : echartsRef.current) === null || _a === void 0 ? void 0 : _a.getEchartsInstance();
package/index.js CHANGED
@@ -96610,7 +96610,7 @@ var EChartsReact = /** @class */ (function (_super) {
96610
96610
  * @param {ChartProps} props - The props for the Chart component
96611
96611
  * @returns {JSX.Element} Chart component
96612
96612
  */
96613
- const Chart = ({ options, showLoading, className, style, onChartReady, onClick, onDataZoom, onBrush, onBrushSelected, mouseLeaveChart, mouseMoveChart, merge = true, loadingOption, timezoneLabel, renderer = "canvas", dataTestId, }) => {
96613
+ const Chart = ({ options, showLoading, className, style, onChartReady, onClick, onDataZoom, onBrush, onBrushSelected, mouseLeaveChart, mouseMoveChart, mouseOverChart, merge = true, loadingOption, timezoneLabel, renderer = "canvas", dataTestId, }) => {
96614
96614
  var _a, _b;
96615
96615
  const echartsRef = React.useRef(null);
96616
96616
  const eventHandlers = React.useMemo(() => {
@@ -96633,8 +96633,14 @@ const Chart = ({ options, showLoading, className, style, onChartReady, onClick,
96633
96633
  mouseMoveChart(event, (_a = echartsRef === null || echartsRef === void 0 ? void 0 : echartsRef.current) === null || _a === void 0 ? void 0 : _a.getEchartsInstance());
96634
96634
  };
96635
96635
  }
96636
+ if (mouseOverChart !== undefined) {
96637
+ values.mouseOver = (event) => {
96638
+ var _a;
96639
+ mouseOverChart(event, (_a = echartsRef === null || echartsRef === void 0 ? void 0 : echartsRef.current) === null || _a === void 0 ? void 0 : _a.getEchartsInstance());
96640
+ };
96641
+ }
96636
96642
  return values;
96637
- }, [onDataZoom, onBrush, onBrushSelected, mouseLeaveChart, mouseMoveChart]);
96643
+ }, [onDataZoom, onBrush, onBrushSelected, mouseLeaveChart, mouseMoveChart, mouseOverChart]);
96638
96644
  React.useEffect(() => {
96639
96645
  var _a;
96640
96646
  const instance = (_a = echartsRef === null || echartsRef === void 0 ? void 0 : echartsRef.current) === null || _a === void 0 ? void 0 : _a.getEchartsInstance();
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@trackunit/react-chart-components",
3
- "version": "0.0.71",
3
+ "version": "0.0.73",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
7
7
  "node": ">=16.x"
8
8
  },
9
9
  "dependencies": {
10
- "@trackunit/react-components": "0.1.128",
10
+ "@trackunit/react-components": "0.1.129",
11
11
  "@trackunit/tailwind-styled-components": "0.0.58",
12
12
  "@trackunit/ui-design-tokens": "0.0.73",
13
13
  "echarts": "5.4.0",
@@ -37,6 +37,10 @@ export interface ChartProps extends CommonProps {
37
37
  * Event fired when mouse is moving over the chart.
38
38
  */
39
39
  mouseMoveChart?: (event: any, chart: EChartsType | undefined) => void;
40
+ /**
41
+ * Event fired when mouse enters the chart.
42
+ */
43
+ mouseOverChart?: (event: any, chart: EChartsType | undefined) => void;
40
44
  /**
41
45
  * CSS styles for the chart.
42
46
  */
@@ -78,4 +82,4 @@ export interface ChartProps extends CommonProps {
78
82
  * @param {ChartProps} props - The props for the Chart component
79
83
  * @returns {JSX.Element} Chart component
80
84
  */
81
- export declare const Chart: ({ options, showLoading, className, style, onChartReady, onClick, onDataZoom, onBrush, onBrushSelected, mouseLeaveChart, mouseMoveChart, merge, loadingOption, timezoneLabel, renderer, dataTestId, }: ChartProps) => JSX.Element;
85
+ export declare const Chart: ({ options, showLoading, className, style, onChartReady, onClick, onDataZoom, onBrush, onBrushSelected, mouseLeaveChart, mouseMoveChart, mouseOverChart, merge, loadingOption, timezoneLabel, renderer, dataTestId, }: ChartProps) => JSX.Element;