@gravity-ui/charts 0.1.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/LICENSE +21 -0
- package/README.md +15 -0
- package/dist/cjs/components/Axis/AxisX.d.ts +20 -0
- package/dist/cjs/components/Axis/AxisX.js +108 -0
- package/dist/cjs/components/Axis/AxisY.d.ts +12 -0
- package/dist/cjs/components/Axis/AxisY.js +199 -0
- package/dist/cjs/components/Axis/index.d.ts +2 -0
- package/dist/cjs/components/Axis/index.js +2 -0
- package/dist/cjs/components/Axis/styles.css +17 -0
- package/dist/cjs/components/ChartInner/index.d.ts +10 -0
- package/dist/cjs/components/ChartInner/index.js +143 -0
- package/dist/cjs/components/ChartInner/styles.css +10 -0
- package/dist/cjs/components/Legend/index.d.ts +13 -0
- package/dist/cjs/components/Legend/index.js +278 -0
- package/dist/cjs/components/Legend/styles.css +47 -0
- package/dist/cjs/components/PlotTitle/index.d.ts +8 -0
- package/dist/cjs/components/PlotTitle/index.js +13 -0
- package/dist/cjs/components/PlotTitle/styles.css +5 -0
- package/dist/cjs/components/Title/index.d.ts +8 -0
- package/dist/cjs/components/Title/index.js +9 -0
- package/dist/cjs/components/Title/styles.css +5 -0
- package/dist/cjs/components/Tooltip/DefaultContent.d.ts +10 -0
- package/dist/cjs/components/Tooltip/DefaultContent.js +101 -0
- package/dist/cjs/components/Tooltip/index.d.ts +13 -0
- package/dist/cjs/components/Tooltip/index.js +29 -0
- package/dist/cjs/components/Tooltip/styles.css +29 -0
- package/dist/cjs/components/index.d.ts +18 -0
- package/dist/cjs/components/index.js +66 -0
- package/dist/cjs/constants/defaults/axis.d.ts +14 -0
- package/dist/cjs/constants/defaults/axis.js +18 -0
- package/dist/cjs/constants/defaults/index.d.ts +3 -0
- package/dist/cjs/constants/defaults/index.js +3 -0
- package/dist/cjs/constants/defaults/legend.d.ts +13 -0
- package/dist/cjs/constants/defaults/legend.js +12 -0
- package/dist/cjs/constants/defaults/series-options.d.ts +24 -0
- package/dist/cjs/constants/defaults/series-options.js +106 -0
- package/dist/cjs/constants/index.d.ts +46 -0
- package/dist/cjs/constants/index.js +71 -0
- package/dist/cjs/hooks/index.d.ts +10 -0
- package/dist/cjs/hooks/index.js +10 -0
- package/dist/cjs/hooks/useAxisScales/index.d.ts +25 -0
- package/dist/cjs/hooks/useAxisScales/index.js +183 -0
- package/dist/cjs/hooks/useChartDimensions/index.d.ts +16 -0
- package/dist/cjs/hooks/useChartDimensions/index.js +34 -0
- package/dist/cjs/hooks/useChartDimensions/utils.d.ts +10 -0
- package/dist/cjs/hooks/useChartDimensions/utils.js +32 -0
- package/dist/cjs/hooks/useChartOptions/chart.d.ts +6 -0
- package/dist/cjs/hooks/useChartOptions/chart.js +28 -0
- package/dist/cjs/hooks/useChartOptions/index.d.ts +7 -0
- package/dist/cjs/hooks/useChartOptions/index.js +21 -0
- package/dist/cjs/hooks/useChartOptions/title.d.ts +5 -0
- package/dist/cjs/hooks/useChartOptions/title.js +18 -0
- package/dist/cjs/hooks/useChartOptions/tooltip.d.ts +5 -0
- package/dist/cjs/hooks/useChartOptions/tooltip.js +5 -0
- package/dist/cjs/hooks/useChartOptions/types.d.ts +47 -0
- package/dist/cjs/hooks/useChartOptions/types.js +1 -0
- package/dist/cjs/hooks/useChartOptions/x-axis.d.ts +7 -0
- package/dist/cjs/hooks/useChartOptions/x-axis.js +115 -0
- package/dist/cjs/hooks/useChartOptions/y-axis.d.ts +7 -0
- package/dist/cjs/hooks/useChartOptions/y-axis.js +117 -0
- package/dist/cjs/hooks/useSeries/constants.d.ts +8 -0
- package/dist/cjs/hooks/useSeries/constants.js +19 -0
- package/dist/cjs/hooks/useSeries/index.d.ts +29 -0
- package/dist/cjs/hooks/useSeries/index.js +82 -0
- package/dist/cjs/hooks/useSeries/prepare-area.d.ts +19 -0
- package/dist/cjs/hooks/useSeries/prepare-area.js +63 -0
- package/dist/cjs/hooks/useSeries/prepare-bar-x.d.ts +10 -0
- package/dist/cjs/hooks/useSeries/prepare-bar-x.js +38 -0
- package/dist/cjs/hooks/useSeries/prepare-bar-y.d.ts +10 -0
- package/dist/cjs/hooks/useSeries/prepare-bar-y.js +48 -0
- package/dist/cjs/hooks/useSeries/prepare-legend.d.ts +27 -0
- package/dist/cjs/hooks/useSeries/prepare-legend.js +144 -0
- package/dist/cjs/hooks/useSeries/prepare-line.d.ts +22 -0
- package/dist/cjs/hooks/useSeries/prepare-line.js +82 -0
- package/dist/cjs/hooks/useSeries/prepare-options.d.ts +3 -0
- package/dist/cjs/hooks/useSeries/prepare-options.js +5 -0
- package/dist/cjs/hooks/useSeries/prepare-pie.d.ts +9 -0
- package/dist/cjs/hooks/useSeries/prepare-pie.js +62 -0
- package/dist/cjs/hooks/useSeries/prepare-scatter.d.ts +11 -0
- package/dist/cjs/hooks/useSeries/prepare-scatter.js +46 -0
- package/dist/cjs/hooks/useSeries/prepare-treemap.d.ts +11 -0
- package/dist/cjs/hooks/useSeries/prepare-treemap.js +38 -0
- package/dist/cjs/hooks/useSeries/prepare-waterfall.d.ts +10 -0
- package/dist/cjs/hooks/useSeries/prepare-waterfall.js +37 -0
- package/dist/cjs/hooks/useSeries/prepareSeries.d.ts +10 -0
- package/dist/cjs/hooks/useSeries/prepareSeries.js +65 -0
- package/dist/cjs/hooks/useSeries/types.d.ts +253 -0
- package/dist/cjs/hooks/useSeries/types.js +1 -0
- package/dist/cjs/hooks/useSeries/utils.d.ts +7 -0
- package/dist/cjs/hooks/useSeries/utils.js +33 -0
- package/dist/cjs/hooks/useShapes/HtmlLayer.d.ts +8 -0
- package/dist/cjs/hooks/useShapes/HtmlLayer.js +22 -0
- package/dist/cjs/hooks/useShapes/area/index.d.ts +12 -0
- package/dist/cjs/hooks/useShapes/area/index.js +143 -0
- package/dist/cjs/hooks/useShapes/area/prepare-data.d.ts +12 -0
- package/dist/cjs/hooks/useShapes/area/prepare-data.js +158 -0
- package/dist/cjs/hooks/useShapes/area/types.d.ts +27 -0
- package/dist/cjs/hooks/useShapes/area/types.js +1 -0
- package/dist/cjs/hooks/useShapes/bar-x/index.d.ts +13 -0
- package/dist/cjs/hooks/useShapes/bar-x/index.js +95 -0
- package/dist/cjs/hooks/useShapes/bar-x/prepare-data.d.ts +13 -0
- package/dist/cjs/hooks/useShapes/bar-x/prepare-data.js +160 -0
- package/dist/cjs/hooks/useShapes/bar-x/types.d.ts +12 -0
- package/dist/cjs/hooks/useShapes/bar-x/types.js +1 -0
- package/dist/cjs/hooks/useShapes/bar-y/index.d.ts +12 -0
- package/dist/cjs/hooks/useShapes/bar-y/index.js +84 -0
- package/dist/cjs/hooks/useShapes/bar-y/prepare-data.d.ts +12 -0
- package/dist/cjs/hooks/useShapes/bar-y/prepare-data.js +169 -0
- package/dist/cjs/hooks/useShapes/bar-y/types.d.ts +13 -0
- package/dist/cjs/hooks/useShapes/bar-y/types.js +1 -0
- package/dist/cjs/hooks/useShapes/constants.d.ts +3 -0
- package/dist/cjs/hooks/useShapes/constants.js +3 -0
- package/dist/cjs/hooks/useShapes/index.d.ts +33 -0
- package/dist/cjs/hooks/useShapes/index.js +154 -0
- package/dist/cjs/hooks/useShapes/line/index.d.ts +12 -0
- package/dist/cjs/hooks/useShapes/line/index.js +130 -0
- package/dist/cjs/hooks/useShapes/line/prepare-data.d.ts +13 -0
- package/dist/cjs/hooks/useShapes/line/prepare-data.js +91 -0
- package/dist/cjs/hooks/useShapes/line/types.d.ts +29 -0
- package/dist/cjs/hooks/useShapes/line/types.js +1 -0
- package/dist/cjs/hooks/useShapes/marker.d.ts +14 -0
- package/dist/cjs/hooks/useShapes/marker.js +75 -0
- package/dist/cjs/hooks/useShapes/pie/index.d.ts +13 -0
- package/dist/cjs/hooks/useShapes/pie/index.js +171 -0
- package/dist/cjs/hooks/useShapes/pie/prepare-data.d.ts +9 -0
- package/dist/cjs/hooks/useShapes/pie/prepare-data.js +186 -0
- package/dist/cjs/hooks/useShapes/pie/types.d.ts +41 -0
- package/dist/cjs/hooks/useShapes/pie/types.js +1 -0
- package/dist/cjs/hooks/useShapes/pie/utils.d.ts +4 -0
- package/dist/cjs/hooks/useShapes/pie/utils.js +15 -0
- package/dist/cjs/hooks/useShapes/scatter/index.d.ts +12 -0
- package/dist/cjs/hooks/useShapes/scatter/index.js +69 -0
- package/dist/cjs/hooks/useShapes/scatter/prepare-data.d.ts +11 -0
- package/dist/cjs/hooks/useShapes/scatter/prepare-data.js +31 -0
- package/dist/cjs/hooks/useShapes/scatter/types.d.ts +17 -0
- package/dist/cjs/hooks/useShapes/scatter/types.js +1 -0
- package/dist/cjs/hooks/useShapes/styles.css +35 -0
- package/dist/cjs/hooks/useShapes/treemap/index.d.ts +12 -0
- package/dist/cjs/hooks/useShapes/treemap/index.js +98 -0
- package/dist/cjs/hooks/useShapes/treemap/prepare-data.d.ts +7 -0
- package/dist/cjs/hooks/useShapes/treemap/prepare-data.js +114 -0
- package/dist/cjs/hooks/useShapes/treemap/types.d.ts +16 -0
- package/dist/cjs/hooks/useShapes/treemap/types.js +1 -0
- package/dist/cjs/hooks/useShapes/utils.d.ts +29 -0
- package/dist/cjs/hooks/useShapes/utils.js +53 -0
- package/dist/cjs/hooks/useShapes/waterfall/index.d.ts +13 -0
- package/dist/cjs/hooks/useShapes/waterfall/index.js +127 -0
- package/dist/cjs/hooks/useShapes/waterfall/prepare-data.d.ts +12 -0
- package/dist/cjs/hooks/useShapes/waterfall/prepare-data.js +133 -0
- package/dist/cjs/hooks/useShapes/waterfall/types.d.ts +14 -0
- package/dist/cjs/hooks/useShapes/waterfall/types.js +1 -0
- package/dist/cjs/hooks/useSplit/index.d.ts +14 -0
- package/dist/cjs/hooks/useSplit/index.js +57 -0
- package/dist/cjs/hooks/useSplit/types.d.ts +17 -0
- package/dist/cjs/hooks/useSplit/types.js +1 -0
- package/dist/cjs/hooks/useTooltip/index.d.ts +13 -0
- package/dist/cjs/hooks/useTooltip/index.js +17 -0
- package/dist/cjs/hooks/useTooltip/types.d.ts +1 -0
- package/dist/cjs/hooks/useTooltip/types.js +1 -0
- package/dist/cjs/i18n/index.d.ts +8 -0
- package/dist/cjs/i18n/index.js +10 -0
- package/dist/cjs/index.d.ts +2 -0
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/libs/chart-error/index.d.ts +16 -0
- package/dist/cjs/libs/chart-error/index.js +19 -0
- package/dist/cjs/libs/format-number/i18n/en.json +17 -0
- package/dist/cjs/libs/format-number/i18n/i18n.d.ts +5 -0
- package/dist/cjs/libs/format-number/i18n/i18n.js +8 -0
- package/dist/cjs/libs/format-number/i18n/ru.json +17 -0
- package/dist/cjs/libs/format-number/index.d.ts +5 -0
- package/dist/cjs/libs/format-number/index.js +87 -0
- package/dist/cjs/libs/format-number/types.d.ts +14 -0
- package/dist/cjs/libs/format-number/types.js +1 -0
- package/dist/cjs/libs/index.d.ts +2 -0
- package/dist/cjs/libs/index.js +2 -0
- package/dist/cjs/types/chart/area.d.ts +76 -0
- package/dist/cjs/types/chart/area.js +1 -0
- package/dist/cjs/types/chart/axis.d.ts +85 -0
- package/dist/cjs/types/chart/axis.js +1 -0
- package/dist/cjs/types/chart/bar-x.d.ts +67 -0
- package/dist/cjs/types/chart/bar-x.js +1 -0
- package/dist/cjs/types/chart/bar-y.d.ts +60 -0
- package/dist/cjs/types/chart/bar-y.js +1 -0
- package/dist/cjs/types/chart/base.d.ts +48 -0
- package/dist/cjs/types/chart/base.js +1 -0
- package/dist/cjs/types/chart/chart.d.ts +15 -0
- package/dist/cjs/types/chart/chart.js +1 -0
- package/dist/cjs/types/chart/halo.d.ts +9 -0
- package/dist/cjs/types/chart/halo.js +1 -0
- package/dist/cjs/types/chart/legend.d.ts +92 -0
- package/dist/cjs/types/chart/legend.js +1 -0
- package/dist/cjs/types/chart/line.d.ts +57 -0
- package/dist/cjs/types/chart/line.js +1 -0
- package/dist/cjs/types/chart/marker.d.ts +12 -0
- package/dist/cjs/types/chart/marker.js +1 -0
- package/dist/cjs/types/chart/pie.d.ts +88 -0
- package/dist/cjs/types/chart/pie.js +1 -0
- package/dist/cjs/types/chart/scatter.d.ts +46 -0
- package/dist/cjs/types/chart/scatter.js +1 -0
- package/dist/cjs/types/chart/series.d.ts +226 -0
- package/dist/cjs/types/chart/series.js +1 -0
- package/dist/cjs/types/chart/split.d.ts +13 -0
- package/dist/cjs/types/chart/split.js +1 -0
- package/dist/cjs/types/chart/title.d.ts +5 -0
- package/dist/cjs/types/chart/title.js +1 -0
- package/dist/cjs/types/chart/tooltip.d.ts +67 -0
- package/dist/cjs/types/chart/tooltip.js +1 -0
- package/dist/cjs/types/chart/treemap.d.ts +46 -0
- package/dist/cjs/types/chart/treemap.js +1 -0
- package/dist/cjs/types/chart/waterfall.d.ts +40 -0
- package/dist/cjs/types/chart/waterfall.js +1 -0
- package/dist/cjs/types/chart-ui.d.ts +24 -0
- package/dist/cjs/types/chart-ui.js +1 -0
- package/dist/cjs/types/formatter.d.ts +14 -0
- package/dist/cjs/types/formatter.js +1 -0
- package/dist/cjs/types/index.d.ts +42 -0
- package/dist/cjs/types/index.js +19 -0
- package/dist/cjs/types/misc.d.ts +4 -0
- package/dist/cjs/types/misc.js +1 -0
- package/dist/cjs/utils/chart/axis-generators/bottom.d.ts +24 -0
- package/dist/cjs/utils/chart/axis-generators/bottom.js +126 -0
- package/dist/cjs/utils/chart/axis-generators/index.d.ts +1 -0
- package/dist/cjs/utils/chart/axis-generators/index.js +1 -0
- package/dist/cjs/utils/chart/axis.d.ts +31 -0
- package/dist/cjs/utils/chart/axis.js +71 -0
- package/dist/cjs/utils/chart/color.d.ts +10 -0
- package/dist/cjs/utils/chart/color.js +43 -0
- package/dist/cjs/utils/chart/get-closest-data.d.ts +15 -0
- package/dist/cjs/utils/chart/get-closest-data.js +172 -0
- package/dist/cjs/utils/chart/index.d.ts +78 -0
- package/dist/cjs/utils/chart/index.js +210 -0
- package/dist/cjs/utils/chart/labels.d.ts +6 -0
- package/dist/cjs/utils/chart/labels.js +44 -0
- package/dist/cjs/utils/chart/legend.d.ts +8 -0
- package/dist/cjs/utils/chart/legend.js +23 -0
- package/dist/cjs/utils/chart/math.d.ts +25 -0
- package/dist/cjs/utils/chart/math.js +51 -0
- package/dist/cjs/utils/chart/series/index.d.ts +1 -0
- package/dist/cjs/utils/chart/series/index.js +1 -0
- package/dist/cjs/utils/chart/series/waterfall.d.ts +4 -0
- package/dist/cjs/utils/chart/series/waterfall.js +25 -0
- package/dist/cjs/utils/chart/symbol.d.ts +3 -0
- package/dist/cjs/utils/chart/symbol.js +36 -0
- package/dist/cjs/utils/chart/text.d.ts +29 -0
- package/dist/cjs/utils/chart/text.js +139 -0
- package/dist/cjs/utils/chart/time.d.ts +3 -0
- package/dist/cjs/utils/chart/time.js +34 -0
- package/dist/cjs/utils/chart-ui/index.d.ts +4 -0
- package/dist/cjs/utils/chart-ui/index.js +4 -0
- package/dist/cjs/utils/chart-ui/pie-center-text.d.ts +7 -0
- package/dist/cjs/utils/chart-ui/pie-center-text.js +23 -0
- package/dist/cjs/utils/cn.d.ts +3 -0
- package/dist/cjs/utils/cn.js +4 -0
- package/dist/cjs/utils/d3-dispatcher.d.ts +1 -0
- package/dist/cjs/utils/d3-dispatcher.js +4 -0
- package/dist/cjs/utils/index.d.ts +5 -0
- package/dist/cjs/utils/index.js +5 -0
- package/dist/cjs/utils/misc.d.ts +2 -0
- package/dist/cjs/utils/misc.js +8 -0
- package/dist/cjs/validation/index.d.ts +2 -0
- package/dist/cjs/validation/index.js +220 -0
- package/dist/esm/components/Axis/AxisX.d.ts +20 -0
- package/dist/esm/components/Axis/AxisX.js +108 -0
- package/dist/esm/components/Axis/AxisY.d.ts +12 -0
- package/dist/esm/components/Axis/AxisY.js +199 -0
- package/dist/esm/components/Axis/index.d.ts +2 -0
- package/dist/esm/components/Axis/index.js +2 -0
- package/dist/esm/components/Axis/styles.css +17 -0
- package/dist/esm/components/ChartInner/index.d.ts +10 -0
- package/dist/esm/components/ChartInner/index.js +143 -0
- package/dist/esm/components/ChartInner/styles.css +10 -0
- package/dist/esm/components/Legend/index.d.ts +13 -0
- package/dist/esm/components/Legend/index.js +278 -0
- package/dist/esm/components/Legend/styles.css +47 -0
- package/dist/esm/components/PlotTitle/index.d.ts +8 -0
- package/dist/esm/components/PlotTitle/index.js +13 -0
- package/dist/esm/components/PlotTitle/styles.css +5 -0
- package/dist/esm/components/Title/index.d.ts +8 -0
- package/dist/esm/components/Title/index.js +9 -0
- package/dist/esm/components/Title/styles.css +5 -0
- package/dist/esm/components/Tooltip/DefaultContent.d.ts +10 -0
- package/dist/esm/components/Tooltip/DefaultContent.js +101 -0
- package/dist/esm/components/Tooltip/index.d.ts +13 -0
- package/dist/esm/components/Tooltip/index.js +29 -0
- package/dist/esm/components/Tooltip/styles.css +29 -0
- package/dist/esm/components/index.d.ts +18 -0
- package/dist/esm/components/index.js +66 -0
- package/dist/esm/constants/defaults/axis.d.ts +14 -0
- package/dist/esm/constants/defaults/axis.js +18 -0
- package/dist/esm/constants/defaults/index.d.ts +3 -0
- package/dist/esm/constants/defaults/index.js +3 -0
- package/dist/esm/constants/defaults/legend.d.ts +13 -0
- package/dist/esm/constants/defaults/legend.js +12 -0
- package/dist/esm/constants/defaults/series-options.d.ts +24 -0
- package/dist/esm/constants/defaults/series-options.js +106 -0
- package/dist/esm/constants/index.d.ts +46 -0
- package/dist/esm/constants/index.js +71 -0
- package/dist/esm/hooks/index.d.ts +10 -0
- package/dist/esm/hooks/index.js +10 -0
- package/dist/esm/hooks/useAxisScales/index.d.ts +25 -0
- package/dist/esm/hooks/useAxisScales/index.js +183 -0
- package/dist/esm/hooks/useChartDimensions/index.d.ts +16 -0
- package/dist/esm/hooks/useChartDimensions/index.js +34 -0
- package/dist/esm/hooks/useChartDimensions/utils.d.ts +10 -0
- package/dist/esm/hooks/useChartDimensions/utils.js +32 -0
- package/dist/esm/hooks/useChartOptions/chart.d.ts +6 -0
- package/dist/esm/hooks/useChartOptions/chart.js +28 -0
- package/dist/esm/hooks/useChartOptions/index.d.ts +7 -0
- package/dist/esm/hooks/useChartOptions/index.js +21 -0
- package/dist/esm/hooks/useChartOptions/title.d.ts +5 -0
- package/dist/esm/hooks/useChartOptions/title.js +18 -0
- package/dist/esm/hooks/useChartOptions/tooltip.d.ts +5 -0
- package/dist/esm/hooks/useChartOptions/tooltip.js +5 -0
- package/dist/esm/hooks/useChartOptions/types.d.ts +47 -0
- package/dist/esm/hooks/useChartOptions/types.js +1 -0
- package/dist/esm/hooks/useChartOptions/x-axis.d.ts +7 -0
- package/dist/esm/hooks/useChartOptions/x-axis.js +115 -0
- package/dist/esm/hooks/useChartOptions/y-axis.d.ts +7 -0
- package/dist/esm/hooks/useChartOptions/y-axis.js +117 -0
- package/dist/esm/hooks/useSeries/constants.d.ts +8 -0
- package/dist/esm/hooks/useSeries/constants.js +19 -0
- package/dist/esm/hooks/useSeries/index.d.ts +29 -0
- package/dist/esm/hooks/useSeries/index.js +82 -0
- package/dist/esm/hooks/useSeries/prepare-area.d.ts +19 -0
- package/dist/esm/hooks/useSeries/prepare-area.js +63 -0
- package/dist/esm/hooks/useSeries/prepare-bar-x.d.ts +10 -0
- package/dist/esm/hooks/useSeries/prepare-bar-x.js +38 -0
- package/dist/esm/hooks/useSeries/prepare-bar-y.d.ts +10 -0
- package/dist/esm/hooks/useSeries/prepare-bar-y.js +48 -0
- package/dist/esm/hooks/useSeries/prepare-legend.d.ts +27 -0
- package/dist/esm/hooks/useSeries/prepare-legend.js +144 -0
- package/dist/esm/hooks/useSeries/prepare-line.d.ts +22 -0
- package/dist/esm/hooks/useSeries/prepare-line.js +82 -0
- package/dist/esm/hooks/useSeries/prepare-options.d.ts +3 -0
- package/dist/esm/hooks/useSeries/prepare-options.js +5 -0
- package/dist/esm/hooks/useSeries/prepare-pie.d.ts +9 -0
- package/dist/esm/hooks/useSeries/prepare-pie.js +62 -0
- package/dist/esm/hooks/useSeries/prepare-scatter.d.ts +11 -0
- package/dist/esm/hooks/useSeries/prepare-scatter.js +46 -0
- package/dist/esm/hooks/useSeries/prepare-treemap.d.ts +11 -0
- package/dist/esm/hooks/useSeries/prepare-treemap.js +38 -0
- package/dist/esm/hooks/useSeries/prepare-waterfall.d.ts +10 -0
- package/dist/esm/hooks/useSeries/prepare-waterfall.js +37 -0
- package/dist/esm/hooks/useSeries/prepareSeries.d.ts +10 -0
- package/dist/esm/hooks/useSeries/prepareSeries.js +65 -0
- package/dist/esm/hooks/useSeries/types.d.ts +253 -0
- package/dist/esm/hooks/useSeries/types.js +1 -0
- package/dist/esm/hooks/useSeries/utils.d.ts +7 -0
- package/dist/esm/hooks/useSeries/utils.js +33 -0
- package/dist/esm/hooks/useShapes/HtmlLayer.d.ts +8 -0
- package/dist/esm/hooks/useShapes/HtmlLayer.js +22 -0
- package/dist/esm/hooks/useShapes/area/index.d.ts +12 -0
- package/dist/esm/hooks/useShapes/area/index.js +143 -0
- package/dist/esm/hooks/useShapes/area/prepare-data.d.ts +12 -0
- package/dist/esm/hooks/useShapes/area/prepare-data.js +158 -0
- package/dist/esm/hooks/useShapes/area/types.d.ts +27 -0
- package/dist/esm/hooks/useShapes/area/types.js +1 -0
- package/dist/esm/hooks/useShapes/bar-x/index.d.ts +13 -0
- package/dist/esm/hooks/useShapes/bar-x/index.js +95 -0
- package/dist/esm/hooks/useShapes/bar-x/prepare-data.d.ts +13 -0
- package/dist/esm/hooks/useShapes/bar-x/prepare-data.js +160 -0
- package/dist/esm/hooks/useShapes/bar-x/types.d.ts +12 -0
- package/dist/esm/hooks/useShapes/bar-x/types.js +1 -0
- package/dist/esm/hooks/useShapes/bar-y/index.d.ts +12 -0
- package/dist/esm/hooks/useShapes/bar-y/index.js +84 -0
- package/dist/esm/hooks/useShapes/bar-y/prepare-data.d.ts +12 -0
- package/dist/esm/hooks/useShapes/bar-y/prepare-data.js +169 -0
- package/dist/esm/hooks/useShapes/bar-y/types.d.ts +13 -0
- package/dist/esm/hooks/useShapes/bar-y/types.js +1 -0
- package/dist/esm/hooks/useShapes/constants.d.ts +3 -0
- package/dist/esm/hooks/useShapes/constants.js +3 -0
- package/dist/esm/hooks/useShapes/index.d.ts +33 -0
- package/dist/esm/hooks/useShapes/index.js +154 -0
- package/dist/esm/hooks/useShapes/line/index.d.ts +12 -0
- package/dist/esm/hooks/useShapes/line/index.js +130 -0
- package/dist/esm/hooks/useShapes/line/prepare-data.d.ts +13 -0
- package/dist/esm/hooks/useShapes/line/prepare-data.js +91 -0
- package/dist/esm/hooks/useShapes/line/types.d.ts +29 -0
- package/dist/esm/hooks/useShapes/line/types.js +1 -0
- package/dist/esm/hooks/useShapes/marker.d.ts +14 -0
- package/dist/esm/hooks/useShapes/marker.js +75 -0
- package/dist/esm/hooks/useShapes/pie/index.d.ts +13 -0
- package/dist/esm/hooks/useShapes/pie/index.js +171 -0
- package/dist/esm/hooks/useShapes/pie/prepare-data.d.ts +9 -0
- package/dist/esm/hooks/useShapes/pie/prepare-data.js +186 -0
- package/dist/esm/hooks/useShapes/pie/types.d.ts +41 -0
- package/dist/esm/hooks/useShapes/pie/types.js +1 -0
- package/dist/esm/hooks/useShapes/pie/utils.d.ts +4 -0
- package/dist/esm/hooks/useShapes/pie/utils.js +15 -0
- package/dist/esm/hooks/useShapes/scatter/index.d.ts +12 -0
- package/dist/esm/hooks/useShapes/scatter/index.js +69 -0
- package/dist/esm/hooks/useShapes/scatter/prepare-data.d.ts +11 -0
- package/dist/esm/hooks/useShapes/scatter/prepare-data.js +31 -0
- package/dist/esm/hooks/useShapes/scatter/types.d.ts +17 -0
- package/dist/esm/hooks/useShapes/scatter/types.js +1 -0
- package/dist/esm/hooks/useShapes/styles.css +35 -0
- package/dist/esm/hooks/useShapes/treemap/index.d.ts +12 -0
- package/dist/esm/hooks/useShapes/treemap/index.js +98 -0
- package/dist/esm/hooks/useShapes/treemap/prepare-data.d.ts +7 -0
- package/dist/esm/hooks/useShapes/treemap/prepare-data.js +114 -0
- package/dist/esm/hooks/useShapes/treemap/types.d.ts +16 -0
- package/dist/esm/hooks/useShapes/treemap/types.js +1 -0
- package/dist/esm/hooks/useShapes/utils.d.ts +29 -0
- package/dist/esm/hooks/useShapes/utils.js +53 -0
- package/dist/esm/hooks/useShapes/waterfall/index.d.ts +13 -0
- package/dist/esm/hooks/useShapes/waterfall/index.js +127 -0
- package/dist/esm/hooks/useShapes/waterfall/prepare-data.d.ts +12 -0
- package/dist/esm/hooks/useShapes/waterfall/prepare-data.js +133 -0
- package/dist/esm/hooks/useShapes/waterfall/types.d.ts +14 -0
- package/dist/esm/hooks/useShapes/waterfall/types.js +1 -0
- package/dist/esm/hooks/useSplit/index.d.ts +14 -0
- package/dist/esm/hooks/useSplit/index.js +57 -0
- package/dist/esm/hooks/useSplit/types.d.ts +17 -0
- package/dist/esm/hooks/useSplit/types.js +1 -0
- package/dist/esm/hooks/useTooltip/index.d.ts +13 -0
- package/dist/esm/hooks/useTooltip/index.js +17 -0
- package/dist/esm/hooks/useTooltip/types.d.ts +1 -0
- package/dist/esm/hooks/useTooltip/types.js +1 -0
- package/dist/esm/i18n/index.d.ts +8 -0
- package/dist/esm/i18n/index.js +10 -0
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/libs/chart-error/index.d.ts +16 -0
- package/dist/esm/libs/chart-error/index.js +19 -0
- package/dist/esm/libs/format-number/i18n/en.json +17 -0
- package/dist/esm/libs/format-number/i18n/i18n.d.ts +5 -0
- package/dist/esm/libs/format-number/i18n/i18n.js +8 -0
- package/dist/esm/libs/format-number/i18n/ru.json +17 -0
- package/dist/esm/libs/format-number/index.d.ts +5 -0
- package/dist/esm/libs/format-number/index.js +87 -0
- package/dist/esm/libs/format-number/types.d.ts +14 -0
- package/dist/esm/libs/format-number/types.js +1 -0
- package/dist/esm/libs/index.d.ts +2 -0
- package/dist/esm/libs/index.js +2 -0
- package/dist/esm/types/chart/area.d.ts +76 -0
- package/dist/esm/types/chart/area.js +1 -0
- package/dist/esm/types/chart/axis.d.ts +85 -0
- package/dist/esm/types/chart/axis.js +1 -0
- package/dist/esm/types/chart/bar-x.d.ts +67 -0
- package/dist/esm/types/chart/bar-x.js +1 -0
- package/dist/esm/types/chart/bar-y.d.ts +60 -0
- package/dist/esm/types/chart/bar-y.js +1 -0
- package/dist/esm/types/chart/base.d.ts +48 -0
- package/dist/esm/types/chart/base.js +1 -0
- package/dist/esm/types/chart/chart.d.ts +15 -0
- package/dist/esm/types/chart/chart.js +1 -0
- package/dist/esm/types/chart/halo.d.ts +9 -0
- package/dist/esm/types/chart/halo.js +1 -0
- package/dist/esm/types/chart/legend.d.ts +92 -0
- package/dist/esm/types/chart/legend.js +1 -0
- package/dist/esm/types/chart/line.d.ts +57 -0
- package/dist/esm/types/chart/line.js +1 -0
- package/dist/esm/types/chart/marker.d.ts +12 -0
- package/dist/esm/types/chart/marker.js +1 -0
- package/dist/esm/types/chart/pie.d.ts +88 -0
- package/dist/esm/types/chart/pie.js +1 -0
- package/dist/esm/types/chart/scatter.d.ts +46 -0
- package/dist/esm/types/chart/scatter.js +1 -0
- package/dist/esm/types/chart/series.d.ts +226 -0
- package/dist/esm/types/chart/series.js +1 -0
- package/dist/esm/types/chart/split.d.ts +13 -0
- package/dist/esm/types/chart/split.js +1 -0
- package/dist/esm/types/chart/title.d.ts +5 -0
- package/dist/esm/types/chart/title.js +1 -0
- package/dist/esm/types/chart/tooltip.d.ts +67 -0
- package/dist/esm/types/chart/tooltip.js +1 -0
- package/dist/esm/types/chart/treemap.d.ts +46 -0
- package/dist/esm/types/chart/treemap.js +1 -0
- package/dist/esm/types/chart/waterfall.d.ts +40 -0
- package/dist/esm/types/chart/waterfall.js +1 -0
- package/dist/esm/types/chart-ui.d.ts +24 -0
- package/dist/esm/types/chart-ui.js +1 -0
- package/dist/esm/types/formatter.d.ts +14 -0
- package/dist/esm/types/formatter.js +1 -0
- package/dist/esm/types/index.d.ts +42 -0
- package/dist/esm/types/index.js +19 -0
- package/dist/esm/types/misc.d.ts +4 -0
- package/dist/esm/types/misc.js +1 -0
- package/dist/esm/utils/chart/axis-generators/bottom.d.ts +24 -0
- package/dist/esm/utils/chart/axis-generators/bottom.js +126 -0
- package/dist/esm/utils/chart/axis-generators/index.d.ts +1 -0
- package/dist/esm/utils/chart/axis-generators/index.js +1 -0
- package/dist/esm/utils/chart/axis.d.ts +31 -0
- package/dist/esm/utils/chart/axis.js +71 -0
- package/dist/esm/utils/chart/color.d.ts +10 -0
- package/dist/esm/utils/chart/color.js +43 -0
- package/dist/esm/utils/chart/get-closest-data.d.ts +15 -0
- package/dist/esm/utils/chart/get-closest-data.js +172 -0
- package/dist/esm/utils/chart/index.d.ts +78 -0
- package/dist/esm/utils/chart/index.js +210 -0
- package/dist/esm/utils/chart/labels.d.ts +6 -0
- package/dist/esm/utils/chart/labels.js +44 -0
- package/dist/esm/utils/chart/legend.d.ts +8 -0
- package/dist/esm/utils/chart/legend.js +23 -0
- package/dist/esm/utils/chart/math.d.ts +25 -0
- package/dist/esm/utils/chart/math.js +51 -0
- package/dist/esm/utils/chart/series/index.d.ts +1 -0
- package/dist/esm/utils/chart/series/index.js +1 -0
- package/dist/esm/utils/chart/series/waterfall.d.ts +4 -0
- package/dist/esm/utils/chart/series/waterfall.js +25 -0
- package/dist/esm/utils/chart/symbol.d.ts +3 -0
- package/dist/esm/utils/chart/symbol.js +36 -0
- package/dist/esm/utils/chart/text.d.ts +29 -0
- package/dist/esm/utils/chart/text.js +139 -0
- package/dist/esm/utils/chart/time.d.ts +3 -0
- package/dist/esm/utils/chart/time.js +34 -0
- package/dist/esm/utils/chart-ui/index.d.ts +4 -0
- package/dist/esm/utils/chart-ui/index.js +4 -0
- package/dist/esm/utils/chart-ui/pie-center-text.d.ts +7 -0
- package/dist/esm/utils/chart-ui/pie-center-text.js +23 -0
- package/dist/esm/utils/cn.d.ts +3 -0
- package/dist/esm/utils/cn.js +4 -0
- package/dist/esm/utils/d3-dispatcher.d.ts +1 -0
- package/dist/esm/utils/d3-dispatcher.js +4 -0
- package/dist/esm/utils/index.d.ts +5 -0
- package/dist/esm/utils/index.js +5 -0
- package/dist/esm/utils/misc.d.ts +2 -0
- package/dist/esm/utils/misc.js +8 -0
- package/dist/esm/validation/index.d.ts +2 -0
- package/dist/esm/validation/index.js +220 -0
- package/package.json +140 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import get from 'lodash/get';
|
|
2
|
+
import { calculateNumericProperty, getHorisontalSvgTextHeight } from '../../utils';
|
|
3
|
+
const DEFAULT_TITLE_FONT_SIZE = '15px';
|
|
4
|
+
const TITLE_TOP_BOTTOM_PADDING = 8;
|
|
5
|
+
function preparePlotTitle(args) {
|
|
6
|
+
const { title, plotIndex, plotHeight, chartWidth, gap } = args;
|
|
7
|
+
const titleText = (title === null || title === void 0 ? void 0 : title.text) || '';
|
|
8
|
+
const titleStyle = {
|
|
9
|
+
fontSize: get(title, 'style.fontSize', DEFAULT_TITLE_FONT_SIZE),
|
|
10
|
+
fontWeight: get(title, 'style.fontWeight'),
|
|
11
|
+
};
|
|
12
|
+
const titleHeight = titleText
|
|
13
|
+
? getHorisontalSvgTextHeight({ text: titleText, style: titleStyle }) +
|
|
14
|
+
TITLE_TOP_BOTTOM_PADDING * 2
|
|
15
|
+
: 0;
|
|
16
|
+
const top = plotIndex * (plotHeight + gap);
|
|
17
|
+
return {
|
|
18
|
+
text: titleText,
|
|
19
|
+
x: chartWidth / 2,
|
|
20
|
+
y: top + titleHeight / 2,
|
|
21
|
+
style: titleStyle,
|
|
22
|
+
height: titleHeight,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export function getPlotHeight(args) {
|
|
26
|
+
const { split, boundsHeight, gap } = args;
|
|
27
|
+
const plots = (split === null || split === void 0 ? void 0 : split.plots) || [];
|
|
28
|
+
if (plots.length > 1) {
|
|
29
|
+
return (boundsHeight - gap * (plots.length - 1)) / plots.length;
|
|
30
|
+
}
|
|
31
|
+
return boundsHeight;
|
|
32
|
+
}
|
|
33
|
+
export const useSplit = (args) => {
|
|
34
|
+
var _a;
|
|
35
|
+
const { split, boundsHeight, chartWidth } = args;
|
|
36
|
+
const splitGap = (_a = calculateNumericProperty({ value: split === null || split === void 0 ? void 0 : split.gap, base: boundsHeight })) !== null && _a !== void 0 ? _a : 0;
|
|
37
|
+
const plotHeight = getPlotHeight({ split: split, boundsHeight, gap: splitGap });
|
|
38
|
+
const plots = (split === null || split === void 0 ? void 0 : split.plots) || [];
|
|
39
|
+
return {
|
|
40
|
+
plots: plots.map((p, index) => {
|
|
41
|
+
const title = preparePlotTitle({
|
|
42
|
+
title: p.title,
|
|
43
|
+
plotIndex: index,
|
|
44
|
+
gap: splitGap,
|
|
45
|
+
plotHeight,
|
|
46
|
+
chartWidth,
|
|
47
|
+
});
|
|
48
|
+
const top = index * (plotHeight + splitGap);
|
|
49
|
+
return {
|
|
50
|
+
top: top + title.height,
|
|
51
|
+
height: plotHeight - title.height,
|
|
52
|
+
title,
|
|
53
|
+
};
|
|
54
|
+
}),
|
|
55
|
+
gap: splitGap,
|
|
56
|
+
};
|
|
57
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { BaseTextStyle } from '../../types';
|
|
2
|
+
export type PreparedSplit = {
|
|
3
|
+
plots: PreparedPlot[];
|
|
4
|
+
gap: number;
|
|
5
|
+
};
|
|
6
|
+
export type PreparedPlot = {
|
|
7
|
+
title: PreparedPlotTitle;
|
|
8
|
+
top: number;
|
|
9
|
+
height: number;
|
|
10
|
+
};
|
|
11
|
+
export type PreparedPlotTitle = {
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
text: string;
|
|
15
|
+
style?: Partial<BaseTextStyle>;
|
|
16
|
+
height: number;
|
|
17
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Dispatch } from 'd3';
|
|
2
|
+
import type { TooltipDataChunk } from '../../types';
|
|
3
|
+
import type { PreparedTooltip } from '../useChartOptions/types';
|
|
4
|
+
import type { PointerPosition } from './types';
|
|
5
|
+
type Args = {
|
|
6
|
+
dispatcher: Dispatch<object>;
|
|
7
|
+
tooltip: PreparedTooltip;
|
|
8
|
+
};
|
|
9
|
+
export declare const useTooltip: ({ dispatcher, tooltip }: Args) => {
|
|
10
|
+
hovered: TooltipDataChunk[] | undefined;
|
|
11
|
+
pointerPosition: PointerPosition | undefined;
|
|
12
|
+
};
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export const useTooltip = ({ dispatcher, tooltip }) => {
|
|
3
|
+
const [{ hovered, pointerPosition }, setTooltipState] = React.useState({});
|
|
4
|
+
React.useEffect(() => {
|
|
5
|
+
if (tooltip === null || tooltip === void 0 ? void 0 : tooltip.enabled) {
|
|
6
|
+
dispatcher.on('hover-shape.tooltip', (nextHovered, nextPointerPosition) => {
|
|
7
|
+
setTooltipState({ hovered: nextHovered, pointerPosition: nextPointerPosition });
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
return () => {
|
|
11
|
+
if (tooltip === null || tooltip === void 0 ? void 0 : tooltip.enabled) {
|
|
12
|
+
dispatcher.on('hover-shape.tooltip', null);
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
}, [dispatcher, tooltip]);
|
|
16
|
+
return { hovered, pointerPosition };
|
|
17
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type PointerPosition = [number, number];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { I18NFn } from '@gravity-ui/i18n';
|
|
2
|
+
import { I18N } from '@gravity-ui/i18n';
|
|
3
|
+
import en from './keysets/en.json';
|
|
4
|
+
type Keysets = typeof en;
|
|
5
|
+
type TypedI18n = I18NFn<Keysets>;
|
|
6
|
+
declare const i18nFactory: I18N;
|
|
7
|
+
declare const i18n: TypedI18n;
|
|
8
|
+
export { i18nFactory, i18n };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { I18N } from '@gravity-ui/i18n';
|
|
2
|
+
import en from './keysets/en.json';
|
|
3
|
+
import ru from './keysets/ru.json';
|
|
4
|
+
const i18nFactory = new I18N();
|
|
5
|
+
i18nFactory.registerKeysets('en', en);
|
|
6
|
+
i18nFactory.registerKeysets('ru', ru);
|
|
7
|
+
i18nFactory.setLang('en');
|
|
8
|
+
i18nFactory.setFallbackLang('en');
|
|
9
|
+
const i18n = i18nFactory.i18n.bind(i18nFactory);
|
|
10
|
+
export { i18nFactory, i18n };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type ChartErrorArgs = {
|
|
2
|
+
code?: number | string;
|
|
3
|
+
originalError?: Error;
|
|
4
|
+
message?: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const CHART_ERROR_CODE: {
|
|
7
|
+
NO_DATA: string;
|
|
8
|
+
INVALID_DATA: string;
|
|
9
|
+
UNKNOWN: string;
|
|
10
|
+
};
|
|
11
|
+
export declare class ChartError extends Error {
|
|
12
|
+
readonly code: number | string;
|
|
13
|
+
readonly isChartError = true;
|
|
14
|
+
constructor({ originalError, message, code }?: ChartErrorArgs);
|
|
15
|
+
}
|
|
16
|
+
export declare const isChartError: (error: unknown) => error is ChartError;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export const CHART_ERROR_CODE = {
|
|
2
|
+
NO_DATA: 'NO_DATA',
|
|
3
|
+
INVALID_DATA: 'INVALID_DATA',
|
|
4
|
+
UNKNOWN: 'UNKNOWN_ERROR',
|
|
5
|
+
};
|
|
6
|
+
export class ChartError extends Error {
|
|
7
|
+
constructor({ originalError, message, code = CHART_ERROR_CODE.UNKNOWN } = {}) {
|
|
8
|
+
super(message);
|
|
9
|
+
this.isChartError = true;
|
|
10
|
+
this.code = code;
|
|
11
|
+
if (originalError) {
|
|
12
|
+
this.name = originalError.name;
|
|
13
|
+
this.stack = originalError.stack;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export const isChartError = (error) => {
|
|
18
|
+
return error instanceof Error && 'isChartError' in error;
|
|
19
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"units": {
|
|
3
|
+
"value_short-bytes": "B",
|
|
4
|
+
"value_short-kilobytes": "KB",
|
|
5
|
+
"value_short-megabytes": "MB",
|
|
6
|
+
"value_short-milliseconds": "ms",
|
|
7
|
+
"value_short-seconds": "s",
|
|
8
|
+
"value_short-minutes": "m",
|
|
9
|
+
"value_short-empty": "",
|
|
10
|
+
"value_short-k": "K",
|
|
11
|
+
"value_short-m": "M",
|
|
12
|
+
"value_short-b": "B",
|
|
13
|
+
"value_short-t": "T",
|
|
14
|
+
"value_space-delimiter": " ",
|
|
15
|
+
"value_number-delimiter": ""
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { I18N } from '@gravity-ui/i18n';
|
|
2
|
+
type KeysetData = Parameters<InstanceType<typeof I18N>['registerKeysets']>[1];
|
|
3
|
+
declare const i18nInstance: I18N;
|
|
4
|
+
declare const makeInstance: (keysetName: string, keysetsData: Record<string, KeysetData>) => (key: string, params?: import("@gravity-ui/i18n").Params | undefined) => string;
|
|
5
|
+
export { i18nInstance, makeInstance };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { I18N } from '@gravity-ui/i18n';
|
|
2
|
+
const i18nInstance = new I18N();
|
|
3
|
+
i18nInstance.setLang('ru');
|
|
4
|
+
const makeInstance = (keysetName, keysetsData) => {
|
|
5
|
+
Object.entries(keysetsData).forEach(([key, value]) => i18nInstance.registerKeysets(key, value));
|
|
6
|
+
return i18nInstance.i18n.bind(i18nInstance, keysetName);
|
|
7
|
+
};
|
|
8
|
+
export { i18nInstance, makeInstance };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"units": {
|
|
3
|
+
"value_short-bytes": "Б",
|
|
4
|
+
"value_short-kilobytes": "КБ",
|
|
5
|
+
"value_short-megabytes": "МБ",
|
|
6
|
+
"value_short-milliseconds": "мс",
|
|
7
|
+
"value_short-seconds": "с",
|
|
8
|
+
"value_short-minutes": "м",
|
|
9
|
+
"value_short-empty": "",
|
|
10
|
+
"value_short-k": "K",
|
|
11
|
+
"value_short-m": "M",
|
|
12
|
+
"value_short-b": "B",
|
|
13
|
+
"value_short-t": "T",
|
|
14
|
+
"value_space-delimiter": " ",
|
|
15
|
+
"value_number-delimiter": ""
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { FormatNumberOptions, FormatOptions } from './types';
|
|
2
|
+
export declare const formatBytes: (value: number, options?: FormatOptions) => string;
|
|
3
|
+
export declare const formatDuration: (value: number, options?: FormatOptions) => string;
|
|
4
|
+
export declare const getNumberUnitRate: (value: number) => number;
|
|
5
|
+
export declare const formatNumber: (value: number | string, options?: FormatNumberOptions) => string;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { i18nInstance, makeInstance } from './i18n/i18n';
|
|
2
|
+
import en from './i18n/en.json';
|
|
3
|
+
import ru from './i18n/ru.json';
|
|
4
|
+
const i18n = makeInstance('units', { ru, en });
|
|
5
|
+
function getUnitRate(value, exponent, unitsI18nKeys) {
|
|
6
|
+
let resultUnitRate = 1;
|
|
7
|
+
while (Math.abs(value / Math.pow(exponent, resultUnitRate)) >= 1 &&
|
|
8
|
+
resultUnitRate < 10 &&
|
|
9
|
+
i18n(unitsI18nKeys[resultUnitRate])) {
|
|
10
|
+
resultUnitRate++;
|
|
11
|
+
}
|
|
12
|
+
return resultUnitRate - 1;
|
|
13
|
+
}
|
|
14
|
+
const unitFormatter = ({ exponent, unitsI18nKeys, unitDelimiterI18nKey, }) => {
|
|
15
|
+
return function formatUnit(value, options = {}) {
|
|
16
|
+
const { precision, unitRate, showRankDelimiter = true, lang } = options;
|
|
17
|
+
const i18nLang = i18nInstance.lang;
|
|
18
|
+
if (lang) {
|
|
19
|
+
i18nInstance.setLang(lang);
|
|
20
|
+
}
|
|
21
|
+
const resultUnitRate = typeof unitRate === 'number' ? unitRate : getUnitRate(value, exponent, unitsI18nKeys);
|
|
22
|
+
let result = value / Math.pow(exponent, resultUnitRate);
|
|
23
|
+
if (typeof precision === 'number') {
|
|
24
|
+
result = Number(result.toFixed(precision));
|
|
25
|
+
}
|
|
26
|
+
else if (precision === 'auto' && result % 1 !== 0) {
|
|
27
|
+
result = Number(result.toFixed(Math.abs(result) > 1 ? 2 : 4));
|
|
28
|
+
}
|
|
29
|
+
result = new Intl.NumberFormat(lang !== null && lang !== void 0 ? lang : i18nLang, {
|
|
30
|
+
minimumFractionDigits: typeof precision === 'number' ? precision : 0,
|
|
31
|
+
maximumFractionDigits: 20,
|
|
32
|
+
useGrouping: showRankDelimiter,
|
|
33
|
+
}).format(result);
|
|
34
|
+
const unit = i18n(unitsI18nKeys[resultUnitRate]);
|
|
35
|
+
const delimiter = i18n(unitDelimiterI18nKey);
|
|
36
|
+
i18nInstance.setLang(i18nLang);
|
|
37
|
+
return `${result}${delimiter}${unit}`;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
export const formatBytes = unitFormatter({
|
|
41
|
+
exponent: 1024,
|
|
42
|
+
unitDelimiterI18nKey: 'value_space-delimiter',
|
|
43
|
+
unitsI18nKeys: ['value_short-bytes', 'value_short-kilobytes', 'value_short-megabytes'],
|
|
44
|
+
});
|
|
45
|
+
export const formatDuration = unitFormatter({
|
|
46
|
+
exponent: 1000,
|
|
47
|
+
unitDelimiterI18nKey: 'value_space-delimiter',
|
|
48
|
+
unitsI18nKeys: ['value_short-milliseconds', 'value_short-seconds', 'value_short-minutes'],
|
|
49
|
+
});
|
|
50
|
+
const BASE_NUMBER_FORMAT_UNIT_KEYS = [
|
|
51
|
+
'value_short-empty',
|
|
52
|
+
'value_short-k',
|
|
53
|
+
'value_short-m',
|
|
54
|
+
'value_short-b',
|
|
55
|
+
'value_short-t',
|
|
56
|
+
];
|
|
57
|
+
const baseFormatNumber = unitFormatter({
|
|
58
|
+
exponent: 1000,
|
|
59
|
+
unitDelimiterI18nKey: 'value_number-delimiter',
|
|
60
|
+
unitsI18nKeys: BASE_NUMBER_FORMAT_UNIT_KEYS,
|
|
61
|
+
});
|
|
62
|
+
export const getNumberUnitRate = (value) => getUnitRate(value, 1000, BASE_NUMBER_FORMAT_UNIT_KEYS);
|
|
63
|
+
const NUMBER_UNIT_RATE_BY_UNIT = {
|
|
64
|
+
default: 0,
|
|
65
|
+
auto: undefined,
|
|
66
|
+
k: 1,
|
|
67
|
+
m: 2,
|
|
68
|
+
b: 3,
|
|
69
|
+
t: 4,
|
|
70
|
+
};
|
|
71
|
+
export const formatNumber = (value, options = {}) => {
|
|
72
|
+
if (Number.isNaN(value) || Number.isNaN(Number(value))) {
|
|
73
|
+
return new Intl.NumberFormat('en').format(Number(value));
|
|
74
|
+
}
|
|
75
|
+
const { format = 'number', multiplier = 1, prefix = '', postfix = '', unit, unitRate, labelMode, } = options;
|
|
76
|
+
let changedMultiplier = multiplier;
|
|
77
|
+
let prePostfix = '';
|
|
78
|
+
if (format === 'percent') {
|
|
79
|
+
changedMultiplier = 100;
|
|
80
|
+
prePostfix = '%';
|
|
81
|
+
}
|
|
82
|
+
if (labelMode === 'percent') {
|
|
83
|
+
prePostfix = '%';
|
|
84
|
+
}
|
|
85
|
+
const formattedValue = baseFormatNumber(Number(value) * changedMultiplier, Object.assign(Object.assign({}, options), { unitRate: unitRate !== null && unitRate !== void 0 ? unitRate : NUMBER_UNIT_RATE_BY_UNIT[unit !== null && unit !== void 0 ? unit : 'default'] }));
|
|
86
|
+
return `${prefix}${formattedValue}${prePostfix}${postfix}`;
|
|
87
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type FormatOptions = {
|
|
2
|
+
precision?: number | 'auto';
|
|
3
|
+
unitRate?: number;
|
|
4
|
+
showRankDelimiter?: boolean;
|
|
5
|
+
lang?: string;
|
|
6
|
+
labelMode?: string;
|
|
7
|
+
};
|
|
8
|
+
export type FormatNumberOptions = FormatOptions & {
|
|
9
|
+
format?: 'number' | 'percent';
|
|
10
|
+
multiplier?: number;
|
|
11
|
+
prefix?: string;
|
|
12
|
+
postfix?: string;
|
|
13
|
+
unit?: 'auto' | 'k' | 'm' | 'b' | 't' | null;
|
|
14
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import type { SeriesType } from '../../constants';
|
|
2
|
+
import type { MeaningfulAny } from '../misc';
|
|
3
|
+
import type { BaseSeries, BaseSeriesData } from './base';
|
|
4
|
+
import type { ChartLegend, RectLegendSymbolOptions } from './legend';
|
|
5
|
+
import type { PointMarkerOptions } from './marker';
|
|
6
|
+
export type AreaSeriesData<T = MeaningfulAny> = BaseSeriesData<T> & {
|
|
7
|
+
/**
|
|
8
|
+
* The `x` value of the point. Depending on the context , it may represents:
|
|
9
|
+
* - numeric value (for `linear` x axis)
|
|
10
|
+
* - timestamp value (for `datetime` x axis)
|
|
11
|
+
* - x axis category value (for `category` x axis). If the type is a string, then it is a category value itself. If the type is a number, then it is the index of an element in the array of categories described in `xAxis.categories`
|
|
12
|
+
*/
|
|
13
|
+
x?: string | number;
|
|
14
|
+
/**
|
|
15
|
+
* The `y` value of the point. Depending on the context , it may represents:
|
|
16
|
+
* - numeric value (for `linear` y axis)
|
|
17
|
+
* - timestamp value (for `datetime` y axis)
|
|
18
|
+
* - y axis category value (for `category` y axis). If the type is a string, then it is a category value itself. If the type is a number, then it is the index of an element in the array of categories described in `yAxis[0].categories`
|
|
19
|
+
*/
|
|
20
|
+
y?: string | number;
|
|
21
|
+
/** Data label value of the point. If not specified, the y value is used. */
|
|
22
|
+
label?: string | number;
|
|
23
|
+
/** Individual marker options for the point. */
|
|
24
|
+
marker?: {
|
|
25
|
+
/** States for a single point marker. */
|
|
26
|
+
states?: {
|
|
27
|
+
/** The normal state of a single point marker. */
|
|
28
|
+
normal?: {
|
|
29
|
+
/**
|
|
30
|
+
* Enable or disable the point marker.
|
|
31
|
+
*
|
|
32
|
+
* @default false
|
|
33
|
+
* */
|
|
34
|
+
enabled: boolean;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
export type AreaMarkerSymbol = 'circle' | 'square';
|
|
40
|
+
export type AreaMarkerOptions = PointMarkerOptions & {
|
|
41
|
+
symbol?: AreaMarkerSymbol;
|
|
42
|
+
};
|
|
43
|
+
export type AreaSeries<T = MeaningfulAny> = BaseSeries & {
|
|
44
|
+
type: typeof SeriesType.Area;
|
|
45
|
+
data: AreaSeriesData<T>[];
|
|
46
|
+
/** The name of the series (used in legend, tooltip etc) */
|
|
47
|
+
name: string;
|
|
48
|
+
/** Whether to stack the values of each series on top of each other.
|
|
49
|
+
* Possible values are undefined to disable, "normal" to stack by value or "percent"
|
|
50
|
+
*
|
|
51
|
+
* @default undefined
|
|
52
|
+
* */
|
|
53
|
+
stacking?: 'normal' | 'percent';
|
|
54
|
+
/** This option allows grouping series in a stacked chart */
|
|
55
|
+
stackId?: string;
|
|
56
|
+
/** The main color of the series (hex, rgba) */
|
|
57
|
+
color?: string;
|
|
58
|
+
/** Fill opacity for the area
|
|
59
|
+
*
|
|
60
|
+
* @default 0.75
|
|
61
|
+
* */
|
|
62
|
+
opacity?: number;
|
|
63
|
+
/** Pixel width of the graph line.
|
|
64
|
+
*
|
|
65
|
+
* @default 1
|
|
66
|
+
* */
|
|
67
|
+
lineWidth?: number;
|
|
68
|
+
/** Individual series legend options. Has higher priority than legend options in widget data */
|
|
69
|
+
legend?: ChartLegend & {
|
|
70
|
+
symbol?: RectLegendSymbolOptions;
|
|
71
|
+
};
|
|
72
|
+
/** Options for the point markers of line in area series */
|
|
73
|
+
marker?: AreaMarkerOptions;
|
|
74
|
+
/** Y-axis index (when using two axes) */
|
|
75
|
+
yAxis?: number;
|
|
76
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import type { FormatNumberOptions } from '../formatter';
|
|
2
|
+
import type { BaseTextStyle } from './base';
|
|
3
|
+
export type ChartAxisType = 'category' | 'datetime' | 'linear' | 'logarithmic';
|
|
4
|
+
export type ChartAxisTitleAlignment = 'left' | 'center' | 'right';
|
|
5
|
+
export type ChartAxisLabels = {
|
|
6
|
+
/** Enable or disable the axis labels. */
|
|
7
|
+
enabled?: boolean;
|
|
8
|
+
/** The label's pixel distance from the perimeter of the plot area.
|
|
9
|
+
*
|
|
10
|
+
* @default: 10
|
|
11
|
+
*/
|
|
12
|
+
margin?: number;
|
|
13
|
+
/** The pixel padding for axis labels, to ensure white space between them.
|
|
14
|
+
*
|
|
15
|
+
* @defaults: 5
|
|
16
|
+
* */
|
|
17
|
+
padding?: number;
|
|
18
|
+
dateFormat?: string;
|
|
19
|
+
numberFormat?: FormatNumberOptions;
|
|
20
|
+
style?: Partial<BaseTextStyle>;
|
|
21
|
+
/** For horizontal axes, enable label rotation to prevent overlapping labels.
|
|
22
|
+
* If there is enough space, labels are not rotated.
|
|
23
|
+
* As the chart gets narrower, it will start rotating the labels -45 degrees. */
|
|
24
|
+
autoRotation?: boolean;
|
|
25
|
+
/** Rotation of the labels in degrees.
|
|
26
|
+
*
|
|
27
|
+
* @default: 0
|
|
28
|
+
*/
|
|
29
|
+
rotation?: number;
|
|
30
|
+
};
|
|
31
|
+
export type ChartAxis = {
|
|
32
|
+
categories?: string[];
|
|
33
|
+
timestamps?: number[];
|
|
34
|
+
type?: ChartAxisType;
|
|
35
|
+
/** The axis labels show the number or category for each tick. */
|
|
36
|
+
labels?: ChartAxisLabels;
|
|
37
|
+
/** The color of the line marking the axis itself. */
|
|
38
|
+
lineColor?: string;
|
|
39
|
+
title?: {
|
|
40
|
+
text?: string;
|
|
41
|
+
/** CSS styles for the title */
|
|
42
|
+
style?: Partial<BaseTextStyle>;
|
|
43
|
+
/** The pixel distance between the axis labels or line and the title.
|
|
44
|
+
*
|
|
45
|
+
* Defaults to 4 for horizontal axes, 8 for vertical.
|
|
46
|
+
* */
|
|
47
|
+
margin?: number;
|
|
48
|
+
/** Alignment of the title. */
|
|
49
|
+
align?: ChartAxisTitleAlignment;
|
|
50
|
+
/** Allows limiting of the contents of a title block to the specified number of lines.
|
|
51
|
+
* Defaults to 1. */
|
|
52
|
+
maxRowCount?: number;
|
|
53
|
+
};
|
|
54
|
+
/** The minimum value of the axis. If undefined the min value is automatically calculate. */
|
|
55
|
+
min?: number;
|
|
56
|
+
/** The grid lines settings. */
|
|
57
|
+
grid?: {
|
|
58
|
+
/** Enable or disable the grid lines.
|
|
59
|
+
*
|
|
60
|
+
* Defaults to true.
|
|
61
|
+
* */
|
|
62
|
+
enabled?: boolean;
|
|
63
|
+
};
|
|
64
|
+
ticks?: {
|
|
65
|
+
/** Pixel interval of the tick marks. Not applicable to categorized axis.
|
|
66
|
+
* The specified value is only a hint; the interval between ticks can be greater or less depending on the data. */
|
|
67
|
+
pixelInterval?: number;
|
|
68
|
+
};
|
|
69
|
+
/** Padding of the max value relative to the length of the axis.
|
|
70
|
+
* A padding of 0.05 will make a 100px axis 5px longer.
|
|
71
|
+
*
|
|
72
|
+
* Defaults to 0.05 for Y axis and to 0.01 for X axis.
|
|
73
|
+
* */
|
|
74
|
+
maxPadding?: number;
|
|
75
|
+
};
|
|
76
|
+
export type ChartXAxis = ChartAxis;
|
|
77
|
+
export type ChartYAxis = ChartAxis & {
|
|
78
|
+
/** Axis location.
|
|
79
|
+
* Possible values - 'left' and 'right'.
|
|
80
|
+
* */
|
|
81
|
+
position?: 'left' | 'right';
|
|
82
|
+
/** Property for splitting charts. Determines which area the axis is located in.
|
|
83
|
+
* */
|
|
84
|
+
plotIndex?: number;
|
|
85
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { SeriesType } from '../../constants';
|
|
2
|
+
import type { MeaningfulAny } from '../misc';
|
|
3
|
+
import type { BaseSeries, BaseSeriesData } from './base';
|
|
4
|
+
import type { ChartLegend, RectLegendSymbolOptions } from './legend';
|
|
5
|
+
import type { ChartSeriesOptions } from './series';
|
|
6
|
+
export type BarXSeriesData<T = MeaningfulAny> = BaseSeriesData<T> & {
|
|
7
|
+
/**
|
|
8
|
+
* The `x` value of the bar. Depending on the context , it may represents:
|
|
9
|
+
* - numeric value (for `linear` x axis)
|
|
10
|
+
* - timestamp value (for `datetime` x axis)
|
|
11
|
+
* - x axis category value (for `category` x axis). If the type is a string, then it is a category value itself. If the type is a number, then it is the index of an element in the array of categories described in `xAxis.categories`
|
|
12
|
+
*/
|
|
13
|
+
x?: string | number;
|
|
14
|
+
/**
|
|
15
|
+
* The `y` value of the bar. Depending on the context , it may represents:
|
|
16
|
+
* - numeric value (for `linear` y axis)
|
|
17
|
+
* - timestamp value (for `datetime` y axis)
|
|
18
|
+
* - y axis category value (for `category` y axis). If the type is a string, then it is a category value itself. If the type is a number, then it is the index of an element in the array of categories described in `yAxis[0].categories`
|
|
19
|
+
*/
|
|
20
|
+
y?: string | number;
|
|
21
|
+
/**
|
|
22
|
+
* Corresponding value of axis category.
|
|
23
|
+
*
|
|
24
|
+
* @deprecated use `x` or `y` instead
|
|
25
|
+
*/
|
|
26
|
+
category?: string;
|
|
27
|
+
/** Data label value of the bar-x column. If not specified, the y value is used. */
|
|
28
|
+
label?: string | number;
|
|
29
|
+
/** Individual opacity for the bar-x column. */
|
|
30
|
+
opacity?: number;
|
|
31
|
+
};
|
|
32
|
+
export type BarXSeries<T = MeaningfulAny> = BaseSeries & {
|
|
33
|
+
type: typeof SeriesType.BarX;
|
|
34
|
+
data: BarXSeriesData<T>[];
|
|
35
|
+
/** The name of the series (used in legend, tooltip etc) */
|
|
36
|
+
name: string;
|
|
37
|
+
/** The main color of the series (hex, rgba) */
|
|
38
|
+
color?: string;
|
|
39
|
+
/** Whether to stack the values of each series on top of each other.
|
|
40
|
+
* Possible values are undefined to disable, "normal" to stack by value or "percent"
|
|
41
|
+
*
|
|
42
|
+
* @default undefined
|
|
43
|
+
* */
|
|
44
|
+
stacking?: 'normal' | 'percent';
|
|
45
|
+
/** This option allows grouping series in a stacked chart */
|
|
46
|
+
stackId?: string;
|
|
47
|
+
/** Whether to group non-stacked columns or to let them render independent of each other.
|
|
48
|
+
* When false columns will be laid out individually and overlap each other.
|
|
49
|
+
*
|
|
50
|
+
* @default true
|
|
51
|
+
* */
|
|
52
|
+
grouping?: boolean;
|
|
53
|
+
dataLabels?: BaseSeries['dataLabels'] & ChartSeriesOptions['dataLabels'] & {
|
|
54
|
+
/**
|
|
55
|
+
* Whether to align the data label inside or outside the box
|
|
56
|
+
*
|
|
57
|
+
* @default false
|
|
58
|
+
* */
|
|
59
|
+
inside?: boolean;
|
|
60
|
+
};
|
|
61
|
+
/** Individual series legend options. Has higher priority than legend options in widget data */
|
|
62
|
+
legend?: ChartLegend & {
|
|
63
|
+
symbol?: RectLegendSymbolOptions;
|
|
64
|
+
};
|
|
65
|
+
/** Y-axis index (when using two axes) */
|
|
66
|
+
yAxis?: number;
|
|
67
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { SeriesType } from '../../constants';
|
|
2
|
+
import type { MeaningfulAny } from '../misc';
|
|
3
|
+
import type { BaseSeries, BaseSeriesData } from './base';
|
|
4
|
+
import type { ChartLegend, RectLegendSymbolOptions } from './legend';
|
|
5
|
+
import type { ChartSeriesOptions } from './series';
|
|
6
|
+
export type BarYSeriesData<T = MeaningfulAny> = BaseSeriesData<T> & {
|
|
7
|
+
/**
|
|
8
|
+
* The `x` value of the bar. Depending on the context , it may represents:
|
|
9
|
+
* - numeric value (for `linear` x axis)
|
|
10
|
+
* - timestamp value (for `datetime` x axis)
|
|
11
|
+
* - x axis category value (for `category` x axis). If the type is a string, then it is a category value itself. If the type is a number, then it is the index of an element in the array of categories described in `xAxis.categories`
|
|
12
|
+
*/
|
|
13
|
+
x?: string | number;
|
|
14
|
+
/**
|
|
15
|
+
* The `y` value of the bar. Depending on the context , it may represents:
|
|
16
|
+
* - numeric value (for `linear` y axis)
|
|
17
|
+
* - timestamp value (for `datetime` y axis)
|
|
18
|
+
* - y axis category value (for `category` y axis). If the type is a string, then it is a category value itself. If the type is a number, then it is the index of an element in the array of categories described in `yAxis[0].categories`
|
|
19
|
+
*/
|
|
20
|
+
y?: string | number;
|
|
21
|
+
/** Data label value of the bar. If not specified, the x value is used. */
|
|
22
|
+
label?: string | number;
|
|
23
|
+
/** Individual opacity for the bar. */
|
|
24
|
+
opacity?: number;
|
|
25
|
+
};
|
|
26
|
+
export type BarYSeries<T = MeaningfulAny> = BaseSeries & {
|
|
27
|
+
type: typeof SeriesType.BarY;
|
|
28
|
+
data: BarYSeriesData<T>[];
|
|
29
|
+
/** The name of the series (used in legend, tooltip etc) */
|
|
30
|
+
name: string;
|
|
31
|
+
/** The main color of the series (hex, rgba) */
|
|
32
|
+
color?: string;
|
|
33
|
+
/** Whether to stack the values of each series on top of each other.
|
|
34
|
+
* Possible values are undefined to disable, "normal" to stack by value or "percent"
|
|
35
|
+
*
|
|
36
|
+
* @default undefined
|
|
37
|
+
* */
|
|
38
|
+
stacking?: 'normal' | 'percent';
|
|
39
|
+
/** This option allows grouping series in a stacked chart */
|
|
40
|
+
stackId?: string;
|
|
41
|
+
/** Whether to group non-stacked columns or to let them render independent of each other.
|
|
42
|
+
* When false columns will be laid out individually and overlap each other.
|
|
43
|
+
*
|
|
44
|
+
* @default true
|
|
45
|
+
* */
|
|
46
|
+
grouping?: boolean;
|
|
47
|
+
dataLabels?: ChartSeriesOptions['dataLabels'] & {
|
|
48
|
+
/**
|
|
49
|
+
* Whether to align the data label inside or outside the box.
|
|
50
|
+
* For charts with a percentage stack, it is always true.
|
|
51
|
+
*
|
|
52
|
+
* @default false
|
|
53
|
+
* */
|
|
54
|
+
inside?: boolean;
|
|
55
|
+
};
|
|
56
|
+
/** Individual series legend options. Has higher priority than legend options in widget data */
|
|
57
|
+
legend?: ChartLegend & {
|
|
58
|
+
symbol?: RectLegendSymbolOptions;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|