@orbcharts/plugin-basic 4.0.0-pre-alpha.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 +201 -0
- package/dist/orbcharts-plugin-basic.es.js +25335 -0
- package/dist/orbcharts-plugin-basic.umd.js +341 -0
- package/dist/plugin-basic/src/baseLayers/BaseBars.d.ts +38 -0
- package/dist/plugin-basic/src/baseLayers/BaseBarsTriangle.d.ts +37 -0
- package/dist/plugin-basic/src/baseLayers/BaseCategoryAxis.d.ts +42 -0
- package/dist/plugin-basic/src/baseLayers/BaseDots.d.ts +38 -0
- package/dist/plugin-basic/src/baseLayers/BaseLegend.d.ts +31 -0
- package/dist/plugin-basic/src/baseLayers/BaseLineAreas.d.ts +36 -0
- package/dist/plugin-basic/src/baseLayers/BaseLines.d.ts +36 -0
- package/dist/plugin-basic/src/baseLayers/BaseStackedBars.d.ts +41 -0
- package/dist/plugin-basic/src/baseLayers/BaseTooltip.d.ts +47 -0
- package/dist/plugin-basic/src/baseLayers/BaseValueAxis.d.ts +38 -0
- package/dist/plugin-basic/src/baseLayers/BaseXAxis.d.ts +25 -0
- package/dist/plugin-basic/src/baseLayers/BaseXZoom.d.ts +22 -0
- package/dist/plugin-basic/src/baseLayers/BaseYAxis.d.ts +23 -0
- package/dist/plugin-basic/src/baseLayers/types.d.ts +171 -0
- package/dist/plugin-basic/src/const/layerIndex.d.ts +10 -0
- package/dist/plugin-basic/src/const/sharedPluginParams.d.ts +6 -0
- package/dist/plugin-basic/src/index.d.ts +2 -0
- package/dist/plugin-basic/src/plugins/CompositionPlot/CompositionPlot.d.ts +22 -0
- package/dist/plugin-basic/src/plugins/CompositionPlot/contextObservables.d.ts +40 -0
- package/dist/plugin-basic/src/plugins/CompositionPlot/defaults.d.ts +10 -0
- package/dist/plugin-basic/src/plugins/CompositionPlot/index.d.ts +3 -0
- package/dist/plugin-basic/src/plugins/CompositionPlot/layers/Bubbles.d.ts +16 -0
- package/dist/plugin-basic/src/plugins/CompositionPlot/layers/Indicator.d.ts +0 -0
- package/dist/plugin-basic/src/plugins/CompositionPlot/layers/Pie.d.ts +16 -0
- package/dist/plugin-basic/src/plugins/CompositionPlot/layers/PieEventTexts.d.ts +16 -0
- package/dist/plugin-basic/src/plugins/CompositionPlot/layers/PieLabels.d.ts +16 -0
- package/dist/plugin-basic/src/plugins/CompositionPlot/layers/Rose.d.ts +16 -0
- package/dist/plugin-basic/src/plugins/CompositionPlot/layers/RoseLabels.d.ts +16 -0
- package/dist/plugin-basic/src/plugins/CompositionPlot/layers/Waffle.d.ts +0 -0
- package/dist/plugin-basic/src/plugins/CompositionPlot/types.d.ts +110 -0
- package/dist/plugin-basic/src/plugins/CompositionPlot/utils.d.ts +19 -0
- package/dist/plugin-basic/src/plugins/HierarchyPlot/HierarchyPlot.d.ts +22 -0
- package/dist/plugin-basic/src/plugins/HierarchyPlot/contextObservables.d.ts +16 -0
- package/dist/plugin-basic/src/plugins/HierarchyPlot/defaults.d.ts +4 -0
- package/dist/plugin-basic/src/plugins/HierarchyPlot/index.d.ts +3 -0
- package/dist/plugin-basic/src/plugins/HierarchyPlot/layers/TreeMap.d.ts +16 -0
- package/dist/plugin-basic/src/plugins/HierarchyPlot/types.d.ts +29 -0
- package/dist/plugin-basic/src/plugins/Legend/Legend.d.ts +22 -0
- package/dist/plugin-basic/src/plugins/Legend/contextObservables.d.ts +9 -0
- package/dist/plugin-basic/src/plugins/Legend/defaults.d.ts +4 -0
- package/dist/plugin-basic/src/plugins/Legend/index.d.ts +3 -0
- package/dist/plugin-basic/src/plugins/Legend/layers/Legend.d.ts +16 -0
- package/dist/plugin-basic/src/plugins/Legend/types.d.ts +31 -0
- package/dist/plugin-basic/src/plugins/Legend/utils.d.ts +19 -0
- package/dist/plugin-basic/src/plugins/NetworkPlot/NetworkPlot.d.ts +22 -0
- package/dist/plugin-basic/src/plugins/NetworkPlot/contextObservables.d.ts +19 -0
- package/dist/plugin-basic/src/plugins/NetworkPlot/defaults.d.ts +5 -0
- package/dist/plugin-basic/src/plugins/NetworkPlot/index.d.ts +3 -0
- package/dist/plugin-basic/src/plugins/NetworkPlot/layers/ForceDirected.d.ts +16 -0
- package/dist/plugin-basic/src/plugins/NetworkPlot/layers/ForceDirectedBubbles.d.ts +16 -0
- package/dist/plugin-basic/src/plugins/NetworkPlot/types.d.ts +117 -0
- package/dist/plugin-basic/src/plugins/ScatterPlot/ScatterPlot.d.ts +22 -0
- package/dist/plugin-basic/src/plugins/ScatterPlot/contextObservables.d.ts +140 -0
- package/dist/plugin-basic/src/plugins/ScatterPlot/defaults.d.ts +8 -0
- package/dist/plugin-basic/src/plugins/ScatterPlot/index.d.ts +3 -0
- package/dist/plugin-basic/src/plugins/ScatterPlot/layers/Scatter.d.ts +16 -0
- package/dist/plugin-basic/src/plugins/ScatterPlot/layers/ScatterBubbles.d.ts +16 -0
- package/dist/plugin-basic/src/plugins/ScatterPlot/layers/XYAux.d.ts +16 -0
- package/dist/plugin-basic/src/plugins/ScatterPlot/layers/XYAxes.d.ts +16 -0
- package/dist/plugin-basic/src/plugins/ScatterPlot/layers/XZoom.d.ts +16 -0
- package/dist/plugin-basic/src/plugins/ScatterPlot/types.d.ts +146 -0
- package/dist/plugin-basic/src/plugins/SeriesPlot/SeriesPlot.d.ts +22 -0
- package/dist/plugin-basic/src/plugins/SeriesPlot/contextObservables.d.ts +77 -0
- package/dist/plugin-basic/src/plugins/SeriesPlot/defaults.d.ts +15 -0
- package/dist/plugin-basic/src/plugins/SeriesPlot/index.d.ts +3 -0
- package/dist/plugin-basic/src/plugins/SeriesPlot/layers/Bars.d.ts +16 -0
- package/dist/plugin-basic/src/plugins/SeriesPlot/layers/BarsPN.d.ts +16 -0
- package/dist/plugin-basic/src/plugins/SeriesPlot/layers/BarsTriangle.d.ts +16 -0
- package/dist/plugin-basic/src/plugins/SeriesPlot/layers/CategoryAux.d.ts +16 -0
- package/dist/plugin-basic/src/plugins/SeriesPlot/layers/CategoryAxis.d.ts +16 -0
- package/dist/plugin-basic/src/plugins/SeriesPlot/layers/CategoryZoom.d.ts +16 -0
- package/dist/plugin-basic/src/plugins/SeriesPlot/layers/Dots.d.ts +16 -0
- package/dist/plugin-basic/src/plugins/SeriesPlot/layers/LineAreas.d.ts +16 -0
- package/dist/plugin-basic/src/plugins/SeriesPlot/layers/Lines.d.ts +16 -0
- package/dist/plugin-basic/src/plugins/SeriesPlot/layers/StackedBars.d.ts +16 -0
- package/dist/plugin-basic/src/plugins/SeriesPlot/layers/StackedValueAxis.d.ts +16 -0
- package/dist/plugin-basic/src/plugins/SeriesPlot/layers/ValueAxis.d.ts +16 -0
- package/dist/plugin-basic/src/plugins/SeriesPlot/types.d.ts +140 -0
- package/dist/plugin-basic/src/plugins/Tooltip/Tooltip.d.ts +22 -0
- package/dist/plugin-basic/src/plugins/Tooltip/contextObservables.d.ts +9 -0
- package/dist/plugin-basic/src/plugins/Tooltip/defaults.d.ts +4 -0
- package/dist/plugin-basic/src/plugins/Tooltip/index.d.ts +3 -0
- package/dist/plugin-basic/src/plugins/Tooltip/layers/Tooltip.d.ts +16 -0
- package/dist/plugin-basic/src/plugins/Tooltip/types.d.ts +35 -0
- package/dist/plugin-basic/src/plugins/Tooltip/utils.d.ts +19 -0
- package/dist/plugin-basic/src/plugins/index.d.ts +7 -0
- package/dist/plugin-basic/src/types/BaseLayer.d.ts +3 -0
- package/dist/plugin-basic/src/types/Common.d.ts +14 -0
- package/dist/plugin-basic/src/types/ComputedData.d.ts +27 -0
- package/dist/plugin-basic/src/types/PluginParams.d.ts +66 -0
- package/dist/plugin-basic/src/types/index.d.ts +3 -0
- package/dist/plugin-basic/src/utils/commonUtils.d.ts +3 -0
- package/dist/plugin-basic/src/utils/d3Graphics.d.ts +24 -0
- package/dist/plugin-basic/src/utils/d3Scale.d.ts +28 -0
- package/dist/plugin-basic/src/utils/d3Utils.d.ts +14 -0
- package/dist/plugin-basic/src/utils/graphObservables.d.ts +0 -0
- package/dist/plugin-basic/src/utils/gridObservables.d.ts +51 -0
- package/dist/plugin-basic/src/utils/multivariateObservables.d.ts +74 -0
- package/dist/plugin-basic/src/utils/observables.d.ts +34 -0
- package/dist/plugin-basic/src/utils/orbchartsUtils.d.ts +26 -0
- package/dist/plugin-basic/src/utils/seriesObservables.d.ts +22 -0
- package/dist/plugin-basic/vite.config.d.ts +2 -0
- package/dist/src/index.d.ts +1 -0
- package/package.json +62 -0
- package/src/baseLayers/BaseBars.ts +783 -0
- package/src/baseLayers/BaseBarsTriangle.ts +692 -0
- package/src/baseLayers/BaseCategoryAxis.ts +708 -0
- package/src/baseLayers/BaseDots.ts +495 -0
- package/src/baseLayers/BaseLegend.ts +684 -0
- package/src/baseLayers/BaseLineAreas.ts +644 -0
- package/src/baseLayers/BaseLines.ts +721 -0
- package/src/baseLayers/BaseStackedBars.ts +818 -0
- package/src/baseLayers/BaseTooltip.ts +435 -0
- package/src/baseLayers/BaseValueAxis.ts +612 -0
- package/src/baseLayers/BaseXAxis.ts +412 -0
- package/src/baseLayers/BaseXZoom.ts +250 -0
- package/src/baseLayers/BaseYAxis.ts +371 -0
- package/src/baseLayers/types.ts +174 -0
- package/src/const/layerIndex.ts +36 -0
- package/src/const/sharedPluginParams.ts +29 -0
- package/src/index.ts +3 -0
- package/src/plugins/CompositionPlot/CompositionPlot.ts +308 -0
- package/src/plugins/CompositionPlot/contextObservables.ts +251 -0
- package/src/plugins/CompositionPlot/defaults.ts +162 -0
- package/src/plugins/CompositionPlot/index.ts +3 -0
- package/src/plugins/CompositionPlot/layers/Bubbles.ts +808 -0
- package/src/plugins/CompositionPlot/layers/Indicator.ts +0 -0
- package/src/plugins/CompositionPlot/layers/Pie.ts +776 -0
- package/src/plugins/CompositionPlot/layers/PieEventTexts.ts +326 -0
- package/src/plugins/CompositionPlot/layers/PieLabels.ts +651 -0
- package/src/plugins/CompositionPlot/layers/Rose.ts +546 -0
- package/src/plugins/CompositionPlot/layers/RoseLabels.ts +616 -0
- package/src/plugins/CompositionPlot/layers/Waffle.ts +0 -0
- package/src/plugins/CompositionPlot/types.ts +129 -0
- package/src/plugins/CompositionPlot/utils.ts +53 -0
- package/src/plugins/HierarchyPlot/HierarchyPlot.ts +190 -0
- package/src/plugins/HierarchyPlot/contextObservables.ts +136 -0
- package/src/plugins/HierarchyPlot/defaults.ts +31 -0
- package/src/plugins/HierarchyPlot/index.ts +3 -0
- package/src/plugins/HierarchyPlot/layers/TreeMap.ts +371 -0
- package/src/plugins/HierarchyPlot/types.ts +36 -0
- package/src/plugins/Legend/Legend.ts +151 -0
- package/src/plugins/Legend/contextObservables.ts +55 -0
- package/src/plugins/Legend/defaults.ts +37 -0
- package/src/plugins/Legend/index.ts +3 -0
- package/src/plugins/Legend/layers/Legend.ts +114 -0
- package/src/plugins/Legend/types.ts +45 -0
- package/src/plugins/Legend/utils.ts +53 -0
- package/src/plugins/NetworkPlot/NetworkPlot.ts +228 -0
- package/src/plugins/NetworkPlot/contextObservables.ts +123 -0
- package/src/plugins/NetworkPlot/defaults.ts +147 -0
- package/src/plugins/NetworkPlot/index.ts +3 -0
- package/src/plugins/NetworkPlot/layers/ForceDirected.ts +1048 -0
- package/src/plugins/NetworkPlot/layers/ForceDirectedBubbles.ts +1318 -0
- package/src/plugins/NetworkPlot/types.ts +146 -0
- package/src/plugins/ScatterPlot/ScatterPlot.ts +569 -0
- package/src/plugins/ScatterPlot/contextObservables.ts +901 -0
- package/src/plugins/ScatterPlot/defaults.ts +212 -0
- package/src/plugins/ScatterPlot/index.ts +3 -0
- package/src/plugins/ScatterPlot/layers/Scatter.ts +518 -0
- package/src/plugins/ScatterPlot/layers/ScatterBubbles.ts +670 -0
- package/src/plugins/ScatterPlot/layers/XYAux.ts +686 -0
- package/src/plugins/ScatterPlot/layers/XYAxes.ts +205 -0
- package/src/plugins/ScatterPlot/layers/XZoom.ts +48 -0
- package/src/plugins/ScatterPlot/types.ts +179 -0
- package/src/plugins/SeriesPlot/SeriesPlot.ts +494 -0
- package/src/plugins/SeriesPlot/contextObservables.ts +726 -0
- package/src/plugins/SeriesPlot/defaults.ts +142 -0
- package/src/plugins/SeriesPlot/index.ts +3 -0
- package/src/plugins/SeriesPlot/layers/Bars.ts +84 -0
- package/src/plugins/SeriesPlot/layers/BarsPN.ts +85 -0
- package/src/plugins/SeriesPlot/layers/BarsTriangle.ts +89 -0
- package/src/plugins/SeriesPlot/layers/CategoryAux.ts +1131 -0
- package/src/plugins/SeriesPlot/layers/CategoryAxis.ts +92 -0
- package/src/plugins/SeriesPlot/layers/CategoryZoom.ts +233 -0
- package/src/plugins/SeriesPlot/layers/Dots.ts +91 -0
- package/src/plugins/SeriesPlot/layers/LineAreas.ts +82 -0
- package/src/plugins/SeriesPlot/layers/Lines.ts +75 -0
- package/src/plugins/SeriesPlot/layers/StackedBars.ts +85 -0
- package/src/plugins/SeriesPlot/layers/StackedValueAxis.ts +111 -0
- package/src/plugins/SeriesPlot/layers/ValueAxis.ts +111 -0
- package/src/plugins/SeriesPlot/types.ts +201 -0
- package/src/plugins/Tooltip/Tooltip.ts +159 -0
- package/src/plugins/Tooltip/contextObservables.ts +55 -0
- package/src/plugins/Tooltip/defaults.ts +458 -0
- package/src/plugins/Tooltip/index.ts +3 -0
- package/src/plugins/Tooltip/layers/Tooltip.ts +90 -0
- package/src/plugins/Tooltip/types.ts +55 -0
- package/src/plugins/Tooltip/utils.ts +53 -0
- package/src/plugins/index.ts +8 -0
- package/src/types/BaseLayer.ts +3 -0
- package/src/types/Common.ts +20 -0
- package/src/types/ComputedData.ts +55 -0
- package/src/types/PluginParams.ts +81 -0
- package/src/types/index.ts +3 -0
- package/src/utils/commonUtils.ts +31 -0
- package/src/utils/d3Graphics.ts +177 -0
- package/src/utils/d3Scale.ts +198 -0
- package/src/utils/d3Utils.ts +92 -0
- package/src/utils/graphObservables.ts +0 -0
- package/src/utils/gridObservables.ts +637 -0
- package/src/utils/multivariateObservables.ts +790 -0
- package/src/utils/observables.ts +357 -0
- package/src/utils/orbchartsUtils.ts +335 -0
- package/src/utils/seriesObservables.ts +172 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BarsParams, SeriesPlotPluginParams, SeriesPlotExtendContext } from '../types';
|
|
2
|
+
|
|
3
|
+
export declare const Bars: {
|
|
4
|
+
new (): {
|
|
5
|
+
_name: string;
|
|
6
|
+
_defaultParams: BarsParams;
|
|
7
|
+
_layerIndex: number;
|
|
8
|
+
_initShow: boolean;
|
|
9
|
+
_enable: (enableProps: import('../../../../../core/src/index.ts').SVGLayerEnableProps<SeriesPlotExtendContext, SeriesPlotPluginParams, BarsParams>) => void;
|
|
10
|
+
_disable: () => void;
|
|
11
|
+
_updateParams: (params: Partial<BarsParams>) => void;
|
|
12
|
+
_forceReplaceParams: (params: BarsParams) => void;
|
|
13
|
+
_getParams: () => Readonly<BarsParams>;
|
|
14
|
+
_destroy: () => void;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BarsTriangleParams, SeriesPlotPluginParams, SeriesPlotExtendContext } from '../types';
|
|
2
|
+
|
|
3
|
+
export declare const BarsTriangle: {
|
|
4
|
+
new (): {
|
|
5
|
+
_name: string;
|
|
6
|
+
_defaultParams: BarsTriangleParams;
|
|
7
|
+
_layerIndex: number;
|
|
8
|
+
_initShow: boolean;
|
|
9
|
+
_enable: (enableProps: import('../../../../../core/src/index.ts').SVGLayerEnableProps<SeriesPlotExtendContext, SeriesPlotPluginParams, BarsTriangleParams>) => void;
|
|
10
|
+
_disable: () => void;
|
|
11
|
+
_updateParams: (params: Partial<BarsTriangleParams>) => void;
|
|
12
|
+
_forceReplaceParams: (params: BarsTriangleParams) => void;
|
|
13
|
+
_getParams: () => Readonly<BarsTriangleParams>;
|
|
14
|
+
_destroy: () => void;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { CategoryAuxParams, SeriesPlotPluginParams, SeriesPlotExtendContext } from '../types';
|
|
2
|
+
|
|
3
|
+
export declare const CategoryAux: {
|
|
4
|
+
new (): {
|
|
5
|
+
_name: string;
|
|
6
|
+
_defaultParams: CategoryAuxParams;
|
|
7
|
+
_layerIndex: number;
|
|
8
|
+
_initShow: boolean;
|
|
9
|
+
_enable: (enableProps: import('../../../../../core/src/index.ts').SVGLayerEnableProps<SeriesPlotExtendContext, SeriesPlotPluginParams, CategoryAuxParams>) => void;
|
|
10
|
+
_disable: () => void;
|
|
11
|
+
_updateParams: (params: Partial<CategoryAuxParams>) => void;
|
|
12
|
+
_forceReplaceParams: (params: CategoryAuxParams) => void;
|
|
13
|
+
_getParams: () => Readonly<CategoryAuxParams>;
|
|
14
|
+
_destroy: () => void;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { CategoryAxisParams, SeriesPlotPluginParams, SeriesPlotExtendContext } from '../types';
|
|
2
|
+
|
|
3
|
+
export declare const CategoryAxis: {
|
|
4
|
+
new (): {
|
|
5
|
+
_name: string;
|
|
6
|
+
_defaultParams: CategoryAxisParams;
|
|
7
|
+
_layerIndex: number;
|
|
8
|
+
_initShow: boolean;
|
|
9
|
+
_enable: (enableProps: import('../../../../../core/src/index.ts').SVGLayerEnableProps<SeriesPlotExtendContext, SeriesPlotPluginParams, CategoryAxisParams>) => void;
|
|
10
|
+
_disable: () => void;
|
|
11
|
+
_updateParams: (params: Partial<CategoryAxisParams>) => void;
|
|
12
|
+
_forceReplaceParams: (params: CategoryAxisParams) => void;
|
|
13
|
+
_getParams: () => Readonly<CategoryAxisParams>;
|
|
14
|
+
_destroy: () => void;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { CategoryZoomParams, SeriesPlotPluginParams, SeriesPlotExtendContext } from '../types';
|
|
2
|
+
|
|
3
|
+
export declare const CategoryZoom: {
|
|
4
|
+
new (): {
|
|
5
|
+
_name: string;
|
|
6
|
+
_defaultParams: CategoryZoomParams;
|
|
7
|
+
_layerIndex: number;
|
|
8
|
+
_initShow: boolean;
|
|
9
|
+
_enable: (enableProps: import('../../../../../core/src/index.ts').SVGLayerEnableProps<SeriesPlotExtendContext, SeriesPlotPluginParams, CategoryZoomParams>) => void;
|
|
10
|
+
_disable: () => void;
|
|
11
|
+
_updateParams: (params: Partial<CategoryZoomParams>) => void;
|
|
12
|
+
_forceReplaceParams: (params: CategoryZoomParams) => void;
|
|
13
|
+
_getParams: () => Readonly<CategoryZoomParams>;
|
|
14
|
+
_destroy: () => void;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { DotsParams, SeriesPlotPluginParams, SeriesPlotExtendContext } from '../types';
|
|
2
|
+
|
|
3
|
+
export declare const Dots: {
|
|
4
|
+
new (): {
|
|
5
|
+
_name: string;
|
|
6
|
+
_defaultParams: DotsParams;
|
|
7
|
+
_layerIndex: number;
|
|
8
|
+
_initShow: boolean;
|
|
9
|
+
_enable: (enableProps: import('../../../../../core/src/index.ts').SVGLayerEnableProps<SeriesPlotExtendContext, SeriesPlotPluginParams, DotsParams>) => void;
|
|
10
|
+
_disable: () => void;
|
|
11
|
+
_updateParams: (params: Partial<DotsParams>) => void;
|
|
12
|
+
_forceReplaceParams: (params: DotsParams) => void;
|
|
13
|
+
_getParams: () => Readonly<DotsParams>;
|
|
14
|
+
_destroy: () => void;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { LineAreasParams, SeriesPlotPluginParams, SeriesPlotExtendContext } from '../types';
|
|
2
|
+
|
|
3
|
+
export declare const LineAreas: {
|
|
4
|
+
new (): {
|
|
5
|
+
_name: string;
|
|
6
|
+
_defaultParams: LineAreasParams;
|
|
7
|
+
_layerIndex: number;
|
|
8
|
+
_initShow: boolean;
|
|
9
|
+
_enable: (enableProps: import('../../../../../core/src/index.ts').SVGLayerEnableProps<SeriesPlotExtendContext, SeriesPlotPluginParams, LineAreasParams>) => void;
|
|
10
|
+
_disable: () => void;
|
|
11
|
+
_updateParams: (params: Partial<LineAreasParams>) => void;
|
|
12
|
+
_forceReplaceParams: (params: LineAreasParams) => void;
|
|
13
|
+
_getParams: () => Readonly<LineAreasParams>;
|
|
14
|
+
_destroy: () => void;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { LinesParams, SeriesPlotPluginParams, SeriesPlotExtendContext } from '../types';
|
|
2
|
+
|
|
3
|
+
export declare const Lines: {
|
|
4
|
+
new (): {
|
|
5
|
+
_name: string;
|
|
6
|
+
_defaultParams: LinesParams;
|
|
7
|
+
_layerIndex: number;
|
|
8
|
+
_initShow: boolean;
|
|
9
|
+
_enable: (enableProps: import('../../../../../core/src/index.ts').SVGLayerEnableProps<SeriesPlotExtendContext, SeriesPlotPluginParams, LinesParams>) => void;
|
|
10
|
+
_disable: () => void;
|
|
11
|
+
_updateParams: (params: Partial<LinesParams>) => void;
|
|
12
|
+
_forceReplaceParams: (params: LinesParams) => void;
|
|
13
|
+
_getParams: () => Readonly<LinesParams>;
|
|
14
|
+
_destroy: () => void;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { SeriesPlotPluginParams, StackedBarsParams, SeriesPlotExtendContext } from '../types';
|
|
2
|
+
|
|
3
|
+
export declare const StackedBars: {
|
|
4
|
+
new (): {
|
|
5
|
+
_name: string;
|
|
6
|
+
_defaultParams: StackedBarsParams;
|
|
7
|
+
_layerIndex: number;
|
|
8
|
+
_initShow: boolean;
|
|
9
|
+
_enable: (enableProps: import('../../../../../core/src/index.ts').SVGLayerEnableProps<SeriesPlotExtendContext, SeriesPlotPluginParams, StackedBarsParams>) => void;
|
|
10
|
+
_disable: () => void;
|
|
11
|
+
_updateParams: (params: Partial<StackedBarsParams>) => void;
|
|
12
|
+
_forceReplaceParams: (params: StackedBarsParams) => void;
|
|
13
|
+
_getParams: () => Readonly<StackedBarsParams>;
|
|
14
|
+
_destroy: () => void;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { StackedValueAxisParams, SeriesPlotPluginParams, SeriesPlotExtendContext } from '../types';
|
|
2
|
+
|
|
3
|
+
export declare const StackedValueAxis: {
|
|
4
|
+
new (): {
|
|
5
|
+
_name: string;
|
|
6
|
+
_defaultParams: StackedValueAxisParams;
|
|
7
|
+
_layerIndex: number;
|
|
8
|
+
_initShow: boolean;
|
|
9
|
+
_enable: (enableProps: import('../../../../../core/src/index.ts').SVGLayerEnableProps<SeriesPlotExtendContext, SeriesPlotPluginParams, StackedValueAxisParams>) => void;
|
|
10
|
+
_disable: () => void;
|
|
11
|
+
_updateParams: (params: Partial<StackedValueAxisParams>) => void;
|
|
12
|
+
_forceReplaceParams: (params: StackedValueAxisParams) => void;
|
|
13
|
+
_getParams: () => Readonly<StackedValueAxisParams>;
|
|
14
|
+
_destroy: () => void;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ValueAxisParams, SeriesPlotPluginParams, SeriesPlotExtendContext } from '../types';
|
|
2
|
+
|
|
3
|
+
export declare const ValueAxis: {
|
|
4
|
+
new (): {
|
|
5
|
+
_name: string;
|
|
6
|
+
_defaultParams: ValueAxisParams;
|
|
7
|
+
_layerIndex: number;
|
|
8
|
+
_initShow: boolean;
|
|
9
|
+
_enable: (enableProps: import('../../../../../core/src/index.ts').SVGLayerEnableProps<SeriesPlotExtendContext, SeriesPlotPluginParams, ValueAxisParams>) => void;
|
|
10
|
+
_disable: () => void;
|
|
11
|
+
_updateParams: (params: Partial<ValueAxisParams>) => void;
|
|
12
|
+
_forceReplaceParams: (params: ValueAxisParams) => void;
|
|
13
|
+
_getParams: () => Readonly<ValueAxisParams>;
|
|
14
|
+
_destroy: () => void;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { ColorType } from '../../../../core/src/index.ts';
|
|
3
|
+
import { ContainerPositionScaled, Container, GraphicStyles, Layout, VisibleFilter, ValueAxis, CategoryAxis } from '../../types/PluginParams';
|
|
4
|
+
import { ComputedDatumGrid } from '../../types/ComputedData';
|
|
5
|
+
import { ContainerSize, TransformData } from '../../types/Common';
|
|
6
|
+
|
|
7
|
+
export interface ComputedLayoutDatumGrid extends ComputedDatumGrid {
|
|
8
|
+
axisX: number;
|
|
9
|
+
axisY: number;
|
|
10
|
+
axisYFromZero: number;
|
|
11
|
+
}
|
|
12
|
+
export type ComputedAxesDataGrid = ComputedLayoutDatumGrid[][];
|
|
13
|
+
export interface SeriesPlotExtendContext {
|
|
14
|
+
layout$: Observable<Layout>;
|
|
15
|
+
computedData$: Observable<ComputedDatumGrid[][]>;
|
|
16
|
+
fontSizePx$: Observable<number>;
|
|
17
|
+
containerSize$: Observable<ContainerSize>;
|
|
18
|
+
gridHighlight$: Observable<ComputedDatumGrid[]>;
|
|
19
|
+
isSeriesSeprate$: Observable<boolean>;
|
|
20
|
+
gridContainerPosition$: Observable<ContainerPositionScaled[]>;
|
|
21
|
+
gridAxesSize$: Observable<ContainerSize>;
|
|
22
|
+
gridAxesContainerSize$: Observable<ContainerSize>;
|
|
23
|
+
seriesLabels$: Observable<string[]>;
|
|
24
|
+
SeriesDataMap$: Observable<Map<string, ComputedDatumGrid[]>>;
|
|
25
|
+
CategoryDataMap$: Observable<Map<string, ComputedDatumGrid[]>>;
|
|
26
|
+
computedAxesData$: Observable<ComputedAxesDataGrid>;
|
|
27
|
+
visibleComputedData$: Observable<ComputedDatumGrid[][]>;
|
|
28
|
+
visibleComputedAxesData$: Observable<ComputedAxesDataGrid>;
|
|
29
|
+
computedStackedData$: Observable<ComputedDatumGrid[][]>;
|
|
30
|
+
categoryScaleDomainValue$: Observable<[number, number]>;
|
|
31
|
+
filteredMinMaxValue$: Observable<[number, number]>;
|
|
32
|
+
filteredStackedMinMaxValue$: Observable<[number, number]>;
|
|
33
|
+
gridAxesTransform$: Observable<TransformData>;
|
|
34
|
+
gridAxesReverseTransform$: Observable<TransformData>;
|
|
35
|
+
gridGraphicTransform$: Observable<TransformData>;
|
|
36
|
+
gridGraphicReverseScale$: Observable<[number, number][]>;
|
|
37
|
+
zoomedCategoryAxis$: Observable<CategoryAxis>;
|
|
38
|
+
}
|
|
39
|
+
export interface SeriesPlotPluginParams {
|
|
40
|
+
styles: GraphicStyles;
|
|
41
|
+
visibleFilter: VisibleFilter<'grid'>;
|
|
42
|
+
container: Container;
|
|
43
|
+
valueAxis: ValueAxis;
|
|
44
|
+
categoryAxis: CategoryAxis;
|
|
45
|
+
separateSeries: boolean;
|
|
46
|
+
datasetIndex: number;
|
|
47
|
+
}
|
|
48
|
+
export interface SeriesPlotAllLayerParams {
|
|
49
|
+
Lines: LinesParams;
|
|
50
|
+
LineAreas: LineAreasParams;
|
|
51
|
+
Dots: DotsParams;
|
|
52
|
+
CategoryAux: CategoryAuxParams;
|
|
53
|
+
Bars: BarsParams;
|
|
54
|
+
BarsPN: BarsPNParams;
|
|
55
|
+
StackedBars: StackedBarsParams;
|
|
56
|
+
BarsTriangle: BarsTriangleParams;
|
|
57
|
+
CategoryAxis: CategoryAxisParams;
|
|
58
|
+
ValueAxis: ValueAxisParams;
|
|
59
|
+
StackedValueAxis: StackedValueAxisParams;
|
|
60
|
+
CategoryZoom: CategoryZoomParams;
|
|
61
|
+
}
|
|
62
|
+
export interface LinesParams {
|
|
63
|
+
lineCurve: string;
|
|
64
|
+
lineWidth: number;
|
|
65
|
+
}
|
|
66
|
+
export interface LineAreasParams {
|
|
67
|
+
lineCurve: string;
|
|
68
|
+
linearGradientOpacity: [number, number];
|
|
69
|
+
}
|
|
70
|
+
export interface DotsParams {
|
|
71
|
+
radius: number;
|
|
72
|
+
fillColorType: ColorType;
|
|
73
|
+
strokeColorType: ColorType;
|
|
74
|
+
strokeWidth: number;
|
|
75
|
+
onlyShowHighlighted: boolean;
|
|
76
|
+
}
|
|
77
|
+
export interface CategoryAuxParams {
|
|
78
|
+
showLine: boolean;
|
|
79
|
+
showLabel: boolean;
|
|
80
|
+
lineDashArray: string;
|
|
81
|
+
lineColorType: ColorType;
|
|
82
|
+
labelColorType: ColorType;
|
|
83
|
+
labelTextColorType: ColorType;
|
|
84
|
+
labelTextFormat: string | ((text: any) => string);
|
|
85
|
+
labelPadding: number;
|
|
86
|
+
labelRotate: number;
|
|
87
|
+
}
|
|
88
|
+
export interface BarsParams {
|
|
89
|
+
barWidth: number;
|
|
90
|
+
barPadding: number;
|
|
91
|
+
barGroupPadding: number;
|
|
92
|
+
barRadius: number | boolean;
|
|
93
|
+
}
|
|
94
|
+
export interface BarsPNParams extends BarsParams {
|
|
95
|
+
}
|
|
96
|
+
export interface StackedBarsParams {
|
|
97
|
+
barWidth: number;
|
|
98
|
+
barGroupPadding: number;
|
|
99
|
+
barRadius: number | boolean;
|
|
100
|
+
}
|
|
101
|
+
export interface BarsTriangleParams {
|
|
102
|
+
barWidth: number;
|
|
103
|
+
barPadding: number;
|
|
104
|
+
barGroupPadding: number;
|
|
105
|
+
linearGradientOpacity: [number, number];
|
|
106
|
+
}
|
|
107
|
+
export interface CategoryAxisParams {
|
|
108
|
+
labelOffset: [number, number];
|
|
109
|
+
labelColorType: ColorType;
|
|
110
|
+
axisLineVisible: boolean;
|
|
111
|
+
axisLineColorType: ColorType;
|
|
112
|
+
ticks: number | null | 'all';
|
|
113
|
+
tickFormat: string | ((text: any) => string | d3.NumberValue);
|
|
114
|
+
tickLineVisible: boolean;
|
|
115
|
+
tickPadding: number;
|
|
116
|
+
tickFullLine: boolean;
|
|
117
|
+
tickFullLineDasharray: string;
|
|
118
|
+
tickColorType: ColorType;
|
|
119
|
+
tickTextRotate: number;
|
|
120
|
+
tickTextColorType: ColorType;
|
|
121
|
+
}
|
|
122
|
+
export interface ValueAxisParams {
|
|
123
|
+
labelOffset: [number, number];
|
|
124
|
+
labelColorType: ColorType;
|
|
125
|
+
axisLineVisible: boolean;
|
|
126
|
+
axisLineColorType: ColorType;
|
|
127
|
+
ticks: number | null;
|
|
128
|
+
tickFormat: string | ((text: d3.NumberValue) => string | d3.NumberValue);
|
|
129
|
+
tickLineVisible: boolean;
|
|
130
|
+
tickPadding: number;
|
|
131
|
+
tickFullLine: boolean;
|
|
132
|
+
tickFullLineDasharray: string;
|
|
133
|
+
tickColorType: ColorType;
|
|
134
|
+
tickTextRotate: number;
|
|
135
|
+
tickTextColorType: ColorType;
|
|
136
|
+
}
|
|
137
|
+
export interface StackedValueAxisParams extends ValueAxisParams {
|
|
138
|
+
}
|
|
139
|
+
export interface CategoryZoomParams {
|
|
140
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { TooltipPluginParams, TooltipAllLayerParams } from './types';
|
|
2
|
+
|
|
3
|
+
export declare const Tooltip: {
|
|
4
|
+
new (params?: import('../../../../core/src/index.ts').DeepPartial<TooltipPluginParams | TooltipAllLayerParams>): {
|
|
5
|
+
_name: string;
|
|
6
|
+
_elementType: "svg";
|
|
7
|
+
_getId: () => string;
|
|
8
|
+
_setId: (id: string) => void;
|
|
9
|
+
_injectContext: (context: import('../../../../core/src/index.ts').ChartContext<{}>) => void;
|
|
10
|
+
show: (names: "Tooltip" | "Tooltip"[]) => void;
|
|
11
|
+
showOnly: (names: "Tooltip" | "Tooltip"[]) => void;
|
|
12
|
+
showAll: () => void;
|
|
13
|
+
hide: (names: "Tooltip" | "Tooltip"[]) => void;
|
|
14
|
+
hideAll: () => void;
|
|
15
|
+
toggle: (names: "Tooltip" | "Tooltip"[]) => void;
|
|
16
|
+
getShownLayerNames: () => "Tooltip"[];
|
|
17
|
+
updateParams: (patch: import('../../../../core/src/index.ts').DeepPartial<TooltipPluginParams | TooltipAllLayerParams>) => void;
|
|
18
|
+
forceReplaceParams: (full: TooltipPluginParams | TooltipAllLayerParams) => void;
|
|
19
|
+
getParams: () => Readonly<TooltipPluginParams | TooltipAllLayerParams>;
|
|
20
|
+
destroy: () => void;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { ModelDataSeries } from '../../../../core/src/index.ts';
|
|
3
|
+
import { TooltipPluginParams } from './types';
|
|
4
|
+
import { ComputedDatumSeries } from '../../types/ComputedData';
|
|
5
|
+
|
|
6
|
+
export declare const seriesComputedDataObservable: ({ selectedSeriesData$, pluginParams$ }: {
|
|
7
|
+
selectedSeriesData$: Observable<ModelDataSeries>;
|
|
8
|
+
pluginParams$: Observable<TooltipPluginParams>;
|
|
9
|
+
}) => Observable<ComputedDatumSeries[][]>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { TooltipExtendContext, TooltipPluginParams, TooltipParams } from '../types';
|
|
2
|
+
|
|
3
|
+
export declare const Tooltip: {
|
|
4
|
+
new (): {
|
|
5
|
+
_name: string;
|
|
6
|
+
_defaultParams: TooltipParams;
|
|
7
|
+
_layerIndex: number;
|
|
8
|
+
_initShow: boolean;
|
|
9
|
+
_enable: (enableProps: import('../../../../../core/src/index.ts').SVGLayerEnableProps<TooltipExtendContext, TooltipPluginParams, TooltipParams>) => void;
|
|
10
|
+
_disable: () => void;
|
|
11
|
+
_updateParams: (params: Partial<TooltipParams>) => void;
|
|
12
|
+
_forceReplaceParams: (params: TooltipParams) => void;
|
|
13
|
+
_getParams: () => Readonly<TooltipParams>;
|
|
14
|
+
_destroy: () => void;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { ColorType, ModelDatumSeries, EventData } from '../../../../core/src/index.ts';
|
|
3
|
+
import { GraphicStyles, Layout, VisibleFilter } from '../../types/PluginParams';
|
|
4
|
+
import { ComputedDatum, ComputedDatumSeries } from '../../types/ComputedData';
|
|
5
|
+
import { BaseTooltipStyle, BaseTooltipUtils } from '../../baseLayers/types';
|
|
6
|
+
|
|
7
|
+
export interface TooltipExtendContext {
|
|
8
|
+
layout$: Observable<Layout>;
|
|
9
|
+
fontSizePx$: Observable<number>;
|
|
10
|
+
SeriesDataMap$: Observable<Map<string, ComputedDatumSeries[]>>;
|
|
11
|
+
CategoryDataMap$: Observable<Map<string, ComputedDatumSeries[]>>;
|
|
12
|
+
}
|
|
13
|
+
export interface TooltipPluginParams {
|
|
14
|
+
styles: GraphicStyles;
|
|
15
|
+
visibleFilter: VisibleFilter<'series'>;
|
|
16
|
+
sort: ((a: ModelDatumSeries, b: ModelDatumSeries) => number) | null;
|
|
17
|
+
datasetIndex: number;
|
|
18
|
+
}
|
|
19
|
+
export interface TooltipAllLayerParams {
|
|
20
|
+
Tooltip: TooltipParams;
|
|
21
|
+
}
|
|
22
|
+
export interface TooltipParams {
|
|
23
|
+
backgroundColorType: ColorType;
|
|
24
|
+
backgroundOpacity: number;
|
|
25
|
+
strokeColorType: ColorType;
|
|
26
|
+
textColorType: ColorType;
|
|
27
|
+
offset: [number, number];
|
|
28
|
+
padding: number;
|
|
29
|
+
renderFn: ((eventData: EventData, context: {
|
|
30
|
+
styles: BaseTooltipStyle;
|
|
31
|
+
utils: BaseTooltipUtils;
|
|
32
|
+
seriesData: ComputedDatum<'series'>[];
|
|
33
|
+
categoryData: ComputedDatum<'series'>[];
|
|
34
|
+
}) => string[] | string);
|
|
35
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ComputedDatumSeries } from '../../types/ComputedData';
|
|
2
|
+
|
|
3
|
+
export interface D3PieDatum {
|
|
4
|
+
data: any;
|
|
5
|
+
index: number;
|
|
6
|
+
value: number;
|
|
7
|
+
startAngle: number;
|
|
8
|
+
endAngle: number;
|
|
9
|
+
padAngle: number;
|
|
10
|
+
}
|
|
11
|
+
export interface PieDatum extends D3PieDatum {
|
|
12
|
+
data: ComputedDatumSeries;
|
|
13
|
+
id: string;
|
|
14
|
+
}
|
|
15
|
+
export declare function makePieData({ data, startAngle, endAngle }: {
|
|
16
|
+
data: ComputedDatumSeries[];
|
|
17
|
+
startAngle: number;
|
|
18
|
+
endAngle: number;
|
|
19
|
+
}): PieDatum[];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type ArcScaleType = 'area' | 'radius';
|
|
2
|
+
export type Placement = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end';
|
|
3
|
+
export interface ContainerSize {
|
|
4
|
+
width: number;
|
|
5
|
+
height: number;
|
|
6
|
+
}
|
|
7
|
+
export interface TransformData {
|
|
8
|
+
translate: [number, number];
|
|
9
|
+
scale: [number, number];
|
|
10
|
+
rotate: number;
|
|
11
|
+
rotateX: number;
|
|
12
|
+
rotateY: number;
|
|
13
|
+
value: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ModelType, RenderDatumGraphEdge, RenderDatumBase } from '../../../core/src/index.ts';
|
|
2
|
+
|
|
3
|
+
export interface ComputedDatumSeries extends RenderDatumBase<'series'> {
|
|
4
|
+
visible: boolean;
|
|
5
|
+
seq: number;
|
|
6
|
+
}
|
|
7
|
+
export interface ComputedDatumGrid extends RenderDatumBase<'grid'> {
|
|
8
|
+
visible: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface ComputedDatumMultivariate extends RenderDatumBase<'multivariate'> {
|
|
11
|
+
visible: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface ComputedDatumGraphNode extends RenderDatumBase<'graph'> {
|
|
14
|
+
visible: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface ComputedDatumGraphEdge extends RenderDatumGraphEdge {
|
|
17
|
+
visible: boolean;
|
|
18
|
+
}
|
|
19
|
+
export interface ComputedDatumTree extends RenderDatumBase<'tree'> {
|
|
20
|
+
visible: boolean;
|
|
21
|
+
children: ComputedDatumTree[];
|
|
22
|
+
}
|
|
23
|
+
export type ComputedDatum<T extends ModelType> = T extends 'series' ? ComputedDatumSeries : T extends 'grid' ? ComputedDatumGrid : T extends 'multivariate' ? ComputedDatumMultivariate : T extends 'graph' ? ComputedDatumGraphNode : T extends 'tree' ? ComputedDatumTree : unknown;
|
|
24
|
+
export type ComputedData<T extends ModelType> = T extends 'series' ? ComputedDatumSeries[] : T extends 'grid' ? ComputedDatumGrid[][] : T extends 'multivariate' ? ComputedDatumMultivariate[][] : T extends 'graph' ? {
|
|
25
|
+
nodes: ComputedDatumGraphNode[];
|
|
26
|
+
edges: ComputedDatumGraphEdge[];
|
|
27
|
+
} : T extends 'tree' ? ComputedDatumTree : unknown;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { ModelType, ModelDatum } from '../../../core/src/index.ts';
|
|
2
|
+
|
|
3
|
+
export type AxisPosition = 'top' | 'bottom' | 'left' | 'right';
|
|
4
|
+
export interface XYAxis {
|
|
5
|
+
scaleDomain: [number | 'min' | 'auto', number | 'max' | 'auto'];
|
|
6
|
+
scaleRange: [number, number];
|
|
7
|
+
label: string;
|
|
8
|
+
}
|
|
9
|
+
export interface ValueAxis {
|
|
10
|
+
position: AxisPosition;
|
|
11
|
+
scaleDomain: [number | 'min' | 'auto', number | 'max' | 'auto'];
|
|
12
|
+
scaleRange: [number, number];
|
|
13
|
+
label: string;
|
|
14
|
+
}
|
|
15
|
+
export interface CategoryAxis {
|
|
16
|
+
position: AxisPosition;
|
|
17
|
+
scaleDomain: [number, number | 'max'];
|
|
18
|
+
scalePadding: number;
|
|
19
|
+
label: string;
|
|
20
|
+
}
|
|
21
|
+
export type VisibleFilter<T extends ModelType> = (datum: ModelDatum<T>) => boolean | null;
|
|
22
|
+
export interface Container {
|
|
23
|
+
columnAmount: number;
|
|
24
|
+
rowAmount: number;
|
|
25
|
+
columnGap: number | 'auto';
|
|
26
|
+
rowGap: number | 'auto';
|
|
27
|
+
}
|
|
28
|
+
export interface ContainerPosition {
|
|
29
|
+
slotIndex: number;
|
|
30
|
+
rowIndex: number;
|
|
31
|
+
columnIndex: number;
|
|
32
|
+
startX: number;
|
|
33
|
+
startY: number;
|
|
34
|
+
centerX: number;
|
|
35
|
+
centerY: number;
|
|
36
|
+
width: number;
|
|
37
|
+
height: number;
|
|
38
|
+
}
|
|
39
|
+
export interface ContainerPositionScaled {
|
|
40
|
+
slotIndex: number;
|
|
41
|
+
rowIndex: number;
|
|
42
|
+
columnIndex: number;
|
|
43
|
+
translate: [number, number];
|
|
44
|
+
scale: [number, number];
|
|
45
|
+
}
|
|
46
|
+
export interface Padding {
|
|
47
|
+
top: number;
|
|
48
|
+
right: number;
|
|
49
|
+
bottom: number;
|
|
50
|
+
left: number;
|
|
51
|
+
}
|
|
52
|
+
export interface Layout extends Padding {
|
|
53
|
+
width: number;
|
|
54
|
+
height: number;
|
|
55
|
+
rootWidth: number;
|
|
56
|
+
rootHeight: number;
|
|
57
|
+
}
|
|
58
|
+
export type HighlightTarget = 'series' | 'category' | 'datum' | 'none';
|
|
59
|
+
export interface GraphicStyles {
|
|
60
|
+
padding: Padding;
|
|
61
|
+
highlightTarget: HighlightTarget;
|
|
62
|
+
highlightDefault: string | null;
|
|
63
|
+
unhighlightedOpacity: number;
|
|
64
|
+
transitionDuration: number;
|
|
65
|
+
transitionEase: string;
|
|
66
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
type RenderCircleTextParams = {
|
|
2
|
+
text: string;
|
|
3
|
+
radius: number;
|
|
4
|
+
lineHeight: number;
|
|
5
|
+
isBreakAll: boolean;
|
|
6
|
+
limit?: number;
|
|
7
|
+
};
|
|
8
|
+
type Line = {
|
|
9
|
+
width: number;
|
|
10
|
+
text: string;
|
|
11
|
+
};
|
|
12
|
+
export declare function renderCircleText(selection: d3.Selection<any, any, any, any>, { text, radius, lineHeight, isBreakAll, limit }: RenderCircleTextParams): d3.Selection<SVGTSpanElement, Line, SVGTextElement, any> | undefined;
|
|
13
|
+
export declare function renderTspansOnAxis(textSelection: d3.Selection<d3.BaseType, unknown, null, undefined>, { textArr, textSizePx, categoryAxisPosition, isContainerRotated }: {
|
|
14
|
+
textArr: string[];
|
|
15
|
+
textSizePx: number;
|
|
16
|
+
categoryAxisPosition: 'top' | 'right' | 'bottom' | 'left';
|
|
17
|
+
isContainerRotated: boolean;
|
|
18
|
+
}): void;
|
|
19
|
+
export declare function renderTspansOnQuadrant(textSelection: d3.Selection<d3.BaseType, unknown, null, undefined>, { textArr, fontSizePx, quadrant }: {
|
|
20
|
+
textArr: string[];
|
|
21
|
+
fontSizePx: number;
|
|
22
|
+
quadrant: number;
|
|
23
|
+
}): void;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as d3 from 'd3';
|
|
2
|
+
export declare const createValueToAxisScale: ({ maxValue, minValue, axisWidth, scaleDomain, scaleRange, reverse }: {
|
|
3
|
+
maxValue: number;
|
|
4
|
+
minValue: number;
|
|
5
|
+
axisWidth: number;
|
|
6
|
+
scaleDomain: [number | "min" | "auto", number | "max" | "auto"];
|
|
7
|
+
scaleRange: [number, number];
|
|
8
|
+
reverse?: boolean;
|
|
9
|
+
}) => d3.ScaleLinear<number, number, never>;
|
|
10
|
+
export declare const createAxisToValueScale: ({ maxValue, minValue, axisWidth, scaleDomain, scaleRange, reverse }: {
|
|
11
|
+
maxValue: number;
|
|
12
|
+
minValue: number;
|
|
13
|
+
axisWidth: number;
|
|
14
|
+
scaleDomain: [number | "min" | "auto", number | "max" | "auto"];
|
|
15
|
+
scaleRange: [number, number];
|
|
16
|
+
reverse?: boolean;
|
|
17
|
+
}) => d3.ScaleLinear<number, number, never>;
|
|
18
|
+
export declare const createLabelToAxisScale: ({ axisLabels, axisWidth, padding }: {
|
|
19
|
+
axisLabels: string[];
|
|
20
|
+
axisWidth: number;
|
|
21
|
+
padding?: number;
|
|
22
|
+
}) => d3.ScalePoint<string>;
|
|
23
|
+
export declare const createAxisToLabelIndexScale: ({ axisLabels, axisWidth, padding, reverse }: {
|
|
24
|
+
axisLabels: string[] | Date[];
|
|
25
|
+
axisWidth: number;
|
|
26
|
+
padding?: number;
|
|
27
|
+
reverse?: boolean;
|
|
28
|
+
}) => d3.ScaleQuantize<number, never>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as d3 from 'd3';
|
|
2
|
+
export declare function getSvgGElementSize(selection: d3.Selection<SVGGElement, any, any, any>): DOMRect;
|
|
3
|
+
export declare function appendSvg(selection: d3.Selection<any, any, any, any>, svgString: string): void;
|
|
4
|
+
export declare function getD3TransitionEase(easeName: string): any;
|
|
5
|
+
export declare function makeD3Arc({ axisWidth, innerRadius, outerRadius, padAngle, cornerRadius }: {
|
|
6
|
+
axisWidth: number;
|
|
7
|
+
innerRadius: number;
|
|
8
|
+
outerRadius: number;
|
|
9
|
+
padAngle: number;
|
|
10
|
+
cornerRadius: number;
|
|
11
|
+
}): d3.Arc<any, d3.DefaultArcObject>;
|
|
12
|
+
export declare const parseTickFormatValue: (value: any, tickFormat: string | ((text: d3.NumberValue) => string | d3.NumberValue)) => string;
|
|
13
|
+
export declare const parseDateTickFormatValue: (value: any, tickFormat: string | ((text: d3.NumberValue) => string | d3.NumberValue)) => string;
|
|
14
|
+
export declare function isLightColor(color: string): boolean;
|