@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,10 @@
|
|
|
1
|
+
import { IBarOptions } from '../bar-chart.interface.ts';
|
|
2
|
+
type ExtendedDisplayOptions = 'auto' | boolean;
|
|
3
|
+
export interface IExtendedDataLabelsOptions {
|
|
4
|
+
display: ExtendedDisplayOptions;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Returns the data labels configuration for a bar chart.
|
|
8
|
+
*/
|
|
9
|
+
declare const getBarChartDataLabels: (options: IBarOptions) => IExtendedDataLabelsOptions;
|
|
10
|
+
export default getBarChartDataLabels;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
import { ActiveElement, Chart, ChartEvent } from 'chart.js';
|
|
3
|
+
import { IBarDefaultProps, IBarOptions, TGenerateBarChartDatasets } from '../bar-chart.interface';
|
|
4
|
+
import { ICommonHoveredItems } from '../../common/common.interface';
|
|
5
|
+
export interface IGenerateBarChartDatasetsProps {
|
|
6
|
+
datasets: TGenerateBarChartDatasets;
|
|
7
|
+
options: IBarOptions;
|
|
8
|
+
}
|
|
9
|
+
export declare const useBarChartConfig: (chartRef: RefObject<Chart>, chart: IBarDefaultProps) => {
|
|
10
|
+
generatedDatasets: TGenerateBarChartDatasets;
|
|
11
|
+
onClick: (_evt: ChartEvent, _elements: ActiveElement[], chartInstance: Chart) => void;
|
|
12
|
+
onHover: (evt: ChartEvent, hoveredItems: ICommonHoveredItems[]) => void;
|
|
13
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { MutableRefObject } from 'react';
|
|
2
|
+
import { Chart } from 'chart.js';
|
|
3
|
+
import { AxisType, ChartHoverMode } from '../../common/helpers/enums';
|
|
4
|
+
import { IBarDefaultProps } from '../bar-chart.interface';
|
|
5
|
+
export interface IUseBarChartOptionsProps {
|
|
6
|
+
chart: IBarDefaultProps;
|
|
7
|
+
chartRef: MutableRefObject<Chart | null>;
|
|
8
|
+
}
|
|
9
|
+
export declare const useBarChartOptions: ({ chart, chartRef, }: IUseBarChartOptionsProps) => {
|
|
10
|
+
onClick: (_evt: import('chart.js').ChartEvent, _elements: import('chart.js').ActiveElement[], chartInstance: Chart) => void;
|
|
11
|
+
onHover: (evt: import('chart.js').ChartEvent, hoveredItems: import('../../common/common.interface').ICommonHoveredItems[]) => void;
|
|
12
|
+
indexAxis: AxisType;
|
|
13
|
+
maintainAspectRatio: boolean | undefined;
|
|
14
|
+
animation: false | {
|
|
15
|
+
duration: number;
|
|
16
|
+
} | undefined;
|
|
17
|
+
hover: {
|
|
18
|
+
mode: ChartHoverMode;
|
|
19
|
+
intersect: boolean;
|
|
20
|
+
};
|
|
21
|
+
scales: any;
|
|
22
|
+
plugins: {
|
|
23
|
+
title: {
|
|
24
|
+
display: boolean;
|
|
25
|
+
text: string | string[] | undefined;
|
|
26
|
+
} | {
|
|
27
|
+
display?: undefined;
|
|
28
|
+
text?: undefined;
|
|
29
|
+
};
|
|
30
|
+
datalabels: import('./get-bar-chart-data-labels').IExtendedDataLabelsOptions;
|
|
31
|
+
annotation: {
|
|
32
|
+
annotations: {};
|
|
33
|
+
};
|
|
34
|
+
tooltip: Record<string, any>;
|
|
35
|
+
legend: {
|
|
36
|
+
display: boolean;
|
|
37
|
+
events: never[];
|
|
38
|
+
position: any;
|
|
39
|
+
align: "center" | "start" | "end";
|
|
40
|
+
labels: {
|
|
41
|
+
boxHeight: number;
|
|
42
|
+
boxWidth: number | undefined;
|
|
43
|
+
usePointStyle: boolean | undefined;
|
|
44
|
+
};
|
|
45
|
+
onClick: (_: import('../../common/common.interface').UnusedParameter, legendItem: import('chart.js').LegendItem) => void;
|
|
46
|
+
};
|
|
47
|
+
customLegendPlugin: {
|
|
48
|
+
htmlLegend: any;
|
|
49
|
+
};
|
|
50
|
+
chartAreaBorder: {
|
|
51
|
+
borderColor: string;
|
|
52
|
+
};
|
|
53
|
+
dragData: false | object | import('../../common/helpers/get-draggableData').IDraggableData | undefined;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import { ChartEvent, ChartTypeRegistry, LinearScaleOptions, Plugin } from 'chart.js';
|
|
2
|
+
import { LabelOptions } from 'chartjs-plugin-annotation';
|
|
3
|
+
import { GradientDirection } from './plugins/gradient-background-plugin/enums';
|
|
4
|
+
import { AnnotationType, DragAxis } from './plugins/annotation-dragger-plugin/enums';
|
|
5
|
+
import { AlignOptions, Position } from './helpers/enums';
|
|
6
|
+
export type TAxisPosition = 'top' | 'bottom' | 'left' | 'right';
|
|
7
|
+
export interface ICommonDataValue {
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
label?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface ICommonDataset {
|
|
13
|
+
label?: string;
|
|
14
|
+
borderColor?: string;
|
|
15
|
+
backgroundColor?: string | string[];
|
|
16
|
+
borderWidth?: number;
|
|
17
|
+
data: ICommonDataValue[];
|
|
18
|
+
}
|
|
19
|
+
export interface ICommonScales extends Partial<Record<string, LinearScaleOptions>> {
|
|
20
|
+
x: LinearScaleOptions;
|
|
21
|
+
y: LinearScaleOptions;
|
|
22
|
+
}
|
|
23
|
+
export interface ICommonAnnotationElement {
|
|
24
|
+
display: boolean;
|
|
25
|
+
annotationIndex: number;
|
|
26
|
+
label: {
|
|
27
|
+
options: LabelOptions;
|
|
28
|
+
content: string;
|
|
29
|
+
};
|
|
30
|
+
options: {
|
|
31
|
+
id?: string;
|
|
32
|
+
scaleID?: string;
|
|
33
|
+
borderColor?: string;
|
|
34
|
+
borderWidth?: number;
|
|
35
|
+
radius?: number;
|
|
36
|
+
label?: {
|
|
37
|
+
content?: string;
|
|
38
|
+
position?: string;
|
|
39
|
+
enabled?: boolean;
|
|
40
|
+
xAdjust?: number;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
export interface ICoordinates {
|
|
45
|
+
x: number;
|
|
46
|
+
y: number;
|
|
47
|
+
}
|
|
48
|
+
export interface ICommonAnnotationsData {
|
|
49
|
+
display?: boolean;
|
|
50
|
+
hideLegend?: boolean;
|
|
51
|
+
id?: string;
|
|
52
|
+
adjustScaleRange: boolean;
|
|
53
|
+
annotationAxis: 'x' | 'y';
|
|
54
|
+
color: string;
|
|
55
|
+
endValue: number;
|
|
56
|
+
label: string;
|
|
57
|
+
labelConfig?: Record<string, any>;
|
|
58
|
+
type: AnnotationType;
|
|
59
|
+
value: number;
|
|
60
|
+
xMin: number;
|
|
61
|
+
xMax: number;
|
|
62
|
+
yMin: number;
|
|
63
|
+
yMax: number;
|
|
64
|
+
xValue?: number;
|
|
65
|
+
yValue?: number;
|
|
66
|
+
radius?: number;
|
|
67
|
+
enableDrag?: boolean;
|
|
68
|
+
onDragStart?: (coordinates: ICoordinates, annotation: ICommonAnnotationsData) => void;
|
|
69
|
+
onDrag?: (coordinates: ICoordinates, annotation: ICommonAnnotationsData) => void;
|
|
70
|
+
onDragEnd?: (coordinates: ICoordinates, annotation: ICommonAnnotationsData) => void;
|
|
71
|
+
dragAxis?: DragAxis;
|
|
72
|
+
pointStyle?: string;
|
|
73
|
+
resizable?: boolean;
|
|
74
|
+
dragRange?: {
|
|
75
|
+
x?: [number, number];
|
|
76
|
+
y?: [number, number];
|
|
77
|
+
};
|
|
78
|
+
displayDragCoordinates?: boolean;
|
|
79
|
+
xScaleID?: string;
|
|
80
|
+
yScaleID?: string;
|
|
81
|
+
}
|
|
82
|
+
export interface ICommonGradientColor {
|
|
83
|
+
offset: number;
|
|
84
|
+
color: string;
|
|
85
|
+
}
|
|
86
|
+
export interface ICommonGradient {
|
|
87
|
+
display: boolean;
|
|
88
|
+
gradientColors?: ICommonGradientColor[];
|
|
89
|
+
direction?: GradientDirection;
|
|
90
|
+
}
|
|
91
|
+
export interface ICommonStyling {
|
|
92
|
+
width?: number | string;
|
|
93
|
+
height?: number | string;
|
|
94
|
+
maintainAspectRatio?: boolean;
|
|
95
|
+
staticChartHeight?: boolean;
|
|
96
|
+
performanceMode?: boolean;
|
|
97
|
+
gradient?: ICommonGradient;
|
|
98
|
+
}
|
|
99
|
+
export interface ICommonLegend {
|
|
100
|
+
display: boolean;
|
|
101
|
+
position: Position;
|
|
102
|
+
align: AlignOptions;
|
|
103
|
+
}
|
|
104
|
+
export interface ICommonTooltip {
|
|
105
|
+
tooltips: boolean;
|
|
106
|
+
showLabelsInTooltips: boolean;
|
|
107
|
+
scientificNotation: boolean;
|
|
108
|
+
}
|
|
109
|
+
export interface ICommonAdditionalAxesOptions {
|
|
110
|
+
chartScaleType?: 'linear' | 'logarithmic';
|
|
111
|
+
reverse: boolean;
|
|
112
|
+
beginAtZero: boolean;
|
|
113
|
+
stepSize?: number;
|
|
114
|
+
stacked?: boolean;
|
|
115
|
+
suggestedMin?: number;
|
|
116
|
+
suggestedMax?: number;
|
|
117
|
+
min?: number;
|
|
118
|
+
max?: number;
|
|
119
|
+
}
|
|
120
|
+
export interface ICommonAnnotation {
|
|
121
|
+
showLabel: boolean;
|
|
122
|
+
text: string | string[];
|
|
123
|
+
position: string;
|
|
124
|
+
fontSize: number;
|
|
125
|
+
xOffset: number;
|
|
126
|
+
yOffset: number;
|
|
127
|
+
maxWidth: number;
|
|
128
|
+
lineHeight: number;
|
|
129
|
+
}
|
|
130
|
+
export interface ICommonAnnotations {
|
|
131
|
+
showAnnotations?: boolean;
|
|
132
|
+
controlAnnotation?: boolean;
|
|
133
|
+
enableDragAnnotation?: boolean;
|
|
134
|
+
annotationsData?: ICommonAnnotationsData[];
|
|
135
|
+
labelAnnotation?: ICommonAnnotation;
|
|
136
|
+
}
|
|
137
|
+
export interface ICommonGraph {
|
|
138
|
+
lineTension?: number;
|
|
139
|
+
spanGaps?: boolean;
|
|
140
|
+
showDataLabels?: boolean;
|
|
141
|
+
showMinorGridlines?: boolean;
|
|
142
|
+
}
|
|
143
|
+
export interface ICommonInteractions {
|
|
144
|
+
onLegendClick?: (text: string, hidden: boolean) => void;
|
|
145
|
+
onHover?: (event?: ChartEvent, datasetIndex?: number, index?: number, generatedDataset?: any[]) => void;
|
|
146
|
+
onUnhover?: (event?: ChartEvent, datasetIndex?: number, index?: number, generatedDataset?: any[]) => void;
|
|
147
|
+
}
|
|
148
|
+
export interface ICommonCustomLegend<T extends keyof ChartTypeRegistry> {
|
|
149
|
+
customLegendPlugin: Plugin<T> | null;
|
|
150
|
+
customLegendContainerID: string;
|
|
151
|
+
}
|
|
152
|
+
export interface ICommonChartOptions {
|
|
153
|
+
enableZoom: boolean;
|
|
154
|
+
enablePan: boolean;
|
|
155
|
+
}
|
|
156
|
+
export interface ICommonDragData {
|
|
157
|
+
enableDragData?: boolean;
|
|
158
|
+
showTooltip?: boolean;
|
|
159
|
+
roundPoints?: boolean;
|
|
160
|
+
dragX?: boolean;
|
|
161
|
+
dragY?: boolean;
|
|
162
|
+
onDragStart?: () => void;
|
|
163
|
+
onDrag?: () => void;
|
|
164
|
+
onDragEnd?: () => void;
|
|
165
|
+
}
|
|
166
|
+
export interface ICommonOptions {
|
|
167
|
+
title?: string | string[];
|
|
168
|
+
chartStyling?: ICommonStyling;
|
|
169
|
+
tooltip?: ICommonTooltip;
|
|
170
|
+
legend?: ICommonLegend;
|
|
171
|
+
chartOptions?: ICommonChartOptions;
|
|
172
|
+
interactions?: ICommonInteractions;
|
|
173
|
+
dragData?: ICommonDragData;
|
|
174
|
+
annotations?: ICommonAnnotations;
|
|
175
|
+
}
|
|
176
|
+
export interface ICommonData {
|
|
177
|
+
testId?: string;
|
|
178
|
+
data?: {
|
|
179
|
+
labels?: string[];
|
|
180
|
+
datasets?: ICommonDataset[];
|
|
181
|
+
};
|
|
182
|
+
options: ICommonOptions;
|
|
183
|
+
}
|
|
184
|
+
export interface ICommonHoveredItems {
|
|
185
|
+
index: number;
|
|
186
|
+
datasetIndex: number;
|
|
187
|
+
}
|
|
188
|
+
export interface ICommonChartPlugins {
|
|
189
|
+
legend: {
|
|
190
|
+
position: TAxisPosition;
|
|
191
|
+
};
|
|
192
|
+
title: {
|
|
193
|
+
display: boolean;
|
|
194
|
+
text: string;
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
export interface ICommonAxis<PositionType = any> {
|
|
198
|
+
label: string;
|
|
199
|
+
position: PositionType;
|
|
200
|
+
color: string | string[];
|
|
201
|
+
unit?: string;
|
|
202
|
+
gridLines?: boolean;
|
|
203
|
+
stepSize?: number;
|
|
204
|
+
}
|
|
205
|
+
export type UnusedParameter = unknown | any;
|
|
206
|
+
export type TPrimitive = string | number | boolean | null;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
interface ControlsPortalProps {
|
|
3
|
+
children: ReactElement;
|
|
4
|
+
controlsPortalId: string;
|
|
5
|
+
}
|
|
6
|
+
declare const ControlsPortal: ({ children, controlsPortalId, }: ControlsPortalProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default ControlsPortal;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Chart } from 'chart.js';
|
|
2
|
+
import { UnusedParameter } from '../common.interface';
|
|
3
|
+
interface IChartAreaBorderPluginOptions {
|
|
4
|
+
borderColor: string;
|
|
5
|
+
borderWidth: number;
|
|
6
|
+
borderDash: number[];
|
|
7
|
+
borderDashOffset?: number;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Chart border plugin config
|
|
11
|
+
*/
|
|
12
|
+
export declare const chartAreaBorderPlugin: {
|
|
13
|
+
id: string;
|
|
14
|
+
beforeDraw(chart: Chart, _: UnusedParameter, options: IChartAreaBorderPluginOptions): void;
|
|
15
|
+
};
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ICommonGradientColor } from '../common.interface';
|
|
2
|
+
export declare const BORDER_WIDTH: {
|
|
3
|
+
ZERO: number;
|
|
4
|
+
INITIAL: number;
|
|
5
|
+
HOVERED: number;
|
|
6
|
+
POINT_HOVERED: number;
|
|
7
|
+
};
|
|
8
|
+
export declare const BORDER_COLOR = "rgba(0,0,0,0.1)";
|
|
9
|
+
export declare const ANNOTATION_DASH: number[];
|
|
10
|
+
export declare const DEFAULT_FONT_SIZE = 12;
|
|
11
|
+
export declare const DEFAULT_FONT_FAMILY = "\"Roobert\", \"Noto Sans\", sans-serif";
|
|
12
|
+
export declare const DEFAULT_COLOR = "hsl(60, 10.34482759%, 12.5%)";
|
|
13
|
+
export declare const LEGEND_LABEL_BOX_SIZE = 12;
|
|
14
|
+
export declare const TOOLTIP_PADDING = 8;
|
|
15
|
+
export declare const TOOLTIP_BOX_PADDING = 4;
|
|
16
|
+
export declare const TRANSPARENT = "transparent";
|
|
17
|
+
export declare const LOGARITHMIC_STEPS: number[];
|
|
18
|
+
export declare const COLORS: string[];
|
|
19
|
+
/**
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @desc equivalent of 0.6 rgba alpha chanel
|
|
22
|
+
*/
|
|
23
|
+
export declare const ALPHA_CHANEL = "99";
|
|
24
|
+
/**
|
|
25
|
+
* @type {number}
|
|
26
|
+
* @desc #FFFFFF as decimal number
|
|
27
|
+
*/
|
|
28
|
+
export declare const WHITE_COLOR_AS_DECIMAL = 16777215;
|
|
29
|
+
export declare const AUTO = "auto";
|
|
30
|
+
export declare const ANIMATION_DURATION: {
|
|
31
|
+
NO: number;
|
|
32
|
+
SLOW: number;
|
|
33
|
+
FAST: number;
|
|
34
|
+
};
|
|
35
|
+
export declare const DEFAULT_CHART_NAME = "new_chart";
|
|
36
|
+
export declare const CUSTOM_LEGEND_PLUGIN_NAME = "htmlLegend";
|
|
37
|
+
export declare const DECIMAL_POINT_TOLERANCE = 9;
|
|
38
|
+
export declare const MAX_DECIMAL_DIFF: number;
|
|
39
|
+
export declare const GRADIENT_COLORS: ICommonGradientColor[];
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { ChartTypeRegistry, LegendItem, Plugin } from 'chart.js';
|
|
2
|
+
import { ICommonCustomLegend, UnusedParameter } from '../common.interface';
|
|
3
|
+
import { Position } from './enums';
|
|
4
|
+
export interface IChartGraph {
|
|
5
|
+
showMinorGridlines: boolean;
|
|
6
|
+
}
|
|
7
|
+
interface IOptions {
|
|
8
|
+
title?: string | string[];
|
|
9
|
+
legend?: {
|
|
10
|
+
position: Position;
|
|
11
|
+
display?: boolean;
|
|
12
|
+
align?: string;
|
|
13
|
+
usePointStyle?: boolean;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
interface IStyling {
|
|
17
|
+
width?: string | number;
|
|
18
|
+
height?: string | number;
|
|
19
|
+
squareAspectRatio?: number | boolean;
|
|
20
|
+
maintainAspectRatio?: boolean;
|
|
21
|
+
staticChartHeight?: boolean;
|
|
22
|
+
performanceMode?: boolean;
|
|
23
|
+
}
|
|
24
|
+
interface IAxis {
|
|
25
|
+
label?: string;
|
|
26
|
+
}
|
|
27
|
+
interface ILegend {
|
|
28
|
+
customLegend?: ICommonCustomLegend<any>;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* @param { graph } graph - graph data from chart options
|
|
32
|
+
* @param { legend } legend
|
|
33
|
+
* @return {[]}
|
|
34
|
+
*/
|
|
35
|
+
export declare const getPlugins: <T extends keyof ChartTypeRegistry>(graph: IChartGraph, legend: ILegend) => Plugin<T>[] | any;
|
|
36
|
+
/**
|
|
37
|
+
* @param {string[]} colors - color schema
|
|
38
|
+
* @return {string} - random color
|
|
39
|
+
*/
|
|
40
|
+
export declare const generateRandomColor: (colors: string[]) => string[];
|
|
41
|
+
/**
|
|
42
|
+
* @param {ICommonChartOptions} options - chart options object
|
|
43
|
+
* @return {{color: (string|undefined), display: boolean, text}|{}}
|
|
44
|
+
*/
|
|
45
|
+
export declare const getTitle: (options: IOptions) => {
|
|
46
|
+
display: boolean;
|
|
47
|
+
text: string | string[] | undefined;
|
|
48
|
+
} | {
|
|
49
|
+
display?: undefined;
|
|
50
|
+
text?: undefined;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* @function isVertical
|
|
54
|
+
*/
|
|
55
|
+
export declare const isVertical: (direction: "vertical" | "horizontal") => direction is "vertical";
|
|
56
|
+
/**
|
|
57
|
+
* @param {'x'|'y'} axisType
|
|
58
|
+
* @param {number} i - index
|
|
59
|
+
* @return {'top'|'bottom'|'left'|'right'|*}
|
|
60
|
+
*/
|
|
61
|
+
export declare const getAxisPosition: (axisType: string, i: number) => Position;
|
|
62
|
+
/**
|
|
63
|
+
* @param {chartStyling} chartStyling
|
|
64
|
+
* @param {Object} styles - styles imported form .less file
|
|
65
|
+
* @return {string} - class name
|
|
66
|
+
*/
|
|
67
|
+
export declare const getClassName: (chartStyling: IStyling, styles: Record<string, string>) => string;
|
|
68
|
+
export declare const getLegend: (options: IOptions, clickHandler: (_: UnusedParameter, legendItem: LegendItem) => void) => {
|
|
69
|
+
position: any;
|
|
70
|
+
display: boolean | undefined;
|
|
71
|
+
align: "center" | "start" | "end";
|
|
72
|
+
labels: {
|
|
73
|
+
boxHeight: number;
|
|
74
|
+
boxWidth: number | undefined;
|
|
75
|
+
usePointStyle: boolean | undefined;
|
|
76
|
+
};
|
|
77
|
+
onClick: (_: UnusedParameter, legendItem: LegendItem) => void;
|
|
78
|
+
};
|
|
79
|
+
export declare const afterLabelCallback: (tooltipItem: Record<string, any>) => string;
|
|
80
|
+
export declare const getTooltipLabel: (tooltipItem: Record<string, any>, showLabelsInTooltips: boolean) => string;
|
|
81
|
+
export declare const getChartFileName: (axes?: IAxis[]) => string;
|
|
82
|
+
export declare const setDefaultTheme: () => void;
|
|
83
|
+
export declare const isNilOrEmpty: <T>(value: T | null | undefined) => boolean;
|
|
84
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
interface ContainerProps {
|
|
3
|
+
style?: CSSProperties;
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
margin?: boolean;
|
|
6
|
+
deprecatedMessage?: string;
|
|
7
|
+
warningMessage?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const Container: {
|
|
10
|
+
({ style, children, margin, deprecatedMessage, warningMessage, }: ContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
defaultProps: {
|
|
12
|
+
style: {};
|
|
13
|
+
margin: boolean;
|
|
14
|
+
deprecatedMessage: null;
|
|
15
|
+
warningMessage: null;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const customFormatNumber: (labelNumber: number, scientificNotation: boolean) => string;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
export declare enum AxisType {
|
|
2
|
+
X = "x",
|
|
3
|
+
Y = "y"
|
|
4
|
+
}
|
|
5
|
+
export declare enum Position {
|
|
6
|
+
Bottom = "bottom",
|
|
7
|
+
Top = "top",
|
|
8
|
+
Left = "left",
|
|
9
|
+
Right = "right",
|
|
10
|
+
TopRight = "top-right",
|
|
11
|
+
TopLeft = "top-left",
|
|
12
|
+
BottomLeft = "bottom-left",
|
|
13
|
+
BottomRight = "bottom-right"
|
|
14
|
+
}
|
|
15
|
+
export declare enum ChartType {
|
|
16
|
+
Line = "line",
|
|
17
|
+
Bar = "bar"
|
|
18
|
+
}
|
|
19
|
+
export declare enum CursorStyle {
|
|
20
|
+
Pointer = "pointer",
|
|
21
|
+
Initial = "initial",
|
|
22
|
+
Grab = "grab",
|
|
23
|
+
Grabbing = "grabbing",
|
|
24
|
+
Crosshair = "crosshair",
|
|
25
|
+
Move = "move"
|
|
26
|
+
}
|
|
27
|
+
export declare enum ScaleType {
|
|
28
|
+
Category = "category",
|
|
29
|
+
Linear = "linear",
|
|
30
|
+
Logarithmic = "logarithmic"
|
|
31
|
+
}
|
|
32
|
+
export declare enum ChartDirection {
|
|
33
|
+
Vertical = "vertical"
|
|
34
|
+
}
|
|
35
|
+
export declare enum TooltipLabel {
|
|
36
|
+
Y = "yLabel",
|
|
37
|
+
X = "xLabel"
|
|
38
|
+
}
|
|
39
|
+
export declare enum AlignOptions {
|
|
40
|
+
End = "end",
|
|
41
|
+
Start = "start",
|
|
42
|
+
Center = "center",
|
|
43
|
+
Right = "right",
|
|
44
|
+
Left = "left"
|
|
45
|
+
}
|
|
46
|
+
export declare enum PointType {
|
|
47
|
+
Casing = "casing"
|
|
48
|
+
}
|
|
49
|
+
export declare enum AnnotationType {
|
|
50
|
+
Box = "box",
|
|
51
|
+
Ellipse = "ellipse",
|
|
52
|
+
Line = "line",
|
|
53
|
+
Text = "text"
|
|
54
|
+
}
|
|
55
|
+
export declare enum PointStyle {
|
|
56
|
+
Circle = "circle",
|
|
57
|
+
Square = "rect",
|
|
58
|
+
Diamond = "rectRot",
|
|
59
|
+
Triangle = "triangle"
|
|
60
|
+
}
|
|
61
|
+
export declare enum ChartHoverMode {
|
|
62
|
+
Nearest = "nearest"
|
|
63
|
+
}
|
|
64
|
+
export declare enum PanZoomMode {
|
|
65
|
+
X = "x",
|
|
66
|
+
Y = "y",
|
|
67
|
+
XY = "xy",
|
|
68
|
+
Z = "z"
|
|
69
|
+
}
|
|
70
|
+
export declare enum Key {
|
|
71
|
+
Shift = "Shift"
|
|
72
|
+
}
|
|
73
|
+
export declare enum Events {
|
|
74
|
+
Mousemove = "mousemove",
|
|
75
|
+
Mouseout = "mouseout",
|
|
76
|
+
Click = "click",
|
|
77
|
+
Touchstart = "touchstart",
|
|
78
|
+
Touchmove = "touchmove",
|
|
79
|
+
Dblclick = "dblclick"
|
|
80
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { Chart } from 'chart.js';
|
|
2
|
+
import { AnnotationType } from '../plugins/annotation-dragger-plugin/enums';
|
|
3
|
+
import { Position } from './enums';
|
|
4
|
+
import { ICommonAnnotationElement, ICommonAnnotationsData, ICoordinates } from '../common.interface';
|
|
5
|
+
export interface IGetAnnotationsProps {
|
|
6
|
+
showAnnotations: boolean;
|
|
7
|
+
annotationsData: ICommonAnnotationsData[];
|
|
8
|
+
}
|
|
9
|
+
interface TChart extends Chart {
|
|
10
|
+
hoveredAnnotationId?: string | null;
|
|
11
|
+
}
|
|
12
|
+
declare const getAnnotation: ({ showAnnotations, annotationsData, }: IGetAnnotationsProps) => ICommonAnnotationElement[] | {
|
|
13
|
+
display: boolean | undefined;
|
|
14
|
+
annotationIndex: number;
|
|
15
|
+
id: string;
|
|
16
|
+
scaleID: "x" | "y";
|
|
17
|
+
label: {
|
|
18
|
+
content: string;
|
|
19
|
+
display: boolean;
|
|
20
|
+
font: {
|
|
21
|
+
weight: string;
|
|
22
|
+
};
|
|
23
|
+
} | {
|
|
24
|
+
backgroundColor: string;
|
|
25
|
+
content: string;
|
|
26
|
+
display: boolean;
|
|
27
|
+
position: Position;
|
|
28
|
+
color?: undefined;
|
|
29
|
+
font?: undefined;
|
|
30
|
+
borderWidth?: undefined;
|
|
31
|
+
padding?: undefined;
|
|
32
|
+
borderRadius?: undefined;
|
|
33
|
+
borderColor?: undefined;
|
|
34
|
+
} | {
|
|
35
|
+
backgroundColor: any;
|
|
36
|
+
content: string;
|
|
37
|
+
display: any;
|
|
38
|
+
position: any;
|
|
39
|
+
color: any;
|
|
40
|
+
font: any;
|
|
41
|
+
borderWidth: number;
|
|
42
|
+
padding: number;
|
|
43
|
+
borderRadius: number;
|
|
44
|
+
borderColor: any;
|
|
45
|
+
};
|
|
46
|
+
backgroundColor: string;
|
|
47
|
+
borderColor: string;
|
|
48
|
+
borderWidth: number;
|
|
49
|
+
borderDash: number[] | undefined;
|
|
50
|
+
type: AnnotationType;
|
|
51
|
+
adjustScaleRange: boolean;
|
|
52
|
+
enter: ({ element, }: {
|
|
53
|
+
element: ICommonAnnotationElement;
|
|
54
|
+
}, { chart, }: {
|
|
55
|
+
chart: TChart;
|
|
56
|
+
}) => void;
|
|
57
|
+
leave: ({ element, }: {
|
|
58
|
+
element: ICommonAnnotationElement;
|
|
59
|
+
}, { chart, }: {
|
|
60
|
+
chart: TChart;
|
|
61
|
+
}) => void;
|
|
62
|
+
onDragStart: () => (cord: ICoordinates, annotation: ICommonAnnotationsData) => void;
|
|
63
|
+
onDrag: () => (cord: ICoordinates, annotation: ICommonAnnotationsData) => void;
|
|
64
|
+
onDragEnd: () => (cord: ICoordinates, annotation: ICommonAnnotationsData) => void;
|
|
65
|
+
pointStyle: string;
|
|
66
|
+
resizable: boolean;
|
|
67
|
+
displayDragCoordinates: boolean;
|
|
68
|
+
hideLegend?: boolean;
|
|
69
|
+
annotationAxis: "x" | "y";
|
|
70
|
+
color: string;
|
|
71
|
+
endValue: number;
|
|
72
|
+
labelConfig?: Record<string, any>;
|
|
73
|
+
value: number;
|
|
74
|
+
xMin: number;
|
|
75
|
+
xMax: number;
|
|
76
|
+
yMin: number;
|
|
77
|
+
yMax: number;
|
|
78
|
+
xValue?: number;
|
|
79
|
+
yValue?: number;
|
|
80
|
+
radius?: number;
|
|
81
|
+
enableDrag?: boolean;
|
|
82
|
+
dragAxis?: import('../plugins/annotation-dragger-plugin/enums').DragAxis;
|
|
83
|
+
dragRange?: {
|
|
84
|
+
x?: [number, number];
|
|
85
|
+
y?: [number, number];
|
|
86
|
+
};
|
|
87
|
+
xScaleID?: string;
|
|
88
|
+
yScaleID?: string;
|
|
89
|
+
}[];
|
|
90
|
+
export default getAnnotation;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Chart, ChartConfiguration, Plugin } from 'chart.js';
|
|
2
|
+
/**
|
|
3
|
+
* Gets an example custom legend plugin for use in storybook.
|
|
4
|
+
* @param {string} customLegendContainerID - the id of the div container to put the generated legend in
|
|
5
|
+
*/
|
|
6
|
+
export declare const getCustomLegendPlugin: (customLegendContainerID: string) => {
|
|
7
|
+
afterUpdate(chart: Chart, _args: Plugin, _options: ChartConfiguration): void;
|
|
8
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ICommonOptions } from '../common.interface';
|
|
2
|
+
export interface IDraggableDataOptions {
|
|
3
|
+
dragX: boolean;
|
|
4
|
+
dragY: boolean;
|
|
5
|
+
round: boolean;
|
|
6
|
+
showTooltip: boolean;
|
|
7
|
+
onDragStart: () => void;
|
|
8
|
+
onDrag: () => void;
|
|
9
|
+
onDragEnd: () => void;
|
|
10
|
+
}
|
|
11
|
+
export interface IDraggableData {
|
|
12
|
+
dragData: IDraggableDataOptions;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* @param {ICommonChartOptions} options - line chart options object
|
|
16
|
+
*/
|
|
17
|
+
declare const getDraggableData: (options: ICommonOptions) => IDraggableData | object;
|
|
18
|
+
export default getDraggableData;
|