@oliasoft-open-source/charts-library 5.14.0-beta-2 → 5.14.1-beta-1

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/dist/index.js CHANGED
@@ -39028,6 +39028,9 @@ var getBarChartToolTips = (options) => {
39028
39028
  };
39029
39029
  //#endregion
39030
39030
  //#region src/components/bar-chart/utils/use-bar-chart-options.ts
39031
+ var getBarChartAnimation = (performanceMode) => {
39032
+ return performanceMode ? false : { duration: ANIMATION_DURATION.FAST };
39033
+ };
39031
39034
  var useBarChartOptions = ({ chart, chartRef }) => {
39032
39035
  const { options } = chart;
39033
39036
  const { chartStyling, dragData } = options;
@@ -39043,7 +39046,7 @@ var useBarChartOptions = ({ chart, chartRef }) => {
39043
39046
  onHover,
39044
39047
  indexAxis: isVertical(options.direction) ? AxisType.X : AxisType.Y,
39045
39048
  maintainAspectRatio: chartStyling.maintainAspectRatio,
39046
- animation: chartStyling.performanceMode && { duration: ANIMATION_DURATION.FAST },
39049
+ animation: getBarChartAnimation(chartStyling.performanceMode),
39047
39050
  hover: {
39048
39051
  mode: ChartHoverMode.Nearest,
39049
39052
  intersect: true
@@ -1,19 +1,18 @@
1
1
  import { MutableRefObject } from 'react';
2
- import { Chart } from 'chart.js';
2
+ import { AnimationSpec, Chart } from 'chart.js';
3
3
  import { AxisType, ChartHoverMode } from '../../common/enums';
4
4
  import { IBarDefaultProps } from '../bar-chart.interface';
5
5
  export interface IUseBarChartOptionsProps {
6
6
  chart: IBarDefaultProps;
7
7
  chartRef: MutableRefObject<Chart | null>;
8
8
  }
9
+ export declare const getBarChartAnimation: (performanceMode?: boolean) => false | Partial<AnimationSpec<"bar">>;
9
10
  export declare const useBarChartOptions: ({ chart, chartRef, }: IUseBarChartOptionsProps) => {
10
11
  onClick: (_evt: import('chart.js').ChartEvent, _elements: import('chart.js').ActiveElement[], chartInstance: Chart) => void;
11
12
  onHover: (evt: import('chart.js').ChartEvent, hoveredItems: import('../../common/common.interface').ICommonHoveredItems[]) => void;
12
13
  indexAxis: AxisType;
13
14
  maintainAspectRatio: boolean | undefined;
14
- animation: false | {
15
- duration: number;
16
- } | undefined;
15
+ animation: false | Partial<AnimationSpec<"bar">>;
17
16
  hover: {
18
17
  mode: ChartHoverMode;
19
18
  intersect: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oliasoft-open-source/charts-library",
3
- "version": "5.14.0-beta-2",
3
+ "version": "5.14.1-beta-1",
4
4
  "description": "React Chart Library (based on Chart.js and react-chart-js-2)",
5
5
  "homepage": "https://gitlab.com/oliasoft-open-source/charts-library",
6
6
  "bugs": {