@oliasoft-open-source/charts-library 3.6.3 → 3.6.5-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.
@@ -4,6 +4,7 @@ interface ILineOptions {
4
4
  onTogglePoints: () => void;
5
5
  pointsEnabled: boolean;
6
6
  translations: Record<string, string>;
7
+ hasCustomOpt: boolean;
7
8
  }
8
- export declare const LineOptions: ({ lineEnabled, onToggleLine, onTogglePoints, pointsEnabled, translations, }: ILineOptions) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const LineOptions: ({ lineEnabled, onToggleLine, onTogglePoints, pointsEnabled, translations, hasCustomOpt, }: ILineOptions) => import("react/jsx-runtime").JSX.Element;
9
10
  export {};
@@ -26,14 +26,6 @@ export declare const useChartFunctions: ({ chartRef, state, options, dispatch, g
26
26
  handleDownload: () => void;
27
27
  handleKeyDown: (evt: any) => void;
28
28
  handleKeyUp: (evt: any) => void;
29
- controlsAxes: {
30
- max?: number | undefined;
31
- min?: number | undefined;
32
- id?: string | undefined;
33
- label?: string | undefined;
34
- unit?: string | import("../line-chart.interface").IUnitOptions | undefined;
35
- axisType?: string | undefined;
36
- }[];
37
29
  controlsAxesLabels: {
38
30
  id: string;
39
31
  label: string;
@@ -1,12 +1,11 @@
1
1
  import { Dispatch, RefObject } from 'react';
2
2
  import { Chart } from 'chart.js';
3
3
  import { IState } from '../state/state.interfaces';
4
- import { ILineChartDataset, ILineChartOptions } from '../line-chart.interface';
4
+ import { ILineChartOptions } from '../line-chart.interface';
5
5
  interface IUseChartState {
6
6
  chartRef: RefObject<Chart>;
7
7
  options: ILineChartOptions;
8
8
  state: IState;
9
- generatedDatasets: ILineChartDataset[];
10
9
  dispatch: Dispatch<any>;
11
10
  persistenceId?: string;
12
11
  }
@@ -20,5 +19,5 @@ interface IUseChartState {
20
19
  * @param dispatch - The dispatch function for state management.
21
20
  * @param persistenceId - The chart persistenceId.
22
21
  */
23
- export declare const useChartState: ({ chartRef, options, state, generatedDatasets, dispatch, persistenceId, }: IUseChartState) => void;
22
+ export declare const useChartState: ({ chartRef, options, state, dispatch, persistenceId, }: IUseChartState) => void;
24
23
  export {};
@@ -1042,6 +1042,38 @@ export namespace PartialRange {
1042
1042
  }
1043
1043
  export { args_38 as args };
1044
1044
  }
1045
+ export function CombiningTypes(args: any): import("react/jsx-runtime").JSX.Element;
1046
+ export namespace CombiningTypes {
1047
+ export namespace args_39 {
1048
+ export namespace chart_37 {
1049
+ export namespace data_19 {
1050
+ const datasets_19: ({
1051
+ label: string;
1052
+ showPoints: boolean;
1053
+ data: {
1054
+ x: number;
1055
+ y: number;
1056
+ }[];
1057
+ showLine?: undefined;
1058
+ } | {
1059
+ label: string;
1060
+ showLine: boolean;
1061
+ data: {
1062
+ x: number;
1063
+ y: number;
1064
+ }[];
1065
+ showPoints?: undefined;
1066
+ })[];
1067
+ export { datasets_19 as datasets };
1068
+ }
1069
+ export { data_19 as data };
1070
+ export namespace options_33 { }
1071
+ export { options_33 as options };
1072
+ }
1073
+ export { chart_37 as chart };
1074
+ }
1075
+ export { args_39 as args };
1076
+ }
1045
1077
  import { LineChart } from './line-chart';
1046
1078
  declare namespace basicChart { }
1047
1079
  declare const customLegendContainerID: "custom-legend-container";
@@ -0,0 +1,15 @@
1
+ type TCustomOptionType = {
2
+ [key: string]: string;
3
+ } | string | string[];
4
+ type TDataType = Record<string, unknown> | Array<any>;
5
+ /**
6
+ * Checks if a single dataset or an array of datasets has a custom option.
7
+ * Iterates through each custom option defined in the customOptions parameter.
8
+ * Returns true if any dataset has any custom option, otherwise returns false.
9
+ *
10
+ * @param {any | any[]} data - The dataset or array of datasets to check.
11
+ * @param {TCustomOptionType} customOptions - The custom options to check for.
12
+ * @returns {boolean} - True if any dataset has any custom option, otherwise false.
13
+ */
14
+ export declare const checkCustomOption: (data: TDataType, customOptions: TCustomOptionType) => boolean;
15
+ export {};
@@ -0,0 +1,4 @@
1
+ export declare enum CUSTOM_OPTION {
2
+ showLine = "showLine",
3
+ showPoints = "showPoints"
4
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oliasoft-open-source/charts-library",
3
- "version": "3.6.3",
3
+ "version": "3.6.5-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
  "resolutions": {