@oliasoft-open-source/charts-library 5.0.0-beta-2 → 5.0.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/dist/assets/Color-6VNJS4EI-DLbcRNMp.js +1 -0
- package/dist/assets/DocsRenderer-NNNQARDV-BOzykHvd.js +1 -0
- package/dist/assets/WithTooltip-V3YHNWJZ-BeePhoIB.js +1 -0
- package/dist/assets/_getPrototype-Bgn98YsR.js +3 -0
- package/dist/assets/{bar-chart.stories-D9mtWCnD.js → bar-chart.stories-BEwhK613.js} +35 -35
- package/dist/assets/chunk-HLWAVYOI-BJEcfeBO.js +364 -0
- package/dist/assets/entry-preview-D8lfu5jc.js +1 -0
- package/dist/assets/entry-preview-docs-CRyh30bF.js +54 -0
- package/dist/assets/formatter-SWP5E3XI-Bj1a9__W.js +156 -0
- package/dist/assets/get-draggableData-DhvAHrT5.js +2 -0
- package/dist/assets/iframe-BurE_SJm.js +8 -0
- package/dist/assets/index-B7LTuyD5.js +1 -0
- package/dist/assets/index-BXzfdmYx.js +24 -0
- package/dist/assets/index-CZvFZgOq.js +9 -0
- package/dist/assets/index-D3eZ-H7s.js +1 -0
- package/dist/assets/index-DrFu-skq.js +6 -0
- package/dist/assets/index-uubelm5h.js +9 -0
- package/dist/assets/isPlainObject-DdO3KXLu.js +1 -0
- package/dist/assets/legend-BWpTckOL.js +278 -0
- package/dist/assets/legend-context-BAQplG-D.js +71 -0
- package/dist/assets/line-chart-L0zq38Nj.js +1 -0
- package/dist/assets/line-chart.stories-CurD8upE.js +1130 -0
- package/dist/assets/{line-chart.test-case.stories-DgfMW1VB.js → line-chart.test-case.stories-Cq5J45Io.js} +2 -2
- package/dist/assets/pie-chart.stories-Duex2I6n.js +45 -0
- package/dist/assets/preview-BBDnT5_b.js +30 -0
- package/dist/assets/preview-D4u66u8a.js +2 -0
- package/dist/assets/preview-FHoZfaOb.js +17 -0
- package/dist/assets/react-18-Xi5cNDBV.js +1 -0
- package/dist/assets/scatter-chart.stories-D0618GGr.js +41 -0
- package/dist/assets/syntaxhighlighter-MJWPISIS-Bmhn3z6A.js +1 -0
- package/dist/bar-chart/bar-chart-const.d.ts +2 -0
- package/dist/bar-chart/bar-chart-default-props.d.ts +2 -0
- package/dist/bar-chart/bar-chart.d.ts +3 -0
- package/dist/bar-chart/bar-chart.interface.d.ts +96 -0
- package/dist/bar-chart/bar-chart.stories.d.ts +807 -0
- package/dist/bar-chart/utils/get-bar-chart-data-labels.d.ts +10 -0
- package/dist/bar-chart/utils/get-bar-chart-scales.d.ts +3 -0
- package/dist/bar-chart/utils/get-bar-chart-tooltips.d.ts +6 -0
- package/dist/bar-chart/utils/use-bar-chart-config.d.ts +13 -0
- package/dist/bar-chart/utils/use-bar-chart-options.d.ts +55 -0
- package/dist/common/common.interface.d.ts +206 -0
- package/dist/common/controls-portal.d.ts +7 -0
- package/dist/common/enums.d.ts +10 -0
- package/dist/common/helpers/chart-border-plugin.d.ts +16 -0
- package/dist/common/helpers/chart-consts.d.ts +39 -0
- package/dist/common/helpers/chart-utils.d.ts +84 -0
- package/dist/common/helpers/container.d.ts +18 -0
- package/dist/common/helpers/custom-format-number.d.ts +1 -0
- package/dist/common/helpers/download-pgn.d.ts +4 -0
- package/dist/common/helpers/enums.d.ts +80 -0
- package/dist/common/helpers/get-chart-annotation.d.ts +90 -0
- package/dist/common/helpers/get-custom-legend-plugin-example.d.ts +8 -0
- package/dist/common/helpers/get-draggableData.d.ts +18 -0
- package/dist/common/helpers/range/estimate-close-values.test.d.ts +1 -0
- package/dist/common/helpers/range/estimate-data-series-have-close-values.d.ts +8 -0
- package/dist/common/helpers/range/range.d.ts +33 -0
- package/dist/common/helpers/range/range.test.d.ts +1 -0
- package/dist/common/helpers/text.d.ts +1 -0
- package/dist/common/helpers/to-annotation.d.ts +4 -0
- package/dist/common/hooks/use-generated-labels.d.ts +4 -0
- package/dist/common/hooks/use-legend-state.d.ts +28 -0
- package/dist/common/hooks/use-legend.d.ts +4 -0
- package/dist/common/hooks/use-reset.d.ts +3 -0
- package/dist/common/legend-component/legend-dropzone.d.ts +3 -0
- package/dist/common/legend-component/legend-interface.d.ts +48 -0
- package/dist/common/legend-component/legend-item/LegendItemLine.d.ts +5 -0
- package/dist/common/legend-component/legend-item/legend-item.d.ts +3 -0
- package/dist/common/legend-component/legend-panel.d.ts +3 -0
- package/dist/common/legend-component/legend.d.ts +3 -0
- package/dist/common/legend-component/state/legend-action-types.d.ts +2 -0
- package/dist/common/legend-component/state/legend-context.d.ts +12 -0
- package/dist/common/legend-component/state/legend-state-reducer.d.ts +26 -0
- package/dist/common/legend-component/utils/create-style-object.d.ts +27 -0
- package/dist/common/legend-component/utils/get-generated-labels.d.ts +2 -0
- package/dist/common/plugins/annotation-dragger-plugin/annotation-dragger-plugin.d.ts +15 -0
- package/dist/common/plugins/annotation-dragger-plugin/enums.d.ts +20 -0
- package/dist/common/plugins/annotation-dragger-plugin/event-helpers.d.ts +6 -0
- package/dist/common/plugins/annotation-dragger-plugin/helpers.d.ts +53 -0
- package/dist/common/plugins/annotation-dragger-plugin/helpers.test.d.ts +1 -0
- package/dist/common/plugins/annotation-dragger-plugin/point-annotation-label.d.ts +5 -0
- package/dist/common/plugins/gradient-background-plugin/enums.d.ts +10 -0
- package/dist/common/plugins/gradient-background-plugin/gradient-background-plugin.d.ts +2 -0
- package/dist/favicon.svg +7 -1
- package/dist/iframe.html +51 -259
- package/dist/index.d.ts +1 -8
- package/dist/index.html +30 -80
- package/dist/index.json +1 -1
- package/dist/line-chart/__tests__/test-data/app-test-case-1.json.d.ts +8733 -0
- package/dist/line-chart/__tests__/test-data/app-test-case-2.json.d.ts +11614 -0
- package/dist/line-chart/__tests__/test-data/app-test-case-3.json.d.ts +34 -0
- package/dist/line-chart/__tests__/test-data/app-test-case-4.json.d.ts +411 -0
- package/dist/line-chart/__tests__/test-data/app-test-case-5.json.d.ts +2734 -0
- package/dist/line-chart/__tests__/test-data/app-test-case-6.json.d.ts +2236 -0
- package/dist/line-chart/constants/default-translations.d.ts +25 -0
- package/dist/line-chart/constants/line-chart-consts.d.ts +13 -0
- package/dist/line-chart/controls/axes-options/action-types.d.ts +5 -0
- package/dist/line-chart/controls/axes-options/axes-options-form-state.d.ts +23 -0
- package/dist/line-chart/controls/axes-options/axes-options-form-state.test.d.ts +1 -0
- package/dist/line-chart/controls/axes-options/axes-options-interfaces.d.ts +54 -0
- package/dist/line-chart/controls/axes-options/axes-options.d.ts +6 -0
- package/dist/line-chart/controls/controls-interfaces.d.ts +20 -0
- package/dist/line-chart/controls/controls.d.ts +6 -0
- package/dist/line-chart/controls/drag-options-interfaces.d.ts +14 -0
- package/dist/line-chart/controls/drag-options.d.ts +23 -0
- package/dist/line-chart/controls/line-options.d.ts +19 -0
- package/dist/line-chart/hooks/use-chart-functions.d.ts +32 -0
- package/dist/line-chart/hooks/use-chart-options.d.ts +16 -0
- package/dist/line-chart/hooks/use-chart-plugins.d.ts +7 -0
- package/dist/line-chart/hooks/use-chart-state.d.ts +17 -0
- package/dist/line-chart/hooks/use-toggle-handler.d.ts +12 -0
- package/dist/line-chart/initialize/config.d.ts +12 -0
- package/dist/line-chart/initialize/initialize-line-chart.d.ts +12 -0
- package/dist/line-chart/initialize/initialize-line-chart.test.d.ts +1 -0
- package/dist/line-chart/line-chart-get-default-props.d.ts +2 -0
- package/dist/line-chart/line-chart.d.ts +3 -0
- package/dist/line-chart/line-chart.interface.d.ts +146 -0
- package/dist/line-chart/line-chart.stories.d.ts +1729 -0
- package/dist/line-chart/line-chart.test-case.stories.d.ts +29 -0
- package/dist/line-chart/plugins/chart-area-text-plugin.d.ts +17 -0
- package/dist/line-chart/plugins/line-chart.minor-gridlines-plugin.d.ts +8 -0
- package/dist/line-chart/plugins/line-chart.minor-gridlines-plugin.test.d.ts +1 -0
- package/dist/line-chart/plugins/plugin-constants.d.ts +11 -0
- package/dist/line-chart/plugins/plugins.interface.d.ts +9 -0
- package/dist/line-chart/state/action-types.d.ts +12 -0
- package/dist/line-chart/state/initial-state.d.ts +14 -0
- package/dist/line-chart/state/line-chart-reducer.d.ts +2 -0
- package/dist/line-chart/state/manage-state-in-local-storage.d.ts +15 -0
- package/dist/line-chart/state/state.interfaces.d.ts +34 -0
- package/dist/line-chart/utils/__tests__/get-annotations-data.test.d.ts +1 -0
- package/dist/line-chart/utils/__tests__/get-axes-data-from-metasets.test.d.ts +1 -0
- package/dist/line-chart/utils/__tests__/get-axes-type-from-key.test.d.ts +1 -0
- package/dist/line-chart/utils/__tests__/get-axis-range-by-type.test.d.ts +1 -0
- package/dist/line-chart/utils/__tests__/get-line-chart-tooltips.test.d.ts +1 -0
- package/dist/line-chart/utils/axis-formatting/axis-formatting.d.ts +2 -0
- package/dist/line-chart/utils/axis-formatting/axis-formatting.test.d.ts +1 -0
- package/dist/line-chart/utils/axis-scales/axis-scales.d.ts +11 -0
- package/dist/line-chart/utils/axis-scales/axis-scales.test.d.ts +1 -0
- package/dist/line-chart/utils/check-custom-option/check-custom-option.d.ts +12 -0
- package/dist/line-chart/utils/check-custom-option/check-custom-option.test.d.ts +1 -0
- package/dist/line-chart/utils/datalabels-alignment/__tests__/get-alignment-condition.test.d.ts +1 -0
- package/dist/line-chart/utils/datalabels-alignment/__tests__/get-alignment-data.test.d.ts +1 -0
- package/dist/line-chart/utils/datalabels-alignment/__tests__/get-datalabels-position.test.d.ts +1 -0
- package/dist/line-chart/utils/datalabels-alignment/datalabels-alignment.interface.d.ts +20 -0
- package/dist/line-chart/utils/datalabels-alignment/get-alignment-condition.d.ts +8 -0
- package/dist/line-chart/utils/datalabels-alignment/get-alignment-data.d.ts +11 -0
- package/dist/line-chart/utils/datalabels-alignment/get-datalabels-position.d.ts +6 -0
- package/dist/line-chart/utils/enums.d.ts +4 -0
- package/dist/line-chart/utils/generate-line-chart-datasets.d.ts +8 -0
- package/dist/line-chart/utils/get-annotations-data.d.ts +1 -0
- package/dist/line-chart/utils/get-axes-data-from-metasets.d.ts +1 -0
- package/dist/line-chart/utils/get-axes-ranges-from-chart.d.ts +9 -0
- package/dist/line-chart/utils/get-axis-range-by-type.d.ts +10 -0
- package/dist/line-chart/utils/get-generated-labels.d.ts +2 -0
- package/dist/line-chart/utils/get-line-chart-data-labels.d.ts +19 -0
- package/dist/line-chart/utils/get-line-chart-scales.d.ts +4 -0
- package/dist/line-chart/utils/get-line-chart-tooltips.d.ts +20 -0
- package/dist/line-chart/utils/line-chart-utils.d.ts +32 -0
- package/dist/line-chart/utils/translations/get-translations.d.ts +8 -0
- package/dist/line-chart/utils/translations/get-translations.test.d.ts +1 -0
- package/dist/pie-chart/pie-chart-defalut-props.interface.d.ts +50 -0
- package/dist/pie-chart/pie-chart-get-default-props.d.ts +3 -0
- package/dist/pie-chart/pie-chart.d.ts +3 -0
- package/dist/pie-chart/pie-chart.interface.d.ts +70 -0
- package/dist/pie-chart/pie-chart.stories.d.ts +263 -0
- package/dist/pie-chart/use-pie-chart-config.d.ts +41 -0
- package/dist/project.json +1 -1
- package/dist/sb-addons/actions-0/manager-bundle.js +3 -0
- package/dist/sb-addons/actions-0/manager-bundle.js.LEGAL.txt +0 -0
- package/dist/sb-addons/storybook-dark-mode-esm-preset-1/manager-bundle.js +5 -0
- package/dist/sb-addons/storybook-dark-mode-esm-preset-1/manager-bundle.js.LEGAL.txt +0 -0
- package/dist/sb-common-assets/fonts.css +31 -0
- package/dist/sb-manager/WithTooltip-V3YHNWJZ-MXTFSDU5.js +1 -0
- package/dist/sb-manager/chunk-5QAFKPS7.js +7 -0
- package/dist/sb-manager/chunk-7PRFHFSS.js +9 -0
- package/dist/sb-manager/chunk-XE6LDGTE.js +406 -0
- package/dist/sb-manager/chunk-YDUB7CS6.js +348 -0
- package/dist/sb-manager/chunk-ZEU7PDD3.js +1 -0
- package/dist/sb-manager/formatter-SWP5E3XI-7BGIK6BL.js +156 -0
- package/dist/sb-manager/globals-module-info.js +1 -1051
- package/dist/sb-manager/globals.js +1 -48
- package/dist/sb-manager/index.js +1 -0
- package/dist/sb-manager/runtime.js +1 -12048
- package/dist/sb-manager/syntaxhighlighter-MJWPISIS-JOSCT6CQ.js +1 -0
- package/dist/sb-preview/globals.js +1 -0
- package/dist/sb-preview/runtime.js +112 -0
- package/dist/scatter-chart/hooks/use-scatter-chart-config.d.ts +113 -0
- package/dist/scatter-chart/scatter-chart-default-props.interface.d.ts +71 -0
- package/dist/scatter-chart/scatter-chart-get-default-props.d.ts +3 -0
- package/dist/scatter-chart/scatter-chart.d.ts +3 -0
- package/dist/scatter-chart/scatter-chart.interface.d.ts +81 -0
- package/dist/scatter-chart/scatter-chart.stories.d.ts +279 -0
- package/dist/scatter-chart/utils/get-scales-config.d.ts +49 -0
- package/dist/scatter-chart/utils/get-tooltip-config.d.ts +21 -0
- package/dist/src/components/bar-chart/bar-chart-const.d.ts +2 -0
- package/dist/src/components/bar-chart/bar-chart-default-props.d.ts +2 -0
- package/dist/src/components/bar-chart/bar-chart.d.ts +3 -0
- package/dist/src/components/bar-chart/bar-chart.interface.d.ts +96 -0
- package/dist/src/components/bar-chart/utils/get-bar-chart-data-labels.d.ts +10 -0
- package/dist/src/components/bar-chart/utils/get-bar-chart-scales.d.ts +3 -0
- package/dist/src/components/bar-chart/utils/get-bar-chart-tooltips.d.ts +6 -0
- package/dist/src/components/bar-chart/utils/use-bar-chart-config.d.ts +13 -0
- package/dist/src/components/bar-chart/utils/use-bar-chart-options.d.ts +55 -0
- package/dist/src/components/common/common.interface.d.ts +206 -0
- package/dist/src/components/common/controls-portal.d.ts +7 -0
- package/dist/src/components/common/enums.d.ts +10 -0
- package/dist/src/components/common/helpers/chart-border-plugin.d.ts +16 -0
- package/dist/src/components/common/helpers/chart-consts.d.ts +39 -0
- package/dist/src/components/common/helpers/chart-utils.d.ts +84 -0
- package/dist/src/components/common/helpers/container.d.ts +18 -0
- package/dist/src/components/common/helpers/custom-format-number.d.ts +1 -0
- package/dist/src/components/common/helpers/download-pgn.d.ts +4 -0
- package/dist/src/components/common/helpers/enums.d.ts +80 -0
- package/dist/src/components/common/helpers/get-chart-annotation.d.ts +90 -0
- package/dist/src/components/common/helpers/get-custom-legend-plugin-example.d.ts +8 -0
- package/dist/src/components/common/helpers/get-draggableData.d.ts +18 -0
- package/dist/src/components/common/helpers/range/estimate-data-series-have-close-values.d.ts +8 -0
- package/dist/src/components/common/helpers/range/range.d.ts +33 -0
- package/dist/src/components/common/helpers/text.d.ts +1 -0
- package/dist/src/components/common/helpers/to-annotation.d.ts +4 -0
- package/dist/src/components/common/hooks/use-generated-labels.d.ts +4 -0
- package/dist/src/components/common/hooks/use-legend-state.d.ts +28 -0
- package/dist/src/components/common/hooks/use-legend.d.ts +4 -0
- package/dist/src/components/common/hooks/use-reset.d.ts +3 -0
- package/dist/src/components/common/legend-component/legend-dropzone.d.ts +3 -0
- package/dist/src/components/common/legend-component/legend-interface.d.ts +48 -0
- package/dist/src/components/common/legend-component/legend-item/LegendItemLine.d.ts +5 -0
- package/dist/src/components/common/legend-component/legend-item/legend-item.d.ts +3 -0
- package/dist/src/components/common/legend-component/legend-panel.d.ts +3 -0
- package/dist/src/components/common/legend-component/legend.d.ts +3 -0
- package/dist/src/components/common/legend-component/state/legend-action-types.d.ts +2 -0
- package/dist/src/components/common/legend-component/state/legend-context.d.ts +12 -0
- package/dist/src/components/common/legend-component/state/legend-state-reducer.d.ts +26 -0
- package/dist/src/components/common/legend-component/utils/create-style-object.d.ts +27 -0
- package/dist/src/components/common/legend-component/utils/get-generated-labels.d.ts +2 -0
- package/dist/src/components/common/plugins/annotation-dragger-plugin/annotation-dragger-plugin.d.ts +15 -0
- package/dist/src/components/common/plugins/annotation-dragger-plugin/enums.d.ts +20 -0
- package/dist/src/components/common/plugins/annotation-dragger-plugin/event-helpers.d.ts +6 -0
- package/dist/src/components/common/plugins/annotation-dragger-plugin/helpers.d.ts +53 -0
- package/dist/src/components/common/plugins/annotation-dragger-plugin/point-annotation-label.d.ts +5 -0
- package/dist/src/components/common/plugins/gradient-background-plugin/enums.d.ts +10 -0
- package/dist/src/components/common/plugins/gradient-background-plugin/gradient-background-plugin.d.ts +2 -0
- package/dist/src/components/line-chart/constants/default-translations.d.ts +25 -0
- package/dist/src/components/line-chart/constants/line-chart-consts.d.ts +13 -0
- package/dist/src/components/line-chart/controls/axes-options/action-types.d.ts +5 -0
- package/dist/src/components/line-chart/controls/axes-options/axes-options-form-state.d.ts +23 -0
- package/dist/src/components/line-chart/controls/axes-options/axes-options-interfaces.d.ts +54 -0
- package/dist/src/components/line-chart/controls/axes-options/axes-options.d.ts +6 -0
- package/dist/src/components/line-chart/controls/controls-interfaces.d.ts +20 -0
- package/dist/src/components/line-chart/controls/controls.d.ts +6 -0
- package/dist/src/components/line-chart/controls/drag-options-interfaces.d.ts +14 -0
- package/dist/src/components/line-chart/controls/drag-options.d.ts +23 -0
- package/dist/src/components/line-chart/controls/line-options.d.ts +19 -0
- package/dist/src/components/line-chart/hooks/use-chart-functions.d.ts +32 -0
- package/dist/src/components/line-chart/hooks/use-chart-options.d.ts +16 -0
- package/dist/src/components/line-chart/hooks/use-chart-plugins.d.ts +7 -0
- package/dist/src/components/line-chart/hooks/use-chart-state.d.ts +17 -0
- package/dist/src/components/line-chart/hooks/use-toggle-handler.d.ts +12 -0
- package/dist/src/components/line-chart/initialize/config.d.ts +12 -0
- package/dist/src/components/line-chart/initialize/initialize-line-chart.d.ts +12 -0
- package/dist/src/components/line-chart/line-chart-get-default-props.d.ts +2 -0
- package/dist/src/components/line-chart/line-chart.d.ts +3 -0
- package/dist/src/components/line-chart/line-chart.interface.d.ts +146 -0
- package/dist/src/components/line-chart/plugins/chart-area-text-plugin.d.ts +17 -0
- package/dist/src/components/line-chart/plugins/line-chart.minor-gridlines-plugin.d.ts +8 -0
- package/dist/src/components/line-chart/plugins/plugin-constants.d.ts +11 -0
- package/dist/src/components/line-chart/plugins/plugins.interface.d.ts +9 -0
- package/dist/src/components/line-chart/state/action-types.d.ts +12 -0
- package/dist/src/components/line-chart/state/initial-state.d.ts +14 -0
- package/dist/src/components/line-chart/state/line-chart-reducer.d.ts +2 -0
- package/dist/src/components/line-chart/state/manage-state-in-local-storage.d.ts +15 -0
- package/dist/src/components/line-chart/state/state.interfaces.d.ts +34 -0
- package/dist/src/components/line-chart/utils/axis-formatting/axis-formatting.d.ts +2 -0
- package/dist/src/components/line-chart/utils/axis-scales/axis-scales.d.ts +11 -0
- package/dist/src/components/line-chart/utils/check-custom-option/check-custom-option.d.ts +12 -0
- package/dist/src/components/line-chart/utils/datalabels-alignment/datalabels-alignment.interface.d.ts +20 -0
- package/dist/src/components/line-chart/utils/datalabels-alignment/get-alignment-condition.d.ts +8 -0
- package/dist/src/components/line-chart/utils/datalabels-alignment/get-alignment-data.d.ts +11 -0
- package/dist/src/components/line-chart/utils/datalabels-alignment/get-datalabels-position.d.ts +6 -0
- package/dist/src/components/line-chart/utils/enums.d.ts +4 -0
- package/dist/src/components/line-chart/utils/generate-line-chart-datasets.d.ts +8 -0
- package/dist/src/components/line-chart/utils/get-annotations-data.d.ts +1 -0
- package/dist/src/components/line-chart/utils/get-axes-data-from-metasets.d.ts +1 -0
- package/dist/src/components/line-chart/utils/get-axes-ranges-from-chart.d.ts +9 -0
- package/dist/src/components/line-chart/utils/get-axis-range-by-type.d.ts +10 -0
- package/dist/src/components/line-chart/utils/get-generated-labels.d.ts +2 -0
- package/dist/src/components/line-chart/utils/get-line-chart-data-labels.d.ts +19 -0
- package/dist/src/components/line-chart/utils/get-line-chart-scales.d.ts +4 -0
- package/dist/src/components/line-chart/utils/get-line-chart-tooltips.d.ts +20 -0
- package/dist/src/components/line-chart/utils/line-chart-utils.d.ts +32 -0
- package/dist/src/components/line-chart/utils/translations/get-translations.d.ts +8 -0
- package/dist/src/components/pie-chart/pie-chart-defalut-props.interface.d.ts +50 -0
- package/dist/src/components/pie-chart/pie-chart-get-default-props.d.ts +3 -0
- package/dist/src/components/pie-chart/pie-chart.d.ts +3 -0
- package/dist/src/components/pie-chart/pie-chart.interface.d.ts +70 -0
- package/dist/src/components/pie-chart/use-pie-chart-config.d.ts +41 -0
- package/dist/src/components/scatter-chart/hooks/use-scatter-chart-config.d.ts +113 -0
- package/dist/src/components/scatter-chart/scatter-chart-default-props.interface.d.ts +71 -0
- package/dist/src/components/scatter-chart/scatter-chart-get-default-props.d.ts +3 -0
- package/dist/src/components/scatter-chart/scatter-chart.d.ts +3 -0
- package/dist/src/components/scatter-chart/scatter-chart.interface.d.ts +81 -0
- package/dist/src/components/scatter-chart/utils/get-scales-config.d.ts +49 -0
- package/dist/src/components/scatter-chart/utils/get-tooltip-config.d.ts +21 -0
- package/dist/stories.json +1 -0
- package/package.json +3 -2
- package/dist/assets/Color-YHDXOIA2-D6i6tiFz.js +0 -1
- package/dist/assets/DocsRenderer-CFRXHY34-D88vu1Xb.js +0 -580
- package/dist/assets/client-9BU5HM4U.js +0 -1
- package/dist/assets/entry-preview-D2XJoWVM.js +0 -10
- package/dist/assets/entry-preview-docs-z3mMcuG4.js +0 -46
- package/dist/assets/get-draggableData-DO0Px5pc.js +0 -2
- package/dist/assets/iframe-DLnw2TiW.js +0 -217
- package/dist/assets/index-B-BONL6g.js +0 -1
- package/dist/assets/index-BGqSdrBK.js +0 -1
- package/dist/assets/index-CVdx34fM.js +0 -1
- package/dist/assets/index-D3-0uUTW.js +0 -24
- package/dist/assets/index-Dytf1aFS.js +0 -8
- package/dist/assets/index-eCxJ45ll.js +0 -9
- package/dist/assets/jsx-runtime-Y5Ju2SGo.js +0 -9
- package/dist/assets/legend-BI53UIaI.js +0 -1346
- package/dist/assets/legend-context-BNCYpFYh.js +0 -68
- package/dist/assets/line-chart-BdFuLh7N.js +0 -1
- package/dist/assets/line-chart.stories-BVsiy8CQ.js +0 -1130
- package/dist/assets/pie-chart.stories-BVurv17M.js +0 -45
- package/dist/assets/preview-CLM2f008.js +0 -2
- package/dist/assets/preview-DD_OYowb.js +0 -1
- package/dist/assets/preview-XObsormK.js +0 -3
- package/dist/assets/react-18-DZY5LW1V.js +0 -1
- package/dist/assets/react-CxVRKATl.js +0 -1
- package/dist/assets/scatter-chart.stories-DnivHhIH.js +0 -41
- package/dist/nunito-sans-bold-italic.woff2 +0 -0
- package/dist/nunito-sans-bold.woff2 +0 -0
- package/dist/nunito-sans-italic.woff2 +0 -0
- package/dist/nunito-sans-regular.woff2 +0 -0
- package/dist/sb-addons/actions-1/manager-bundle.js +0 -3
- package/dist/sb-addons/docs-2/manager-bundle.js +0 -242
- package/dist/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js +0 -3
- package/dist/sb-addons/storybook-dark-mode-esm-preset-3/manager-bundle.js +0 -5
- package/dist/sb-common-assets/favicon.svg +0 -1
- package/dist/sb-manager/globals-runtime.js +0 -41591
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { LineChart } from './line-chart';
|
|
2
|
+
declare namespace _default {
|
|
3
|
+
export let title: string;
|
|
4
|
+
export { LineChart as component };
|
|
5
|
+
export namespace args {
|
|
6
|
+
export { basicChart as chart };
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
export default _default;
|
|
10
|
+
export function TestLegendDropzoneResizing(): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export function PartialRangeWithSimilarValues(): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare namespace basicChart {
|
|
13
|
+
namespace data {
|
|
14
|
+
let datasets: {
|
|
15
|
+
label: string;
|
|
16
|
+
data: {
|
|
17
|
+
x: number;
|
|
18
|
+
y: number;
|
|
19
|
+
}[];
|
|
20
|
+
}[];
|
|
21
|
+
}
|
|
22
|
+
namespace options {
|
|
23
|
+
let title_1: string;
|
|
24
|
+
export { title_1 as title };
|
|
25
|
+
export namespace chartStyling {
|
|
26
|
+
let height: string;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Chart, ChartConfiguration, Plugin } from 'chart.js';
|
|
2
|
+
import { Position } from '../../common/helpers/enums';
|
|
3
|
+
interface CustomChartConfiguration extends ChartConfiguration {
|
|
4
|
+
showLabel?: boolean;
|
|
5
|
+
text: string;
|
|
6
|
+
fontSize: number;
|
|
7
|
+
xOffset: number;
|
|
8
|
+
yOffset: number;
|
|
9
|
+
lineHeight: number;
|
|
10
|
+
maxWidth: number;
|
|
11
|
+
position: Position;
|
|
12
|
+
}
|
|
13
|
+
export declare const chartAreaTextPlugin: {
|
|
14
|
+
id: string;
|
|
15
|
+
beforeDraw: (chart: Chart, _args: Plugin, options: CustomChartConfiguration) => void;
|
|
16
|
+
};
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Chart, Scale } from 'chart.js';
|
|
2
|
+
export declare const getLargestMajorTickWidth: (majorTickPositions: number[]) => number;
|
|
3
|
+
export declare const isValidPosition: (minorTickPosition: number, majorTickPositions: number[], scale: Scale) => boolean;
|
|
4
|
+
export declare const getMinorTickPositions: (majorTickPositions: number[], scale: Scale) => number[];
|
|
5
|
+
export declare const chartMinorGridlinesPlugin: {
|
|
6
|
+
id: string;
|
|
7
|
+
beforeDatasetsDraw: (chart: Chart) => void;
|
|
8
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const TOGGLE_ZOOM = "TOGGLE_ZOOM";
|
|
2
|
+
export declare const TOGGLE_PAN = "TOGGLE_PAN";
|
|
3
|
+
export declare const TOGGLE_POINTS = "TOGGLE_POINTS";
|
|
4
|
+
export declare const TOGGLE_LINE = "TOGGLE_LINE";
|
|
5
|
+
export declare const TOGGLE_LEGEND = "TOGGLE_LEGEND";
|
|
6
|
+
export declare const TOGGLE_TABLE = "TOGGLE_TABLE";
|
|
7
|
+
export declare const SAVE_INITIAL_AXES_RANGES = "SAVE_INITIAL_AXES_RANGES";
|
|
8
|
+
export declare const RESET_AXES_RANGES = "RESET_AXES_RANGES";
|
|
9
|
+
export declare const UPDATE_AXES_RANGES = "UPDATE_AXES_RANGES";
|
|
10
|
+
export declare const TOGGLE_DRAG_POINTS = "TOGGLE_DRAG_POINTS";
|
|
11
|
+
export declare const TOGGLE_DRAG_ANNOTATION = "TOGGLE_DRAG_ANNOTATION";
|
|
12
|
+
export declare const DISABLE_DRAG_OPTIONS = "DISABLE_DRAG_OPTIONS";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IState } from './state.interfaces';
|
|
2
|
+
import { ILineChartOptions } from '../line-chart.interface';
|
|
3
|
+
interface inputInitState {
|
|
4
|
+
options: ILineChartOptions;
|
|
5
|
+
persistenceId?: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
Initial chart state for the line chart.
|
|
9
|
+
|
|
10
|
+
@param {Object} options - The chart options.
|
|
11
|
+
@return {Object} The initial chart state.
|
|
12
|
+
*/
|
|
13
|
+
declare const initialState: ({ options, persistenceId }: inputInitState) => IState;
|
|
14
|
+
export default initialState;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IState } from './state.interfaces';
|
|
2
|
+
/**
|
|
3
|
+
* Retrieves the chart state from local storage.
|
|
4
|
+
*
|
|
5
|
+
* @param {string|''} persistenceId - The chart persistenceId.
|
|
6
|
+
* @returns {object|null} The chart state object or null if not found.
|
|
7
|
+
*/
|
|
8
|
+
export declare const getChartStateFromStorage: (persistenceId?: string) => any;
|
|
9
|
+
/**
|
|
10
|
+
* Stores the chart state in local storage.
|
|
11
|
+
*
|
|
12
|
+
* @param {object} state - The chart state object to store.
|
|
13
|
+
* @param {string|''} persistenceId - The chart persistenceId.
|
|
14
|
+
*/
|
|
15
|
+
export declare const storeChartStateInStorage: (state: IState, persistenceId?: string) => void;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { IUnitOptions } from '../line-chart.interface';
|
|
2
|
+
export interface IAxisState {
|
|
3
|
+
id?: string;
|
|
4
|
+
label?: string;
|
|
5
|
+
min?: number;
|
|
6
|
+
max?: number;
|
|
7
|
+
unit?: IUnitOptions | string;
|
|
8
|
+
axisType?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface InitialState {
|
|
11
|
+
zoomEnabled: boolean;
|
|
12
|
+
panEnabled: boolean;
|
|
13
|
+
pointsEnabled: boolean;
|
|
14
|
+
lineEnabled: boolean;
|
|
15
|
+
legendEnabled: boolean;
|
|
16
|
+
axes: IAxisState[];
|
|
17
|
+
showAnnotationLineIndex?: number[];
|
|
18
|
+
showTable: boolean;
|
|
19
|
+
enableDragPoints: boolean;
|
|
20
|
+
enableDragAnnotation: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface IInitAxisRange {
|
|
23
|
+
id: string;
|
|
24
|
+
min: number;
|
|
25
|
+
max: number;
|
|
26
|
+
unit?: string;
|
|
27
|
+
}
|
|
28
|
+
export interface IState extends InitialState {
|
|
29
|
+
initialAxesRanges: IInitAxisRange[];
|
|
30
|
+
}
|
|
31
|
+
export interface IAction<T = string, P = any> {
|
|
32
|
+
type: T;
|
|
33
|
+
payload?: P;
|
|
34
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
import { Chart } from 'chart.js';
|
|
3
|
+
import { ILineChartOptions, TGeneratedLineChartDatasets } from '../../line-chart.interface';
|
|
4
|
+
import { IState } from '../../state/state.interfaces';
|
|
5
|
+
/**
|
|
6
|
+
* Auto scales axis ranges (mix, max) if no explicit range is set
|
|
7
|
+
* - overrides some edge cases not handled well by default chart.js
|
|
8
|
+
* - supports optional padding when `autoAxisPadding` is set
|
|
9
|
+
* - otherwise does not set min/max (falls back to chart.js default)
|
|
10
|
+
*/
|
|
11
|
+
export declare const autoScale: (options: ILineChartOptions, state: IState, generatedDatasets: TGeneratedLineChartDatasets, chartRef: RefObject<Chart>) => {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IGeneratedLineChartDataset, TGeneratedLineChartDatasets } from '../../line-chart.interface';
|
|
2
|
+
type TCustomOptionType = {
|
|
3
|
+
[key: string]: string;
|
|
4
|
+
} | string | string[];
|
|
5
|
+
type TDataType = IGeneratedLineChartDataset | Partial<IGeneratedLineChartDataset> | TGeneratedLineChartDatasets | Partial<TGeneratedLineChartDatasets> | any[];
|
|
6
|
+
/**
|
|
7
|
+
* Checks if a single dataset or an array of datasets has a custom option.
|
|
8
|
+
* Iterates through each custom option defined in the customOptions parameter.
|
|
9
|
+
* Returns true if any dataset has any custom option, otherwise returns false.
|
|
10
|
+
*/
|
|
11
|
+
export declare const checkCustomOption: (data: TDataType, customOptions: TCustomOptionType) => boolean;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/line-chart/utils/datalabels-alignment/__tests__/get-alignment-condition.test.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/line-chart/utils/datalabels-alignment/__tests__/get-datalabels-position.test.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
interface IChartArea {
|
|
2
|
+
left: number | null;
|
|
3
|
+
right: number | null;
|
|
4
|
+
bottom: number | null;
|
|
5
|
+
}
|
|
6
|
+
interface IChartMeta {
|
|
7
|
+
data: Array<{
|
|
8
|
+
x: number | null;
|
|
9
|
+
y: number | null;
|
|
10
|
+
}>;
|
|
11
|
+
}
|
|
12
|
+
export interface IAlignmentContext {
|
|
13
|
+
chart: {
|
|
14
|
+
chartArea: IChartArea;
|
|
15
|
+
getDatasetMeta: (datasetIndex: number) => IChartMeta;
|
|
16
|
+
};
|
|
17
|
+
dataIndex: number;
|
|
18
|
+
datasetIndex: number;
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returning boolean condition depends on label position and chart area
|
|
3
|
+
*/
|
|
4
|
+
export declare const getCondition: (x: number | null, y: number | null, left: number | null, right: number | null, bottom: number | null) => {
|
|
5
|
+
overLeftSide: boolean;
|
|
6
|
+
overRightSide: boolean;
|
|
7
|
+
overBottomSide: boolean;
|
|
8
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IAlignmentContext } from './datalabels-alignment.interface';
|
|
2
|
+
/**
|
|
3
|
+
* Returning destructured data from context
|
|
4
|
+
*/
|
|
5
|
+
export declare const getAlignmentData: (context: IAlignmentContext) => {
|
|
6
|
+
x: number | null;
|
|
7
|
+
y: number | null;
|
|
8
|
+
left: number | null;
|
|
9
|
+
right: number | null;
|
|
10
|
+
bottom: number | null;
|
|
11
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AlignOptions } from '../../../common/helpers/enums';
|
|
2
|
+
import { IAlignmentContext } from './datalabels-alignment.interface.ts';
|
|
3
|
+
/**
|
|
4
|
+
* Returning position depends on condition
|
|
5
|
+
*/
|
|
6
|
+
export declare const getPosition: () => (context: IAlignmentContext) => AlignOptions.End | AlignOptions.Start | AlignOptions.Right | AlignOptions.Left;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IState } from '../state/state.interfaces';
|
|
2
|
+
import { ILineChartOptions, TGeneratedLineChartDatasets } from '../line-chart.interface';
|
|
3
|
+
/**
|
|
4
|
+
* Generates line chart datasets based on the provided datasets, state, and options.
|
|
5
|
+
*/
|
|
6
|
+
export declare const generateLineChartDatasets: (datasets: Array<any>, state: IState, options: ILineChartOptions, { label }: {
|
|
7
|
+
label: string;
|
|
8
|
+
}) => TGeneratedLineChartDatasets;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function getAnnotationsData(data: any[]): Object;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function getAxesDataFromMetasets(chartRef: Object, scalesKeys: any[], annotationsData: Object): Object;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Chart } from 'chart.js';
|
|
2
|
+
import { RefObject } from 'react';
|
|
3
|
+
import { ILineChartAxes } from '../line-chart.interface';
|
|
4
|
+
export declare const getAxesRangesFromChart: (chartRef: RefObject<Chart>, axes: ILineChartAxes) => {
|
|
5
|
+
unit?: import('../line-chart.interface').IUnitOptions | undefined;
|
|
6
|
+
id: string;
|
|
7
|
+
min: number;
|
|
8
|
+
max: number;
|
|
9
|
+
}[];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
import { Chart } from 'chart.js';
|
|
3
|
+
import { ICommonAnnotationsData } from '../../common/common.interface.ts';
|
|
4
|
+
export type TAxisType = 'x' | 'y' | 'x1' | 'y1';
|
|
5
|
+
interface IMinMax {
|
|
6
|
+
min: number;
|
|
7
|
+
max: number;
|
|
8
|
+
}
|
|
9
|
+
export declare const getAxisRangeByType: (chartRef: RefObject<Chart>, axesType: TAxisType, annotationsData: ICommonAnnotationsData[]) => IMinMax | null;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { TooltipItem } from 'chart.js';
|
|
2
|
+
import { ILineChartOptions } from '../line-chart.interface';
|
|
3
|
+
import { UnusedParameter } from '../../common/common.interface';
|
|
4
|
+
/**
|
|
5
|
+
* adjusts the position of the label depends on chart area
|
|
6
|
+
*
|
|
7
|
+
* @param {import('../line-chart.interface').ILineChartOptions} options - line chart options object
|
|
8
|
+
* @return {object} - returning position, if label exist in datasets item
|
|
9
|
+
*/
|
|
10
|
+
declare const getLineChartDataLabels: (options: ILineChartOptions) => {
|
|
11
|
+
display: string;
|
|
12
|
+
align: (context: import('./datalabels-alignment/datalabels-alignment.interface').IAlignmentContext) => import("../../common/helpers/enums").AlignOptions.End | import("../../common/helpers/enums").AlignOptions.Start | import("../../common/helpers/enums").AlignOptions.Right | import("../../common/helpers/enums").AlignOptions.Left;
|
|
13
|
+
formatter: (_: UnusedParameter, context: TooltipItem<any>) => any;
|
|
14
|
+
} | {
|
|
15
|
+
display: boolean;
|
|
16
|
+
align?: undefined;
|
|
17
|
+
formatter?: undefined;
|
|
18
|
+
};
|
|
19
|
+
export default getLineChartDataLabels;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { TooltipItem } from 'chart.js';
|
|
2
|
+
import { ChartHoverMode } from '../../common/helpers/enums';
|
|
3
|
+
import { ILineChartOptions } from '../line-chart.interface';
|
|
4
|
+
export declare const getUnitsFromLabel: (label: string) => string;
|
|
5
|
+
declare const getLineChartToolTips: (options: ILineChartOptions) => {
|
|
6
|
+
enabled: boolean;
|
|
7
|
+
mode: ChartHoverMode;
|
|
8
|
+
intersect: boolean;
|
|
9
|
+
padding: number;
|
|
10
|
+
usePointStyle: boolean;
|
|
11
|
+
boxWidth: number;
|
|
12
|
+
boxHeight: number;
|
|
13
|
+
boxPadding: number;
|
|
14
|
+
callbacks: {
|
|
15
|
+
title: (tooltipItem: TooltipItem<any>[]) => string;
|
|
16
|
+
label: (tooltipItem: TooltipItem<any>) => string;
|
|
17
|
+
afterLabel: (tooltipItem: Record<string, any>) => string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export default getLineChartToolTips;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ILineRange } from '../line-chart.interface';
|
|
2
|
+
import { TPrimitive } from '../../common/common.interface';
|
|
3
|
+
export declare const toNum: (value: string | number) => any;
|
|
4
|
+
export declare const isLessThanMax: (value: string | number, max: string | number) => boolean;
|
|
5
|
+
export declare const isGreaterThanMin: (value: string | number, min: string | number) => boolean;
|
|
6
|
+
/**
|
|
7
|
+
*
|
|
8
|
+
* @param {'x'|'y'} axisType
|
|
9
|
+
* @param {number} [index] - axis index; optional, 0 by default
|
|
10
|
+
* @param {boolean} [hasMultiAxes] - optional, false by default
|
|
11
|
+
* @return {string} - e.g. x if chart has singular axes; x, x2 - in case of multiple axes
|
|
12
|
+
*/
|
|
13
|
+
export declare const generateAxisId: (axisType: string, index?: number, hasMultiAxes?: boolean) => string;
|
|
14
|
+
/**
|
|
15
|
+
Get axis type from a key string.
|
|
16
|
+
@param {string} string - The key string to extract from.
|
|
17
|
+
@returns {string} e.g. x1 => x
|
|
18
|
+
*/
|
|
19
|
+
export declare const getAxisTypeFromKey: (string: string) => string;
|
|
20
|
+
/**
|
|
21
|
+
* Generates a key based on an array of values. The key changes
|
|
22
|
+
* if any of the values in the array change.
|
|
23
|
+
*/
|
|
24
|
+
export declare const generateKey: (values: Array<any>) => string;
|
|
25
|
+
/**
|
|
26
|
+
* Checks if a value is a primitive value (which includes strings, numbers, booleans, and null).
|
|
27
|
+
*/
|
|
28
|
+
export declare const isPrimitiveValue: (value: TPrimitive) => value is string | number | boolean | null;
|
|
29
|
+
/**
|
|
30
|
+
* Validates a range object to ensure none of its properties are null, undefined, or empty strings.
|
|
31
|
+
*/
|
|
32
|
+
export declare const isRangeValid: (r?: ILineRange) => boolean;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { defaultTranslations } from '../../constants/default-translations';
|
|
2
|
+
/**
|
|
3
|
+
* Merges custom getTranslations with the default getTranslations.
|
|
4
|
+
* If a custom translation is provided for a key, it will override the default one.
|
|
5
|
+
* @param {object} translations - Custom getTranslations.
|
|
6
|
+
* @returns {object} - The resulting getTranslations object, containing both default and custom getTranslations.
|
|
7
|
+
*/
|
|
8
|
+
export declare const getTranslations: (translations?: Partial<Record<keyof typeof defaultTranslations, string>>) => {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { ChartEvent } from 'chart.js';
|
|
2
|
+
import { ICommonTooltip } from '../common/common.interface';
|
|
3
|
+
import { IPieChartDataset, IPieOptions } from './pie-chart.interface';
|
|
4
|
+
import { AlignOptions, Position } from '../common/helpers/enums';
|
|
5
|
+
export interface IDefaultChartStyling {
|
|
6
|
+
width?: number | string;
|
|
7
|
+
height?: number | string;
|
|
8
|
+
maintainAspectRatio: boolean;
|
|
9
|
+
staticChartHeight: boolean;
|
|
10
|
+
performanceMode: boolean;
|
|
11
|
+
}
|
|
12
|
+
interface IDefaultPieGraph {
|
|
13
|
+
showDataLabels: boolean;
|
|
14
|
+
stacked: boolean;
|
|
15
|
+
cutout: number | string;
|
|
16
|
+
}
|
|
17
|
+
interface IDefaultPieLegend {
|
|
18
|
+
display: boolean;
|
|
19
|
+
useDataset: boolean;
|
|
20
|
+
position: Position;
|
|
21
|
+
align: AlignOptions;
|
|
22
|
+
}
|
|
23
|
+
interface IDefaultChartOptions {
|
|
24
|
+
enableZoom: boolean;
|
|
25
|
+
enablePan: boolean;
|
|
26
|
+
}
|
|
27
|
+
interface IDefaultInteractions {
|
|
28
|
+
onLegendClick?: (text: string, hidden: boolean) => void;
|
|
29
|
+
onHover?: (event?: ChartEvent, datasetIndex?: number, index?: number, generatedDataset?: IPieChartDataset[]) => void;
|
|
30
|
+
onUnhover?: (event?: ChartEvent, datasetIndex?: number, index?: number, generatedDataset?: IPieChartDataset[]) => void;
|
|
31
|
+
}
|
|
32
|
+
interface IDefaultChartData {
|
|
33
|
+
labels: string[];
|
|
34
|
+
datasets: IPieChartDataset[];
|
|
35
|
+
}
|
|
36
|
+
interface IDefaultPieOptions extends IPieOptions {
|
|
37
|
+
title: string | string[];
|
|
38
|
+
chartStyling: IDefaultChartStyling;
|
|
39
|
+
tooltip: ICommonTooltip;
|
|
40
|
+
graph: IDefaultPieGraph;
|
|
41
|
+
legend: IDefaultPieLegend;
|
|
42
|
+
chartOptions: IDefaultChartOptions;
|
|
43
|
+
interactions: IDefaultInteractions;
|
|
44
|
+
}
|
|
45
|
+
export interface IPieChartDefaultProps {
|
|
46
|
+
testId: string | null;
|
|
47
|
+
data: IDefaultChartData;
|
|
48
|
+
options: IDefaultPieOptions;
|
|
49
|
+
}
|
|
50
|
+
export {};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { ICommonData, ICommonDataset, ICommonDataValue, ICommonLegend, ICommonOptions } from '../common/common.interface';
|
|
2
|
+
export interface IPieLegend extends ICommonLegend {
|
|
3
|
+
useDataset?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export interface IPieGraph {
|
|
6
|
+
showDataLabels?: boolean;
|
|
7
|
+
stacked?: boolean;
|
|
8
|
+
cutout?: number | string;
|
|
9
|
+
}
|
|
10
|
+
export interface IPieOptions extends ICommonOptions {
|
|
11
|
+
graph?: IPieGraph;
|
|
12
|
+
legend?: IPieLegend;
|
|
13
|
+
}
|
|
14
|
+
export interface IPieDataValue extends ICommonDataValue {
|
|
15
|
+
label: string;
|
|
16
|
+
borderWidth: string | number;
|
|
17
|
+
value: number;
|
|
18
|
+
backgroundColor?: string | string[];
|
|
19
|
+
borderColor?: string;
|
|
20
|
+
labels: string[];
|
|
21
|
+
}
|
|
22
|
+
export interface IPieChartDataset extends ICommonDataset {
|
|
23
|
+
data: IPieDataValue[];
|
|
24
|
+
hideLegend?: boolean;
|
|
25
|
+
}
|
|
26
|
+
export interface IPieData {
|
|
27
|
+
labels?: string[];
|
|
28
|
+
datasets?: IPieChartDataset[];
|
|
29
|
+
xUnit?: string;
|
|
30
|
+
yUnit?: string;
|
|
31
|
+
}
|
|
32
|
+
export interface IPieChartData extends ICommonData {
|
|
33
|
+
data: IPieData;
|
|
34
|
+
options: IPieOptions;
|
|
35
|
+
}
|
|
36
|
+
export interface IPieChartProps {
|
|
37
|
+
chart: IPieChartData;
|
|
38
|
+
testId?: string | null;
|
|
39
|
+
}
|
|
40
|
+
export interface IPieGeneratedLabel {
|
|
41
|
+
text: string;
|
|
42
|
+
fillStyle: string;
|
|
43
|
+
strokeStyle: string;
|
|
44
|
+
index: number;
|
|
45
|
+
}
|
|
46
|
+
export interface IPieLegendItemFilter {
|
|
47
|
+
index: number;
|
|
48
|
+
datasetIndex: number;
|
|
49
|
+
hidden: boolean;
|
|
50
|
+
}
|
|
51
|
+
export interface IPiesDataLabelsOptions {
|
|
52
|
+
display?: 'auto' | boolean;
|
|
53
|
+
align?: 'center';
|
|
54
|
+
anchor?: 'center';
|
|
55
|
+
formatter?: (_value: any, context: any) => any;
|
|
56
|
+
}
|
|
57
|
+
export interface IGeneratedPieChartDataset {
|
|
58
|
+
label: string;
|
|
59
|
+
backgroundColor: string[];
|
|
60
|
+
borderColor: string;
|
|
61
|
+
borderWidth: number;
|
|
62
|
+
borderDash: number[];
|
|
63
|
+
annotationType?: string;
|
|
64
|
+
data: IPieDataValue[];
|
|
65
|
+
hideLegend?: boolean;
|
|
66
|
+
displayGroup?: string | number;
|
|
67
|
+
isAnnotation?: boolean;
|
|
68
|
+
annotationIndex?: number;
|
|
69
|
+
}
|
|
70
|
+
export type TGeneratedPieChartDatasets = IGeneratedPieChartDataset[];
|