react-native-metrify 0.1.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/LICENSE +21 -0
- package/README.md +332 -0
- package/dist/cjs/core/animation/index.js +99 -0
- package/dist/cjs/core/animation/index.js.map +1 -0
- package/dist/cjs/core/animation/index.web.js +95 -0
- package/dist/cjs/core/animation/index.web.js.map +1 -0
- package/dist/cjs/core/hooks/index.js +50 -0
- package/dist/cjs/core/hooks/index.js.map +1 -0
- package/dist/cjs/core/index.js +36 -0
- package/dist/cjs/core/index.js.map +1 -0
- package/dist/cjs/core/layout/index.js +80 -0
- package/dist/cjs/core/layout/index.js.map +1 -0
- package/dist/cjs/core/math/index.js +62 -0
- package/dist/cjs/core/math/index.js.map +1 -0
- package/dist/cjs/core/theme/ThemeProvider.js +63 -0
- package/dist/cjs/core/theme/ThemeProvider.js.map +1 -0
- package/dist/cjs/core/theme/index.js +13 -0
- package/dist/cjs/core/theme/index.js.map +1 -0
- package/dist/cjs/core/theme/themes.js +120 -0
- package/dist/cjs/core/theme/themes.js.map +1 -0
- package/dist/cjs/core/types/index.js +11 -0
- package/dist/cjs/core/types/index.js.map +1 -0
- package/dist/cjs/core/utils/responsive.js +118 -0
- package/dist/cjs/core/utils/responsive.js.map +1 -0
- package/dist/cjs/core/utils/time.js +84 -0
- package/dist/cjs/core/utils/time.js.map +1 -0
- package/dist/cjs/index.js +28 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/renderer-svg/adapters/index.js +67 -0
- package/dist/cjs/renderer-svg/adapters/index.js.map +1 -0
- package/dist/cjs/renderer-svg/index.js +25 -0
- package/dist/cjs/renderer-svg/index.js.map +1 -0
- package/dist/cjs/renderer-svg/paths/arc.js +79 -0
- package/dist/cjs/renderer-svg/paths/arc.js.map +1 -0
- package/dist/cjs/renderer-svg/paths/index.js +23 -0
- package/dist/cjs/renderer-svg/paths/index.js.map +1 -0
- package/dist/cjs/renderer-svg/paths/line.js +70 -0
- package/dist/cjs/renderer-svg/paths/line.js.map +1 -0
- package/dist/cjs/renderer-svg/paths/rect.js +54 -0
- package/dist/cjs/renderer-svg/paths/rect.js.map +1 -0
- package/dist/cjs/renderer-svg/primitives/AnimatedCircle.js +54 -0
- package/dist/cjs/renderer-svg/primitives/AnimatedCircle.js.map +1 -0
- package/dist/cjs/renderer-svg/primitives/AnimatedPath.js +54 -0
- package/dist/cjs/renderer-svg/primitives/AnimatedPath.js.map +1 -0
- package/dist/cjs/renderer-svg/primitives/Text.js +66 -0
- package/dist/cjs/renderer-svg/primitives/Text.js.map +1 -0
- package/dist/cjs/renderer-svg/primitives/index.js +23 -0
- package/dist/cjs/renderer-svg/primitives/index.js.map +1 -0
- package/dist/cjs/widgets/AreaChart/AreaChart.js +179 -0
- package/dist/cjs/widgets/AreaChart/AreaChart.js.map +1 -0
- package/dist/cjs/widgets/AreaChart/index.js +6 -0
- package/dist/cjs/widgets/AreaChart/index.js.map +1 -0
- package/dist/cjs/widgets/AreaChart/types.js +3 -0
- package/dist/cjs/widgets/AreaChart/types.js.map +1 -0
- package/dist/cjs/widgets/BarChart/BarChart.js +203 -0
- package/dist/cjs/widgets/BarChart/BarChart.js.map +1 -0
- package/dist/cjs/widgets/BarChart/index.js +9 -0
- package/dist/cjs/widgets/BarChart/index.js.map +1 -0
- package/dist/cjs/widgets/BarChart/types.js +3 -0
- package/dist/cjs/widgets/BarChart/types.js.map +1 -0
- package/dist/cjs/widgets/BoxPlot/BoxPlot.js +186 -0
- package/dist/cjs/widgets/BoxPlot/BoxPlot.js.map +1 -0
- package/dist/cjs/widgets/BoxPlot/index.js +6 -0
- package/dist/cjs/widgets/BoxPlot/index.js.map +1 -0
- package/dist/cjs/widgets/BoxPlot/types.js +3 -0
- package/dist/cjs/widgets/BoxPlot/types.js.map +1 -0
- package/dist/cjs/widgets/BubbleChart/BubbleChart.js +158 -0
- package/dist/cjs/widgets/BubbleChart/BubbleChart.js.map +1 -0
- package/dist/cjs/widgets/BubbleChart/index.js +6 -0
- package/dist/cjs/widgets/BubbleChart/index.js.map +1 -0
- package/dist/cjs/widgets/BubbleChart/types.js +3 -0
- package/dist/cjs/widgets/BubbleChart/types.js.map +1 -0
- package/dist/cjs/widgets/CandlestickChart/CandlestickChart.js +168 -0
- package/dist/cjs/widgets/CandlestickChart/CandlestickChart.js.map +1 -0
- package/dist/cjs/widgets/CandlestickChart/index.js +6 -0
- package/dist/cjs/widgets/CandlestickChart/index.js.map +1 -0
- package/dist/cjs/widgets/CandlestickChart/types.js +3 -0
- package/dist/cjs/widgets/CandlestickChart/types.js.map +1 -0
- package/dist/cjs/widgets/FunnelChart/FunnelChart.js +149 -0
- package/dist/cjs/widgets/FunnelChart/FunnelChart.js.map +1 -0
- package/dist/cjs/widgets/FunnelChart/index.js +6 -0
- package/dist/cjs/widgets/FunnelChart/index.js.map +1 -0
- package/dist/cjs/widgets/FunnelChart/types.js +3 -0
- package/dist/cjs/widgets/FunnelChart/types.js.map +1 -0
- package/dist/cjs/widgets/Gauge/Gauge.js +171 -0
- package/dist/cjs/widgets/Gauge/Gauge.js.map +1 -0
- package/dist/cjs/widgets/Gauge/index.js +9 -0
- package/dist/cjs/widgets/Gauge/index.js.map +1 -0
- package/dist/cjs/widgets/Gauge/types.js +3 -0
- package/dist/cjs/widgets/Gauge/types.js.map +1 -0
- package/dist/cjs/widgets/GroupedBarChart/GroupedBarChart.js +155 -0
- package/dist/cjs/widgets/GroupedBarChart/GroupedBarChart.js.map +1 -0
- package/dist/cjs/widgets/GroupedBarChart/index.js +6 -0
- package/dist/cjs/widgets/GroupedBarChart/index.js.map +1 -0
- package/dist/cjs/widgets/GroupedBarChart/types.js +3 -0
- package/dist/cjs/widgets/GroupedBarChart/types.js.map +1 -0
- package/dist/cjs/widgets/Heatmap/Heatmap.js +182 -0
- package/dist/cjs/widgets/Heatmap/Heatmap.js.map +1 -0
- package/dist/cjs/widgets/Heatmap/index.js +6 -0
- package/dist/cjs/widgets/Heatmap/index.js.map +1 -0
- package/dist/cjs/widgets/Heatmap/types.js +3 -0
- package/dist/cjs/widgets/Heatmap/types.js.map +1 -0
- package/dist/cjs/widgets/Histogram/Histogram.js +152 -0
- package/dist/cjs/widgets/Histogram/Histogram.js.map +1 -0
- package/dist/cjs/widgets/Histogram/index.js +6 -0
- package/dist/cjs/widgets/Histogram/index.js.map +1 -0
- package/dist/cjs/widgets/Histogram/types.js +3 -0
- package/dist/cjs/widgets/Histogram/types.js.map +1 -0
- package/dist/cjs/widgets/HorizontalBarChart/HorizontalBarChart.js +124 -0
- package/dist/cjs/widgets/HorizontalBarChart/HorizontalBarChart.js.map +1 -0
- package/dist/cjs/widgets/HorizontalBarChart/index.js +6 -0
- package/dist/cjs/widgets/HorizontalBarChart/index.js.map +1 -0
- package/dist/cjs/widgets/HorizontalBarChart/types.js +3 -0
- package/dist/cjs/widgets/HorizontalBarChart/types.js.map +1 -0
- package/dist/cjs/widgets/KPI/KPI.js +195 -0
- package/dist/cjs/widgets/KPI/KPI.js.map +1 -0
- package/dist/cjs/widgets/KPI/index.js +9 -0
- package/dist/cjs/widgets/KPI/index.js.map +1 -0
- package/dist/cjs/widgets/KPI/types.js +3 -0
- package/dist/cjs/widgets/KPI/types.js.map +1 -0
- package/dist/cjs/widgets/LineChart/LineChart.js +298 -0
- package/dist/cjs/widgets/LineChart/LineChart.js.map +1 -0
- package/dist/cjs/widgets/LineChart/index.js +9 -0
- package/dist/cjs/widgets/LineChart/index.js.map +1 -0
- package/dist/cjs/widgets/LineChart/types.js +3 -0
- package/dist/cjs/widgets/LineChart/types.js.map +1 -0
- package/dist/cjs/widgets/MultiLineSparkline/MultiLineSparkline.js +192 -0
- package/dist/cjs/widgets/MultiLineSparkline/MultiLineSparkline.js.map +1 -0
- package/dist/cjs/widgets/MultiLineSparkline/index.js +9 -0
- package/dist/cjs/widgets/MultiLineSparkline/index.js.map +1 -0
- package/dist/cjs/widgets/MultiLineSparkline/types.js +3 -0
- package/dist/cjs/widgets/MultiLineSparkline/types.js.map +1 -0
- package/dist/cjs/widgets/PieChart/PieChart.js +241 -0
- package/dist/cjs/widgets/PieChart/PieChart.js.map +1 -0
- package/dist/cjs/widgets/PieChart/index.js +9 -0
- package/dist/cjs/widgets/PieChart/index.js.map +1 -0
- package/dist/cjs/widgets/PieChart/types.js +3 -0
- package/dist/cjs/widgets/PieChart/types.js.map +1 -0
- package/dist/cjs/widgets/Progress/Progress.js +166 -0
- package/dist/cjs/widgets/Progress/Progress.js.map +1 -0
- package/dist/cjs/widgets/Progress/index.js +9 -0
- package/dist/cjs/widgets/Progress/index.js.map +1 -0
- package/dist/cjs/widgets/Progress/types.js +3 -0
- package/dist/cjs/widgets/Progress/types.js.map +1 -0
- package/dist/cjs/widgets/RadarChart/RadarChart.js +162 -0
- package/dist/cjs/widgets/RadarChart/RadarChart.js.map +1 -0
- package/dist/cjs/widgets/RadarChart/index.js +6 -0
- package/dist/cjs/widgets/RadarChart/index.js.map +1 -0
- package/dist/cjs/widgets/RadarChart/types.js +3 -0
- package/dist/cjs/widgets/RadarChart/types.js.map +1 -0
- package/dist/cjs/widgets/SankeyDiagram/SankeyDiagram.js +211 -0
- package/dist/cjs/widgets/SankeyDiagram/SankeyDiagram.js.map +1 -0
- package/dist/cjs/widgets/SankeyDiagram/index.js +6 -0
- package/dist/cjs/widgets/SankeyDiagram/index.js.map +1 -0
- package/dist/cjs/widgets/SankeyDiagram/types.js +3 -0
- package/dist/cjs/widgets/SankeyDiagram/types.js.map +1 -0
- package/dist/cjs/widgets/ScatterPlot/ScatterPlot.js +152 -0
- package/dist/cjs/widgets/ScatterPlot/ScatterPlot.js.map +1 -0
- package/dist/cjs/widgets/ScatterPlot/index.js +6 -0
- package/dist/cjs/widgets/ScatterPlot/index.js.map +1 -0
- package/dist/cjs/widgets/ScatterPlot/types.js +3 -0
- package/dist/cjs/widgets/ScatterPlot/types.js.map +1 -0
- package/dist/cjs/widgets/Sparkline/Sparkline.js +154 -0
- package/dist/cjs/widgets/Sparkline/Sparkline.js.map +1 -0
- package/dist/cjs/widgets/Sparkline/index.js +9 -0
- package/dist/cjs/widgets/Sparkline/index.js.map +1 -0
- package/dist/cjs/widgets/Sparkline/types.js +3 -0
- package/dist/cjs/widgets/Sparkline/types.js.map +1 -0
- package/dist/cjs/widgets/StackedBarChart/StackedBarChart.js +152 -0
- package/dist/cjs/widgets/StackedBarChart/StackedBarChart.js.map +1 -0
- package/dist/cjs/widgets/StackedBarChart/index.js +6 -0
- package/dist/cjs/widgets/StackedBarChart/index.js.map +1 -0
- package/dist/cjs/widgets/StackedBarChart/types.js +3 -0
- package/dist/cjs/widgets/StackedBarChart/types.js.map +1 -0
- package/dist/cjs/widgets/SunburstChart/SunburstChart.js +134 -0
- package/dist/cjs/widgets/SunburstChart/SunburstChart.js.map +1 -0
- package/dist/cjs/widgets/SunburstChart/index.js +6 -0
- package/dist/cjs/widgets/SunburstChart/index.js.map +1 -0
- package/dist/cjs/widgets/SunburstChart/types.js +3 -0
- package/dist/cjs/widgets/SunburstChart/types.js.map +1 -0
- package/dist/cjs/widgets/Treemap/Treemap.js +145 -0
- package/dist/cjs/widgets/Treemap/Treemap.js.map +1 -0
- package/dist/cjs/widgets/Treemap/index.js +6 -0
- package/dist/cjs/widgets/Treemap/index.js.map +1 -0
- package/dist/cjs/widgets/Treemap/types.js +3 -0
- package/dist/cjs/widgets/Treemap/types.js.map +1 -0
- package/dist/cjs/widgets/WaterfallChart/WaterfallChart.js +175 -0
- package/dist/cjs/widgets/WaterfallChart/WaterfallChart.js.map +1 -0
- package/dist/cjs/widgets/WaterfallChart/index.js +6 -0
- package/dist/cjs/widgets/WaterfallChart/index.js.map +1 -0
- package/dist/cjs/widgets/WaterfallChart/types.js +3 -0
- package/dist/cjs/widgets/WaterfallChart/types.js.map +1 -0
- package/dist/cjs/widgets/index.js +51 -0
- package/dist/cjs/widgets/index.js.map +1 -0
- package/dist/core/animation/index.d.ts +66 -0
- package/dist/core/animation/index.d.ts.map +1 -0
- package/dist/core/animation/index.web.d.ts +63 -0
- package/dist/core/animation/index.web.d.ts.map +1 -0
- package/dist/core/hooks/index.d.ts +34 -0
- package/dist/core/hooks/index.d.ts.map +1 -0
- package/dist/core/index.d.ts +13 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/layout/index.d.ts +39 -0
- package/dist/core/layout/index.d.ts.map +1 -0
- package/dist/core/math/index.d.ts +37 -0
- package/dist/core/math/index.d.ts.map +1 -0
- package/dist/core/theme/ThemeProvider.d.ts +19 -0
- package/dist/core/theme/ThemeProvider.d.ts.map +1 -0
- package/dist/core/theme/index.d.ts +6 -0
- package/dist/core/theme/index.d.ts.map +1 -0
- package/dist/core/theme/themes.d.ts +13 -0
- package/dist/core/theme/themes.d.ts.map +1 -0
- package/dist/core/types/index.d.ts +137 -0
- package/dist/core/types/index.d.ts.map +1 -0
- package/dist/core/utils/responsive.d.ts +92 -0
- package/dist/core/utils/responsive.d.ts.map +1 -0
- package/dist/core/utils/time.d.ts +20 -0
- package/dist/core/utils/time.d.ts.map +1 -0
- package/dist/esm/core/animation/index.js +88 -0
- package/dist/esm/core/animation/index.js.map +1 -0
- package/dist/esm/core/animation/index.web.js +81 -0
- package/dist/esm/core/animation/index.web.js.map +1 -0
- package/dist/esm/core/hooks/index.js +44 -0
- package/dist/esm/core/hooks/index.js.map +1 -0
- package/dist/esm/core/index.js +20 -0
- package/dist/esm/core/index.js.map +1 -0
- package/dist/esm/core/layout/index.js +73 -0
- package/dist/esm/core/layout/index.js.map +1 -0
- package/dist/esm/core/math/index.js +54 -0
- package/dist/esm/core/math/index.js.map +1 -0
- package/dist/esm/core/theme/ThemeProvider.js +26 -0
- package/dist/esm/core/theme/ThemeProvider.js.map +1 -0
- package/dist/esm/core/theme/index.js +6 -0
- package/dist/esm/core/theme/index.js.map +1 -0
- package/dist/esm/core/theme/themes.js +117 -0
- package/dist/esm/core/theme/themes.js.map +1 -0
- package/dist/esm/core/types/index.js +10 -0
- package/dist/esm/core/types/index.js.map +1 -0
- package/dist/esm/core/utils/responsive.js +112 -0
- package/dist/esm/core/utils/responsive.js.map +1 -0
- package/dist/esm/core/utils/time.js +79 -0
- package/dist/esm/core/utils/time.js.map +1 -0
- package/dist/esm/index.js +11 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/renderer-svg/adapters/index.js +62 -0
- package/dist/esm/renderer-svg/adapters/index.js.map +1 -0
- package/dist/esm/renderer-svg/index.js +9 -0
- package/dist/esm/renderer-svg/index.js.map +1 -0
- package/dist/esm/renderer-svg/paths/arc.js +74 -0
- package/dist/esm/renderer-svg/paths/arc.js.map +1 -0
- package/dist/esm/renderer-svg/paths/index.js +7 -0
- package/dist/esm/renderer-svg/paths/index.js.map +1 -0
- package/dist/esm/renderer-svg/paths/line.js +64 -0
- package/dist/esm/renderer-svg/paths/line.js.map +1 -0
- package/dist/esm/renderer-svg/paths/rect.js +50 -0
- package/dist/esm/renderer-svg/paths/rect.js.map +1 -0
- package/dist/esm/renderer-svg/primitives/AnimatedCircle.js +15 -0
- package/dist/esm/renderer-svg/primitives/AnimatedCircle.js.map +1 -0
- package/dist/esm/renderer-svg/primitives/AnimatedPath.js +15 -0
- package/dist/esm/renderer-svg/primitives/AnimatedPath.js.map +1 -0
- package/dist/esm/renderer-svg/primitives/Text.js +29 -0
- package/dist/esm/renderer-svg/primitives/Text.js.map +1 -0
- package/dist/esm/renderer-svg/primitives/index.js +7 -0
- package/dist/esm/renderer-svg/primitives/index.js.map +1 -0
- package/dist/esm/widgets/AreaChart/AreaChart.js +143 -0
- package/dist/esm/widgets/AreaChart/AreaChart.js.map +1 -0
- package/dist/esm/widgets/AreaChart/index.js +2 -0
- package/dist/esm/widgets/AreaChart/index.js.map +1 -0
- package/dist/esm/widgets/AreaChart/types.js +2 -0
- package/dist/esm/widgets/AreaChart/types.js.map +1 -0
- package/dist/esm/widgets/BarChart/BarChart.js +167 -0
- package/dist/esm/widgets/BarChart/BarChart.js.map +1 -0
- package/dist/esm/widgets/BarChart/index.js +5 -0
- package/dist/esm/widgets/BarChart/index.js.map +1 -0
- package/dist/esm/widgets/BarChart/types.js +2 -0
- package/dist/esm/widgets/BarChart/types.js.map +1 -0
- package/dist/esm/widgets/BoxPlot/BoxPlot.js +150 -0
- package/dist/esm/widgets/BoxPlot/BoxPlot.js.map +1 -0
- package/dist/esm/widgets/BoxPlot/index.js +2 -0
- package/dist/esm/widgets/BoxPlot/index.js.map +1 -0
- package/dist/esm/widgets/BoxPlot/types.js +2 -0
- package/dist/esm/widgets/BoxPlot/types.js.map +1 -0
- package/dist/esm/widgets/BubbleChart/BubbleChart.js +122 -0
- package/dist/esm/widgets/BubbleChart/BubbleChart.js.map +1 -0
- package/dist/esm/widgets/BubbleChart/index.js +2 -0
- package/dist/esm/widgets/BubbleChart/index.js.map +1 -0
- package/dist/esm/widgets/BubbleChart/types.js +2 -0
- package/dist/esm/widgets/BubbleChart/types.js.map +1 -0
- package/dist/esm/widgets/CandlestickChart/CandlestickChart.js +132 -0
- package/dist/esm/widgets/CandlestickChart/CandlestickChart.js.map +1 -0
- package/dist/esm/widgets/CandlestickChart/index.js +2 -0
- package/dist/esm/widgets/CandlestickChart/index.js.map +1 -0
- package/dist/esm/widgets/CandlestickChart/types.js +2 -0
- package/dist/esm/widgets/CandlestickChart/types.js.map +1 -0
- package/dist/esm/widgets/FunnelChart/FunnelChart.js +113 -0
- package/dist/esm/widgets/FunnelChart/FunnelChart.js.map +1 -0
- package/dist/esm/widgets/FunnelChart/index.js +2 -0
- package/dist/esm/widgets/FunnelChart/index.js.map +1 -0
- package/dist/esm/widgets/FunnelChart/types.js +2 -0
- package/dist/esm/widgets/FunnelChart/types.js.map +1 -0
- package/dist/esm/widgets/Gauge/Gauge.js +132 -0
- package/dist/esm/widgets/Gauge/Gauge.js.map +1 -0
- package/dist/esm/widgets/Gauge/index.js +5 -0
- package/dist/esm/widgets/Gauge/index.js.map +1 -0
- package/dist/esm/widgets/Gauge/types.js +2 -0
- package/dist/esm/widgets/Gauge/types.js.map +1 -0
- package/dist/esm/widgets/GroupedBarChart/GroupedBarChart.js +119 -0
- package/dist/esm/widgets/GroupedBarChart/GroupedBarChart.js.map +1 -0
- package/dist/esm/widgets/GroupedBarChart/index.js +2 -0
- package/dist/esm/widgets/GroupedBarChart/index.js.map +1 -0
- package/dist/esm/widgets/GroupedBarChart/types.js +2 -0
- package/dist/esm/widgets/GroupedBarChart/types.js.map +1 -0
- package/dist/esm/widgets/Heatmap/Heatmap.js +146 -0
- package/dist/esm/widgets/Heatmap/Heatmap.js.map +1 -0
- package/dist/esm/widgets/Heatmap/index.js +2 -0
- package/dist/esm/widgets/Heatmap/index.js.map +1 -0
- package/dist/esm/widgets/Heatmap/types.js +2 -0
- package/dist/esm/widgets/Heatmap/types.js.map +1 -0
- package/dist/esm/widgets/Histogram/Histogram.js +116 -0
- package/dist/esm/widgets/Histogram/Histogram.js.map +1 -0
- package/dist/esm/widgets/Histogram/index.js +2 -0
- package/dist/esm/widgets/Histogram/index.js.map +1 -0
- package/dist/esm/widgets/Histogram/types.js +2 -0
- package/dist/esm/widgets/Histogram/types.js.map +1 -0
- package/dist/esm/widgets/HorizontalBarChart/HorizontalBarChart.js +88 -0
- package/dist/esm/widgets/HorizontalBarChart/HorizontalBarChart.js.map +1 -0
- package/dist/esm/widgets/HorizontalBarChart/index.js +2 -0
- package/dist/esm/widgets/HorizontalBarChart/index.js.map +1 -0
- package/dist/esm/widgets/HorizontalBarChart/types.js +2 -0
- package/dist/esm/widgets/HorizontalBarChart/types.js.map +1 -0
- package/dist/esm/widgets/KPI/KPI.js +159 -0
- package/dist/esm/widgets/KPI/KPI.js.map +1 -0
- package/dist/esm/widgets/KPI/index.js +5 -0
- package/dist/esm/widgets/KPI/index.js.map +1 -0
- package/dist/esm/widgets/KPI/types.js +2 -0
- package/dist/esm/widgets/KPI/types.js.map +1 -0
- package/dist/esm/widgets/LineChart/LineChart.js +262 -0
- package/dist/esm/widgets/LineChart/LineChart.js.map +1 -0
- package/dist/esm/widgets/LineChart/index.js +5 -0
- package/dist/esm/widgets/LineChart/index.js.map +1 -0
- package/dist/esm/widgets/LineChart/types.js +2 -0
- package/dist/esm/widgets/LineChart/types.js.map +1 -0
- package/dist/esm/widgets/MultiLineSparkline/MultiLineSparkline.js +153 -0
- package/dist/esm/widgets/MultiLineSparkline/MultiLineSparkline.js.map +1 -0
- package/dist/esm/widgets/MultiLineSparkline/index.js +5 -0
- package/dist/esm/widgets/MultiLineSparkline/index.js.map +1 -0
- package/dist/esm/widgets/MultiLineSparkline/types.js +2 -0
- package/dist/esm/widgets/MultiLineSparkline/types.js.map +1 -0
- package/dist/esm/widgets/PieChart/PieChart.js +205 -0
- package/dist/esm/widgets/PieChart/PieChart.js.map +1 -0
- package/dist/esm/widgets/PieChart/index.js +5 -0
- package/dist/esm/widgets/PieChart/index.js.map +1 -0
- package/dist/esm/widgets/PieChart/types.js +2 -0
- package/dist/esm/widgets/PieChart/types.js.map +1 -0
- package/dist/esm/widgets/Progress/Progress.js +130 -0
- package/dist/esm/widgets/Progress/Progress.js.map +1 -0
- package/dist/esm/widgets/Progress/index.js +5 -0
- package/dist/esm/widgets/Progress/index.js.map +1 -0
- package/dist/esm/widgets/Progress/types.js +2 -0
- package/dist/esm/widgets/Progress/types.js.map +1 -0
- package/dist/esm/widgets/RadarChart/RadarChart.js +126 -0
- package/dist/esm/widgets/RadarChart/RadarChart.js.map +1 -0
- package/dist/esm/widgets/RadarChart/index.js +2 -0
- package/dist/esm/widgets/RadarChart/index.js.map +1 -0
- package/dist/esm/widgets/RadarChart/types.js +2 -0
- package/dist/esm/widgets/RadarChart/types.js.map +1 -0
- package/dist/esm/widgets/SankeyDiagram/SankeyDiagram.js +175 -0
- package/dist/esm/widgets/SankeyDiagram/SankeyDiagram.js.map +1 -0
- package/dist/esm/widgets/SankeyDiagram/index.js +2 -0
- package/dist/esm/widgets/SankeyDiagram/index.js.map +1 -0
- package/dist/esm/widgets/SankeyDiagram/types.js +2 -0
- package/dist/esm/widgets/SankeyDiagram/types.js.map +1 -0
- package/dist/esm/widgets/ScatterPlot/ScatterPlot.js +116 -0
- package/dist/esm/widgets/ScatterPlot/ScatterPlot.js.map +1 -0
- package/dist/esm/widgets/ScatterPlot/index.js +2 -0
- package/dist/esm/widgets/ScatterPlot/index.js.map +1 -0
- package/dist/esm/widgets/ScatterPlot/types.js +2 -0
- package/dist/esm/widgets/ScatterPlot/types.js.map +1 -0
- package/dist/esm/widgets/Sparkline/Sparkline.js +118 -0
- package/dist/esm/widgets/Sparkline/Sparkline.js.map +1 -0
- package/dist/esm/widgets/Sparkline/index.js +5 -0
- package/dist/esm/widgets/Sparkline/index.js.map +1 -0
- package/dist/esm/widgets/Sparkline/types.js +2 -0
- package/dist/esm/widgets/Sparkline/types.js.map +1 -0
- package/dist/esm/widgets/StackedBarChart/StackedBarChart.js +116 -0
- package/dist/esm/widgets/StackedBarChart/StackedBarChart.js.map +1 -0
- package/dist/esm/widgets/StackedBarChart/index.js +2 -0
- package/dist/esm/widgets/StackedBarChart/index.js.map +1 -0
- package/dist/esm/widgets/StackedBarChart/types.js +2 -0
- package/dist/esm/widgets/StackedBarChart/types.js.map +1 -0
- package/dist/esm/widgets/SunburstChart/SunburstChart.js +98 -0
- package/dist/esm/widgets/SunburstChart/SunburstChart.js.map +1 -0
- package/dist/esm/widgets/SunburstChart/index.js +2 -0
- package/dist/esm/widgets/SunburstChart/index.js.map +1 -0
- package/dist/esm/widgets/SunburstChart/types.js +2 -0
- package/dist/esm/widgets/SunburstChart/types.js.map +1 -0
- package/dist/esm/widgets/Treemap/Treemap.js +109 -0
- package/dist/esm/widgets/Treemap/Treemap.js.map +1 -0
- package/dist/esm/widgets/Treemap/index.js +2 -0
- package/dist/esm/widgets/Treemap/index.js.map +1 -0
- package/dist/esm/widgets/Treemap/types.js +2 -0
- package/dist/esm/widgets/Treemap/types.js.map +1 -0
- package/dist/esm/widgets/WaterfallChart/WaterfallChart.js +139 -0
- package/dist/esm/widgets/WaterfallChart/WaterfallChart.js.map +1 -0
- package/dist/esm/widgets/WaterfallChart/index.js +2 -0
- package/dist/esm/widgets/WaterfallChart/index.js.map +1 -0
- package/dist/esm/widgets/WaterfallChart/types.js +2 -0
- package/dist/esm/widgets/WaterfallChart/types.js.map +1 -0
- package/dist/esm/widgets/index.js +35 -0
- package/dist/esm/widgets/index.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/renderer-svg/adapters/index.d.ts +21 -0
- package/dist/renderer-svg/adapters/index.d.ts.map +1 -0
- package/dist/renderer-svg/index.d.ts +9 -0
- package/dist/renderer-svg/index.d.ts.map +1 -0
- package/dist/renderer-svg/paths/arc.d.ts +24 -0
- package/dist/renderer-svg/paths/arc.d.ts.map +1 -0
- package/dist/renderer-svg/paths/index.d.ts +7 -0
- package/dist/renderer-svg/paths/index.d.ts.map +1 -0
- package/dist/renderer-svg/paths/line.d.ts +21 -0
- package/dist/renderer-svg/paths/line.d.ts.map +1 -0
- package/dist/renderer-svg/paths/rect.d.ts +24 -0
- package/dist/renderer-svg/paths/rect.d.ts.map +1 -0
- package/dist/renderer-svg/primitives/AnimatedCircle.d.ts +19 -0
- package/dist/renderer-svg/primitives/AnimatedCircle.d.ts.map +1 -0
- package/dist/renderer-svg/primitives/AnimatedPath.d.ts +19 -0
- package/dist/renderer-svg/primitives/AnimatedPath.d.ts.map +1 -0
- package/dist/renderer-svg/primitives/Text.d.ts +25 -0
- package/dist/renderer-svg/primitives/Text.d.ts.map +1 -0
- package/dist/renderer-svg/primitives/index.d.ts +7 -0
- package/dist/renderer-svg/primitives/index.d.ts.map +1 -0
- package/dist/widgets/AreaChart/AreaChart.d.ts +7 -0
- package/dist/widgets/AreaChart/AreaChart.d.ts.map +1 -0
- package/dist/widgets/AreaChart/index.d.ts +3 -0
- package/dist/widgets/AreaChart/index.d.ts.map +1 -0
- package/dist/widgets/AreaChart/types.d.ts +30 -0
- package/dist/widgets/AreaChart/types.d.ts.map +1 -0
- package/dist/widgets/BarChart/BarChart.d.ts +10 -0
- package/dist/widgets/BarChart/BarChart.d.ts.map +1 -0
- package/dist/widgets/BarChart/index.d.ts +6 -0
- package/dist/widgets/BarChart/index.d.ts.map +1 -0
- package/dist/widgets/BarChart/types.d.ts +24 -0
- package/dist/widgets/BarChart/types.d.ts.map +1 -0
- package/dist/widgets/BoxPlot/BoxPlot.d.ts +7 -0
- package/dist/widgets/BoxPlot/BoxPlot.d.ts.map +1 -0
- package/dist/widgets/BoxPlot/index.d.ts +3 -0
- package/dist/widgets/BoxPlot/index.d.ts.map +1 -0
- package/dist/widgets/BoxPlot/types.d.ts +25 -0
- package/dist/widgets/BoxPlot/types.d.ts.map +1 -0
- package/dist/widgets/BubbleChart/BubbleChart.d.ts +7 -0
- package/dist/widgets/BubbleChart/BubbleChart.d.ts.map +1 -0
- package/dist/widgets/BubbleChart/index.d.ts +3 -0
- package/dist/widgets/BubbleChart/index.d.ts.map +1 -0
- package/dist/widgets/BubbleChart/types.d.ts +30 -0
- package/dist/widgets/BubbleChart/types.d.ts.map +1 -0
- package/dist/widgets/CandlestickChart/CandlestickChart.d.ts +7 -0
- package/dist/widgets/CandlestickChart/CandlestickChart.d.ts.map +1 -0
- package/dist/widgets/CandlestickChart/index.d.ts +3 -0
- package/dist/widgets/CandlestickChart/index.d.ts.map +1 -0
- package/dist/widgets/CandlestickChart/types.d.ts +27 -0
- package/dist/widgets/CandlestickChart/types.d.ts.map +1 -0
- package/dist/widgets/FunnelChart/FunnelChart.d.ts +7 -0
- package/dist/widgets/FunnelChart/FunnelChart.d.ts.map +1 -0
- package/dist/widgets/FunnelChart/index.d.ts +3 -0
- package/dist/widgets/FunnelChart/index.d.ts.map +1 -0
- package/dist/widgets/FunnelChart/types.d.ts +20 -0
- package/dist/widgets/FunnelChart/types.d.ts.map +1 -0
- package/dist/widgets/Gauge/Gauge.d.ts +11 -0
- package/dist/widgets/Gauge/Gauge.d.ts.map +1 -0
- package/dist/widgets/Gauge/index.d.ts +6 -0
- package/dist/widgets/Gauge/index.d.ts.map +1 -0
- package/dist/widgets/Gauge/types.d.ts +18 -0
- package/dist/widgets/Gauge/types.d.ts.map +1 -0
- package/dist/widgets/GroupedBarChart/GroupedBarChart.d.ts +7 -0
- package/dist/widgets/GroupedBarChart/GroupedBarChart.d.ts.map +1 -0
- package/dist/widgets/GroupedBarChart/index.d.ts +3 -0
- package/dist/widgets/GroupedBarChart/index.d.ts.map +1 -0
- package/dist/widgets/GroupedBarChart/types.d.ts +27 -0
- package/dist/widgets/GroupedBarChart/types.d.ts.map +1 -0
- package/dist/widgets/Heatmap/Heatmap.d.ts +7 -0
- package/dist/widgets/Heatmap/Heatmap.d.ts.map +1 -0
- package/dist/widgets/Heatmap/index.d.ts +3 -0
- package/dist/widgets/Heatmap/index.d.ts.map +1 -0
- package/dist/widgets/Heatmap/types.d.ts +25 -0
- package/dist/widgets/Heatmap/types.d.ts.map +1 -0
- package/dist/widgets/Histogram/Histogram.d.ts +7 -0
- package/dist/widgets/Histogram/Histogram.d.ts.map +1 -0
- package/dist/widgets/Histogram/index.d.ts +3 -0
- package/dist/widgets/Histogram/index.d.ts.map +1 -0
- package/dist/widgets/Histogram/types.d.ts +17 -0
- package/dist/widgets/Histogram/types.d.ts.map +1 -0
- package/dist/widgets/HorizontalBarChart/HorizontalBarChart.d.ts +7 -0
- package/dist/widgets/HorizontalBarChart/HorizontalBarChart.d.ts.map +1 -0
- package/dist/widgets/HorizontalBarChart/index.d.ts +3 -0
- package/dist/widgets/HorizontalBarChart/index.d.ts.map +1 -0
- package/dist/widgets/HorizontalBarChart/types.d.ts +21 -0
- package/dist/widgets/HorizontalBarChart/types.d.ts.map +1 -0
- package/dist/widgets/KPI/KPI.d.ts +11 -0
- package/dist/widgets/KPI/KPI.d.ts.map +1 -0
- package/dist/widgets/KPI/index.d.ts +6 -0
- package/dist/widgets/KPI/index.d.ts.map +1 -0
- package/dist/widgets/KPI/types.d.ts +17 -0
- package/dist/widgets/KPI/types.d.ts.map +1 -0
- package/dist/widgets/LineChart/LineChart.d.ts +10 -0
- package/dist/widgets/LineChart/LineChart.d.ts.map +1 -0
- package/dist/widgets/LineChart/index.d.ts +6 -0
- package/dist/widgets/LineChart/index.d.ts.map +1 -0
- package/dist/widgets/LineChart/types.d.ts +31 -0
- package/dist/widgets/LineChart/types.d.ts.map +1 -0
- package/dist/widgets/MultiLineSparkline/MultiLineSparkline.d.ts +10 -0
- package/dist/widgets/MultiLineSparkline/MultiLineSparkline.d.ts.map +1 -0
- package/dist/widgets/MultiLineSparkline/index.d.ts +6 -0
- package/dist/widgets/MultiLineSparkline/index.d.ts.map +1 -0
- package/dist/widgets/MultiLineSparkline/types.d.ts +22 -0
- package/dist/widgets/MultiLineSparkline/types.d.ts.map +1 -0
- package/dist/widgets/PieChart/PieChart.d.ts +10 -0
- package/dist/widgets/PieChart/PieChart.d.ts.map +1 -0
- package/dist/widgets/PieChart/index.d.ts +6 -0
- package/dist/widgets/PieChart/index.d.ts.map +1 -0
- package/dist/widgets/PieChart/types.d.ts +23 -0
- package/dist/widgets/PieChart/types.d.ts.map +1 -0
- package/dist/widgets/Progress/Progress.d.ts +11 -0
- package/dist/widgets/Progress/Progress.d.ts.map +1 -0
- package/dist/widgets/Progress/index.d.ts +6 -0
- package/dist/widgets/Progress/index.d.ts.map +1 -0
- package/dist/widgets/Progress/types.d.ts +17 -0
- package/dist/widgets/Progress/types.d.ts.map +1 -0
- package/dist/widgets/RadarChart/RadarChart.d.ts +7 -0
- package/dist/widgets/RadarChart/RadarChart.d.ts.map +1 -0
- package/dist/widgets/RadarChart/index.d.ts +3 -0
- package/dist/widgets/RadarChart/index.d.ts.map +1 -0
- package/dist/widgets/RadarChart/types.d.ts +26 -0
- package/dist/widgets/RadarChart/types.d.ts.map +1 -0
- package/dist/widgets/SankeyDiagram/SankeyDiagram.d.ts +7 -0
- package/dist/widgets/SankeyDiagram/SankeyDiagram.d.ts.map +1 -0
- package/dist/widgets/SankeyDiagram/index.d.ts +3 -0
- package/dist/widgets/SankeyDiagram/index.d.ts.map +1 -0
- package/dist/widgets/SankeyDiagram/types.d.ts +26 -0
- package/dist/widgets/SankeyDiagram/types.d.ts.map +1 -0
- package/dist/widgets/ScatterPlot/ScatterPlot.d.ts +7 -0
- package/dist/widgets/ScatterPlot/ScatterPlot.d.ts.map +1 -0
- package/dist/widgets/ScatterPlot/index.d.ts +3 -0
- package/dist/widgets/ScatterPlot/index.d.ts.map +1 -0
- package/dist/widgets/ScatterPlot/types.d.ts +29 -0
- package/dist/widgets/ScatterPlot/types.d.ts.map +1 -0
- package/dist/widgets/Sparkline/Sparkline.d.ts +11 -0
- package/dist/widgets/Sparkline/Sparkline.d.ts.map +1 -0
- package/dist/widgets/Sparkline/index.d.ts +6 -0
- package/dist/widgets/Sparkline/index.d.ts.map +1 -0
- package/dist/widgets/Sparkline/types.d.ts +16 -0
- package/dist/widgets/Sparkline/types.d.ts.map +1 -0
- package/dist/widgets/StackedBarChart/StackedBarChart.d.ts +7 -0
- package/dist/widgets/StackedBarChart/StackedBarChart.d.ts.map +1 -0
- package/dist/widgets/StackedBarChart/index.d.ts +3 -0
- package/dist/widgets/StackedBarChart/index.d.ts.map +1 -0
- package/dist/widgets/StackedBarChart/types.d.ts +26 -0
- package/dist/widgets/StackedBarChart/types.d.ts.map +1 -0
- package/dist/widgets/SunburstChart/SunburstChart.d.ts +7 -0
- package/dist/widgets/SunburstChart/SunburstChart.d.ts.map +1 -0
- package/dist/widgets/SunburstChart/index.d.ts +3 -0
- package/dist/widgets/SunburstChart/index.d.ts.map +1 -0
- package/dist/widgets/SunburstChart/types.d.ts +20 -0
- package/dist/widgets/SunburstChart/types.d.ts.map +1 -0
- package/dist/widgets/Treemap/Treemap.d.ts +7 -0
- package/dist/widgets/Treemap/Treemap.d.ts.map +1 -0
- package/dist/widgets/Treemap/index.d.ts +3 -0
- package/dist/widgets/Treemap/index.d.ts.map +1 -0
- package/dist/widgets/Treemap/types.d.ts +21 -0
- package/dist/widgets/Treemap/types.d.ts.map +1 -0
- package/dist/widgets/WaterfallChart/WaterfallChart.d.ts +7 -0
- package/dist/widgets/WaterfallChart/WaterfallChart.d.ts.map +1 -0
- package/dist/widgets/WaterfallChart/index.d.ts +3 -0
- package/dist/widgets/WaterfallChart/index.d.ts.map +1 -0
- package/dist/widgets/WaterfallChart/types.d.ts +24 -0
- package/dist/widgets/WaterfallChart/types.d.ts.map +1 -0
- package/dist/widgets/index.d.ts +29 -0
- package/dist/widgets/index.d.ts.map +1 -0
- package/package.json +84 -0
- package/src/core/animation/index.ts +113 -0
- package/src/core/animation/index.web.ts +112 -0
- package/src/core/hooks/index.ts +66 -0
- package/src/core/index.ts +26 -0
- package/src/core/layout/index.ts +101 -0
- package/src/core/math/index.ts +72 -0
- package/src/core/package.json +13 -0
- package/src/core/theme/ThemeProvider.tsx +36 -0
- package/src/core/theme/index.ts +5 -0
- package/src/core/theme/themes.ts +132 -0
- package/src/core/types/index.ts +164 -0
- package/src/core/utils/responsive.ts +203 -0
- package/src/core/utils/time.ts +100 -0
- package/src/index.ts +13 -0
- package/src/renderer-svg/adapters/index.ts +84 -0
- package/src/renderer-svg/index.ts +8 -0
- package/src/renderer-svg/package.json +17 -0
- package/src/renderer-svg/paths/arc.ts +93 -0
- package/src/renderer-svg/paths/index.ts +6 -0
- package/src/renderer-svg/paths/line.ts +83 -0
- package/src/renderer-svg/paths/rect.ts +80 -0
- package/src/renderer-svg/primitives/AnimatedCircle.tsx +48 -0
- package/src/renderer-svg/primitives/AnimatedPath.tsx +48 -0
- package/src/renderer-svg/primitives/Text.tsx +73 -0
- package/src/renderer-svg/primitives/index.ts +6 -0
- package/src/widgets/AreaChart/AreaChart.tsx +213 -0
- package/src/widgets/AreaChart/index.ts +2 -0
- package/src/widgets/AreaChart/types.ts +34 -0
- package/src/widgets/BarChart/BarChart.tsx +249 -0
- package/src/widgets/BarChart/index.ts +10 -0
- package/src/widgets/BarChart/types.ts +27 -0
- package/src/widgets/BoxPlot/BoxPlot.tsx +252 -0
- package/src/widgets/BoxPlot/index.ts +2 -0
- package/src/widgets/BoxPlot/types.ts +27 -0
- package/src/widgets/BubbleChart/BubbleChart.tsx +175 -0
- package/src/widgets/BubbleChart/index.ts +2 -0
- package/src/widgets/BubbleChart/types.ts +33 -0
- package/src/widgets/CandlestickChart/CandlestickChart.tsx +204 -0
- package/src/widgets/CandlestickChart/index.ts +2 -0
- package/src/widgets/CandlestickChart/types.ts +29 -0
- package/src/widgets/FunnelChart/FunnelChart.tsx +172 -0
- package/src/widgets/FunnelChart/index.ts +2 -0
- package/src/widgets/FunnelChart/types.ts +22 -0
- package/src/widgets/Gauge/Gauge.tsx +235 -0
- package/src/widgets/Gauge/index.ts +5 -0
- package/src/widgets/Gauge/types.ts +19 -0
- package/src/widgets/GroupedBarChart/GroupedBarChart.tsx +190 -0
- package/src/widgets/GroupedBarChart/index.ts +2 -0
- package/src/widgets/GroupedBarChart/types.ts +30 -0
- package/src/widgets/Heatmap/Heatmap.tsx +216 -0
- package/src/widgets/Heatmap/index.ts +2 -0
- package/src/widgets/Heatmap/types.ts +27 -0
- package/src/widgets/Histogram/Histogram.tsx +173 -0
- package/src/widgets/Histogram/index.ts +2 -0
- package/src/widgets/Histogram/types.ts +18 -0
- package/src/widgets/HorizontalBarChart/HorizontalBarChart.tsx +125 -0
- package/src/widgets/HorizontalBarChart/index.ts +2 -0
- package/src/widgets/HorizontalBarChart/types.ts +23 -0
- package/src/widgets/KPI/KPI.tsx +222 -0
- package/src/widgets/KPI/index.ts +5 -0
- package/src/widgets/KPI/types.ts +19 -0
- package/src/widgets/LineChart/LineChart.tsx +364 -0
- package/src/widgets/LineChart/index.ts +10 -0
- package/src/widgets/LineChart/types.ts +34 -0
- package/src/widgets/MultiLineSparkline/MultiLineSparkline.tsx +234 -0
- package/src/widgets/MultiLineSparkline/index.ts +10 -0
- package/src/widgets/MultiLineSparkline/types.ts +25 -0
- package/src/widgets/PieChart/PieChart.tsx +275 -0
- package/src/widgets/PieChart/index.ts +10 -0
- package/src/widgets/PieChart/types.ts +26 -0
- package/src/widgets/Progress/Progress.tsx +201 -0
- package/src/widgets/Progress/index.ts +5 -0
- package/src/widgets/Progress/types.ts +19 -0
- package/src/widgets/RadarChart/RadarChart.tsx +213 -0
- package/src/widgets/RadarChart/index.ts +2 -0
- package/src/widgets/RadarChart/types.ts +29 -0
- package/src/widgets/SankeyDiagram/SankeyDiagram.tsx +272 -0
- package/src/widgets/SankeyDiagram/index.ts +2 -0
- package/src/widgets/SankeyDiagram/types.ts +29 -0
- package/src/widgets/ScatterPlot/ScatterPlot.tsx +167 -0
- package/src/widgets/ScatterPlot/index.ts +2 -0
- package/src/widgets/ScatterPlot/types.ts +32 -0
- package/src/widgets/Sparkline/Sparkline.tsx +203 -0
- package/src/widgets/Sparkline/index.ts +5 -0
- package/src/widgets/Sparkline/types.ts +18 -0
- package/src/widgets/StackedBarChart/StackedBarChart.tsx +181 -0
- package/src/widgets/StackedBarChart/index.ts +2 -0
- package/src/widgets/StackedBarChart/types.ts +29 -0
- package/src/widgets/SunburstChart/SunburstChart.tsx +176 -0
- package/src/widgets/SunburstChart/index.ts +2 -0
- package/src/widgets/SunburstChart/types.ts +22 -0
- package/src/widgets/Treemap/Treemap.tsx +191 -0
- package/src/widgets/Treemap/index.ts +2 -0
- package/src/widgets/Treemap/types.ts +23 -0
- package/src/widgets/WaterfallChart/WaterfallChart.tsx +226 -0
- package/src/widgets/WaterfallChart/index.ts +2 -0
- package/src/widgets/WaterfallChart/types.ts +26 -0
- package/src/widgets/index.ts +40 -0
- package/src/widgets/package.json +18 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BarChart Widget types
|
|
3
|
+
*/
|
|
4
|
+
import { BaseWidgetProps } from '../../core/types';
|
|
5
|
+
|
|
6
|
+
export interface BarDataPoint {
|
|
7
|
+
value: number;
|
|
8
|
+
label: string;
|
|
9
|
+
color?: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface BarChartData {
|
|
13
|
+
data: BarDataPoint[];
|
|
14
|
+
title?: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export type BarOrientation = 'vertical' | 'horizontal';
|
|
18
|
+
|
|
19
|
+
export interface BarChartWidgetProps extends BaseWidgetProps<BarChartData> {
|
|
20
|
+
orientation?: BarOrientation;
|
|
21
|
+
barWidth?: number;
|
|
22
|
+
barSpacing?: number;
|
|
23
|
+
showValues?: boolean;
|
|
24
|
+
showLabels?: boolean;
|
|
25
|
+
minBarHeight?: number;
|
|
26
|
+
maxBars?: number;
|
|
27
|
+
}
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BoxPlot Widget - Shows statistical distribution with quartiles
|
|
3
|
+
*/
|
|
4
|
+
import React, { memo, useMemo } from 'react';
|
|
5
|
+
import { View, Text as RNText, StyleSheet } from 'react-native';
|
|
6
|
+
import Svg, { Rect, Line as SvgLine, Circle } from 'react-native-svg';
|
|
7
|
+
import { useWidgetDimensions, useWidgetTheme, normalize } from '../../core';
|
|
8
|
+
import { BoxPlotWidgetProps } from './types';
|
|
9
|
+
|
|
10
|
+
export const BoxPlot = memo<BoxPlotWidgetProps>(({
|
|
11
|
+
data: widgetData,
|
|
12
|
+
width,
|
|
13
|
+
height,
|
|
14
|
+
loading = false,
|
|
15
|
+
theme: themeOverride,
|
|
16
|
+
showLabels = true,
|
|
17
|
+
showOutliers = true,
|
|
18
|
+
boxWidth = 50,
|
|
19
|
+
boxSpacing = 30,
|
|
20
|
+
color,
|
|
21
|
+
testID,
|
|
22
|
+
}) => {
|
|
23
|
+
const theme = useWidgetTheme(themeOverride);
|
|
24
|
+
const dimensions = useWidgetDimensions(width, height, 350, 300);
|
|
25
|
+
|
|
26
|
+
if (loading) {
|
|
27
|
+
return (
|
|
28
|
+
<View style={[styles.container, { width: dimensions.width, height: dimensions.height, backgroundColor: theme.colors.surface, borderRadius: theme.radius.md }]} testID={`${testID}-loading`}>
|
|
29
|
+
<RNText style={[styles.loadingText, { color: theme.colors.textSecondary }]}>Loading...</RNText>
|
|
30
|
+
</View>
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
if (!widgetData || !widgetData.data || widgetData.data.length === 0) {
|
|
35
|
+
return (
|
|
36
|
+
<View style={[styles.container, { width: dimensions.width, height: dimensions.height, backgroundColor: theme.colors.surface, borderRadius: theme.radius.md }]} testID={`${testID}-empty`}>
|
|
37
|
+
<RNText style={[styles.emptyText, { color: theme.colors.textSecondary }]}>No data</RNText>
|
|
38
|
+
</View>
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const { data, title } = widgetData;
|
|
43
|
+
const padding = theme.spacing.md;
|
|
44
|
+
const titleHeight = title ? theme.fontScale.md + theme.spacing.sm : 0;
|
|
45
|
+
const labelHeight = showLabels ? 30 : 0;
|
|
46
|
+
const yAxisWidth = 40;
|
|
47
|
+
|
|
48
|
+
const chartHeight = dimensions.height - padding * 2 - titleHeight - labelHeight;
|
|
49
|
+
const chartWidth = dimensions.width - padding * 2 - yAxisWidth;
|
|
50
|
+
|
|
51
|
+
const boxColor = color || theme.colors.chartPrimary;
|
|
52
|
+
|
|
53
|
+
// Find global min/max for Y-axis
|
|
54
|
+
const { globalMin, globalMax } = useMemo(() => {
|
|
55
|
+
let min = Infinity;
|
|
56
|
+
let max = -Infinity;
|
|
57
|
+
|
|
58
|
+
data.forEach(point => {
|
|
59
|
+
if (point.min < min) min = point.min;
|
|
60
|
+
if (point.max > max) max = point.max;
|
|
61
|
+
if (point.outliers) {
|
|
62
|
+
point.outliers.forEach(val => {
|
|
63
|
+
if (val < min) min = val;
|
|
64
|
+
if (val > max) max = val;
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
return { globalMin: min, globalMax: max };
|
|
70
|
+
}, [data]);
|
|
71
|
+
|
|
72
|
+
const yAxisLabels = useMemo(() => {
|
|
73
|
+
const range = globalMax - globalMin;
|
|
74
|
+
const step = range / 4;
|
|
75
|
+
return Array.from({ length: 5 }, (_, i) => ({
|
|
76
|
+
value: globalMin + i * step,
|
|
77
|
+
y: chartHeight - (i * chartHeight) / 4,
|
|
78
|
+
}));
|
|
79
|
+
}, [globalMin, globalMax, chartHeight]);
|
|
80
|
+
|
|
81
|
+
const boxes = useMemo(() => {
|
|
82
|
+
return data.map((point, index) => {
|
|
83
|
+
const centerX = index * (boxWidth + boxSpacing) + boxWidth / 2;
|
|
84
|
+
|
|
85
|
+
// Normalize values to chart height
|
|
86
|
+
const minY = chartHeight - normalize(point.min, globalMin, globalMax) * chartHeight;
|
|
87
|
+
const maxY = chartHeight - normalize(point.max, globalMin, globalMax) * chartHeight;
|
|
88
|
+
const q1Y = chartHeight - normalize(point.q1, globalMin, globalMax) * chartHeight;
|
|
89
|
+
const q3Y = chartHeight - normalize(point.q3, globalMin, globalMax) * chartHeight;
|
|
90
|
+
const medianY = chartHeight - normalize(point.median, globalMin, globalMax) * chartHeight;
|
|
91
|
+
|
|
92
|
+
const outlierPoints = point.outliers?.map(val => ({
|
|
93
|
+
x: centerX,
|
|
94
|
+
y: chartHeight - normalize(val, globalMin, globalMax) * chartHeight,
|
|
95
|
+
})) || [];
|
|
96
|
+
|
|
97
|
+
return {
|
|
98
|
+
label: point.label,
|
|
99
|
+
centerX,
|
|
100
|
+
boxX: centerX - boxWidth / 2,
|
|
101
|
+
boxWidth,
|
|
102
|
+
// Whiskers
|
|
103
|
+
minY,
|
|
104
|
+
maxY,
|
|
105
|
+
// Box (IQR)
|
|
106
|
+
q1Y,
|
|
107
|
+
q3Y,
|
|
108
|
+
boxHeight: Math.abs(q3Y - q1Y),
|
|
109
|
+
boxY: Math.min(q1Y, q3Y),
|
|
110
|
+
// Median line
|
|
111
|
+
medianY,
|
|
112
|
+
// Outliers
|
|
113
|
+
outliers: outlierPoints,
|
|
114
|
+
};
|
|
115
|
+
});
|
|
116
|
+
}, [data, chartHeight, globalMin, globalMax, boxWidth, boxSpacing]);
|
|
117
|
+
|
|
118
|
+
return (
|
|
119
|
+
<View style={[styles.wrapper, { width: dimensions.width, height: dimensions.height, backgroundColor: theme.colors.surface, borderRadius: theme.radius.md, padding }]} testID={testID}>
|
|
120
|
+
{title && (
|
|
121
|
+
<RNText style={[styles.title, { color: theme.colors.text, fontSize: theme.fontScale.md, fontWeight: 'bold', marginBottom: theme.spacing.sm }]}>
|
|
122
|
+
{title}
|
|
123
|
+
</RNText>
|
|
124
|
+
)}
|
|
125
|
+
|
|
126
|
+
<View style={styles.chartRow}>
|
|
127
|
+
{/* Y-Axis */}
|
|
128
|
+
<View style={[styles.yAxis, { width: yAxisWidth }]}>
|
|
129
|
+
{yAxisLabels.map((label, index) => (
|
|
130
|
+
<RNText key={`y-${index}`} style={[styles.yAxisLabel, { color: theme.colors.textSecondary, fontSize: theme.fontScale.xs, top: label.y - 6 }]}>
|
|
131
|
+
{label.value.toFixed(0)}
|
|
132
|
+
</RNText>
|
|
133
|
+
))}
|
|
134
|
+
</View>
|
|
135
|
+
|
|
136
|
+
<View>
|
|
137
|
+
<Svg width={chartWidth} height={chartHeight}>
|
|
138
|
+
{boxes.map((box, index) => (
|
|
139
|
+
<React.Fragment key={`box-${index}`}>
|
|
140
|
+
{/* Whisker lines (min to Q1, Q3 to max) */}
|
|
141
|
+
<SvgLine
|
|
142
|
+
x1={box.centerX}
|
|
143
|
+
y1={box.minY}
|
|
144
|
+
x2={box.centerX}
|
|
145
|
+
y2={box.q1Y}
|
|
146
|
+
stroke={boxColor}
|
|
147
|
+
strokeWidth={1}
|
|
148
|
+
/>
|
|
149
|
+
<SvgLine
|
|
150
|
+
x1={box.centerX}
|
|
151
|
+
y1={box.q3Y}
|
|
152
|
+
x2={box.centerX}
|
|
153
|
+
y2={box.maxY}
|
|
154
|
+
stroke={boxColor}
|
|
155
|
+
strokeWidth={1}
|
|
156
|
+
/>
|
|
157
|
+
|
|
158
|
+
{/* Min/Max caps */}
|
|
159
|
+
<SvgLine
|
|
160
|
+
x1={box.centerX - boxWidth / 4}
|
|
161
|
+
y1={box.minY}
|
|
162
|
+
x2={box.centerX + boxWidth / 4}
|
|
163
|
+
y2={box.minY}
|
|
164
|
+
stroke={boxColor}
|
|
165
|
+
strokeWidth={2}
|
|
166
|
+
/>
|
|
167
|
+
<SvgLine
|
|
168
|
+
x1={box.centerX - boxWidth / 4}
|
|
169
|
+
y1={box.maxY}
|
|
170
|
+
x2={box.centerX + boxWidth / 4}
|
|
171
|
+
y2={box.maxY}
|
|
172
|
+
stroke={boxColor}
|
|
173
|
+
strokeWidth={2}
|
|
174
|
+
/>
|
|
175
|
+
|
|
176
|
+
{/* IQR Box (Q1 to Q3) */}
|
|
177
|
+
<Rect
|
|
178
|
+
x={box.boxX}
|
|
179
|
+
y={box.boxY}
|
|
180
|
+
width={box.boxWidth}
|
|
181
|
+
height={box.boxHeight}
|
|
182
|
+
fill={boxColor}
|
|
183
|
+
fillOpacity={0.3}
|
|
184
|
+
stroke={boxColor}
|
|
185
|
+
strokeWidth={2}
|
|
186
|
+
rx={theme.radius.sm}
|
|
187
|
+
ry={theme.radius.sm}
|
|
188
|
+
/>
|
|
189
|
+
|
|
190
|
+
{/* Median line */}
|
|
191
|
+
<SvgLine
|
|
192
|
+
x1={box.boxX}
|
|
193
|
+
y1={box.medianY}
|
|
194
|
+
x2={box.boxX + box.boxWidth}
|
|
195
|
+
y2={box.medianY}
|
|
196
|
+
stroke={boxColor}
|
|
197
|
+
strokeWidth={3}
|
|
198
|
+
/>
|
|
199
|
+
|
|
200
|
+
{/* Outliers */}
|
|
201
|
+
{showOutliers && box.outliers.map((outlier, oIndex) => (
|
|
202
|
+
<Circle
|
|
203
|
+
key={`outlier-${index}-${oIndex}`}
|
|
204
|
+
cx={outlier.x}
|
|
205
|
+
cy={outlier.y}
|
|
206
|
+
r={3}
|
|
207
|
+
fill={theme.colors.chartNegative}
|
|
208
|
+
opacity={0.8}
|
|
209
|
+
/>
|
|
210
|
+
))}
|
|
211
|
+
</React.Fragment>
|
|
212
|
+
))}
|
|
213
|
+
</Svg>
|
|
214
|
+
|
|
215
|
+
{showLabels && (
|
|
216
|
+
<View style={styles.labelsContainer}>
|
|
217
|
+
{boxes.map((box, index) => (
|
|
218
|
+
<View
|
|
219
|
+
key={`label-${index}`}
|
|
220
|
+
style={[styles.labelItem, { left: box.boxX, width: box.boxWidth }]}
|
|
221
|
+
>
|
|
222
|
+
<RNText
|
|
223
|
+
style={[styles.labelText, { color: theme.colors.textSecondary, fontSize: theme.fontScale.xs }]}
|
|
224
|
+
numberOfLines={1}
|
|
225
|
+
>
|
|
226
|
+
{box.label}
|
|
227
|
+
</RNText>
|
|
228
|
+
</View>
|
|
229
|
+
))}
|
|
230
|
+
</View>
|
|
231
|
+
)}
|
|
232
|
+
</View>
|
|
233
|
+
</View>
|
|
234
|
+
</View>
|
|
235
|
+
);
|
|
236
|
+
});
|
|
237
|
+
|
|
238
|
+
BoxPlot.displayName = 'BoxPlot';
|
|
239
|
+
|
|
240
|
+
const styles = StyleSheet.create({
|
|
241
|
+
wrapper: { justifyContent: 'flex-start', alignItems: 'flex-start' },
|
|
242
|
+
container: { justifyContent: 'center', alignItems: 'center' },
|
|
243
|
+
loadingText: { fontSize: 16 },
|
|
244
|
+
emptyText: { fontSize: 16 },
|
|
245
|
+
title: { textAlign: 'center', width: '100%' },
|
|
246
|
+
chartRow: { flexDirection: 'row', alignItems: 'flex-start' },
|
|
247
|
+
yAxis: { position: 'relative', marginRight: 8 },
|
|
248
|
+
yAxisLabel: { position: 'absolute', right: 0, textAlign: 'right' },
|
|
249
|
+
labelsContainer: { position: 'relative', height: 30, marginTop: 4 },
|
|
250
|
+
labelItem: { position: 'absolute', alignItems: 'center' },
|
|
251
|
+
labelText: { textAlign: 'center' },
|
|
252
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BoxPlot Widget types - Statistical distribution (quartiles, outliers)
|
|
3
|
+
*/
|
|
4
|
+
import { BaseWidgetProps } from '../../core';
|
|
5
|
+
|
|
6
|
+
export interface BoxPlotDataPoint {
|
|
7
|
+
label: string;
|
|
8
|
+
min: number;
|
|
9
|
+
q1: number;
|
|
10
|
+
median: number;
|
|
11
|
+
q3: number;
|
|
12
|
+
max: number;
|
|
13
|
+
outliers?: number[];
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface BoxPlotData {
|
|
17
|
+
data: BoxPlotDataPoint[];
|
|
18
|
+
title?: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface BoxPlotWidgetProps extends BaseWidgetProps<BoxPlotData> {
|
|
22
|
+
showLabels?: boolean;
|
|
23
|
+
showOutliers?: boolean;
|
|
24
|
+
boxWidth?: number;
|
|
25
|
+
boxSpacing?: number;
|
|
26
|
+
color?: string;
|
|
27
|
+
}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BubbleChart Widget - Scatter plot with size dimension (3D data)
|
|
3
|
+
*/
|
|
4
|
+
import React, { memo, useMemo } from 'react';
|
|
5
|
+
import { View, Text as RNText, StyleSheet } from 'react-native';
|
|
6
|
+
import Svg, { Circle, Line as SvgLine } from 'react-native-svg';
|
|
7
|
+
import { useWidgetDimensions, useWidgetTheme, normalize } from '../../core';
|
|
8
|
+
import { BubbleChartWidgetProps } from './types';
|
|
9
|
+
|
|
10
|
+
export const BubbleChart = memo<BubbleChartWidgetProps>(({
|
|
11
|
+
data: widgetData,
|
|
12
|
+
width,
|
|
13
|
+
height,
|
|
14
|
+
loading = false,
|
|
15
|
+
theme: themeOverride,
|
|
16
|
+
showXAxis = true,
|
|
17
|
+
showYAxis = true,
|
|
18
|
+
showGrid = true,
|
|
19
|
+
showLegend = true,
|
|
20
|
+
minBubbleSize = 5,
|
|
21
|
+
maxBubbleSize = 30,
|
|
22
|
+
testID,
|
|
23
|
+
}) => {
|
|
24
|
+
const theme = useWidgetTheme(themeOverride);
|
|
25
|
+
const dimensions = useWidgetDimensions(width, height, 350, 300);
|
|
26
|
+
|
|
27
|
+
if (loading) {
|
|
28
|
+
return (
|
|
29
|
+
<View style={[styles.container, { width: dimensions.width, height: dimensions.height, backgroundColor: theme.colors.surface, borderRadius: theme.radius.md }]} testID={`${testID}-loading`}>
|
|
30
|
+
<RNText style={[styles.loadingText, { color: theme.colors.textSecondary }]}>Loading...</RNText>
|
|
31
|
+
</View>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
if (!widgetData || !widgetData.series || widgetData.series.length === 0) {
|
|
36
|
+
return (
|
|
37
|
+
<View style={[styles.container, { width: dimensions.width, height: dimensions.height, backgroundColor: theme.colors.surface, borderRadius: theme.radius.md }]} testID={`${testID}-empty`}>
|
|
38
|
+
<RNText style={[styles.emptyText, { color: theme.colors.textSecondary }]}>No data</RNText>
|
|
39
|
+
</View>
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const { series, title } = widgetData;
|
|
44
|
+
const padding = theme.spacing.md;
|
|
45
|
+
const titleHeight = title ? theme.fontScale.md + theme.spacing.sm : 0;
|
|
46
|
+
const legendHeight = showLegend ? 30 : 0;
|
|
47
|
+
const xAxisHeight = showXAxis ? 30 : 0;
|
|
48
|
+
const yAxisWidth = showYAxis ? 40 : 0;
|
|
49
|
+
|
|
50
|
+
const chartWidth = dimensions.width - padding * 2 - yAxisWidth;
|
|
51
|
+
const chartHeight = dimensions.height - padding * 2 - titleHeight - legendHeight - xAxisHeight;
|
|
52
|
+
|
|
53
|
+
const { globalMinX, globalMaxX, globalMinY, globalMaxY, globalMinSize, globalMaxSize } = useMemo(() => {
|
|
54
|
+
let minX = Infinity, maxX = -Infinity, minY = Infinity, maxY = -Infinity, minS = Infinity, maxS = -Infinity;
|
|
55
|
+
series.forEach(s => {
|
|
56
|
+
s.data.forEach(point => {
|
|
57
|
+
if (point.x < minX) minX = point.x;
|
|
58
|
+
if (point.x > maxX) maxX = point.x;
|
|
59
|
+
if (point.y < minY) minY = point.y;
|
|
60
|
+
if (point.y > maxY) maxY = point.y;
|
|
61
|
+
if (point.size < minS) minS = point.size;
|
|
62
|
+
if (point.size > maxS) maxS = point.size;
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
return { globalMinX: minX, globalMaxX: maxX, globalMinY: minY, globalMaxY: maxY, globalMinSize: minS, globalMaxSize: maxS };
|
|
66
|
+
}, [series]);
|
|
67
|
+
|
|
68
|
+
const yAxisLabels = useMemo(() => {
|
|
69
|
+
const range = globalMaxY - globalMinY;
|
|
70
|
+
const step = range / 4;
|
|
71
|
+
return Array.from({ length: 5 }, (_, i) => ({
|
|
72
|
+
value: globalMinY + i * step,
|
|
73
|
+
y: chartHeight - (i * chartHeight) / 4,
|
|
74
|
+
}));
|
|
75
|
+
}, [globalMinY, globalMaxY, chartHeight]);
|
|
76
|
+
|
|
77
|
+
const seriesBubbles = useMemo(() => {
|
|
78
|
+
return series.map(s => {
|
|
79
|
+
const bubbles = s.data.map(point => {
|
|
80
|
+
const normalizedX = normalize(point.x, globalMinX, globalMaxX);
|
|
81
|
+
const normalizedY = normalize(point.y, globalMinY, globalMaxY);
|
|
82
|
+
const normalizedSize = normalize(point.size, globalMinSize, globalMaxSize);
|
|
83
|
+
const radius = minBubbleSize + normalizedSize * (maxBubbleSize - minBubbleSize);
|
|
84
|
+
|
|
85
|
+
return {
|
|
86
|
+
cx: normalizedX * chartWidth,
|
|
87
|
+
cy: chartHeight - normalizedY * chartHeight,
|
|
88
|
+
r: radius,
|
|
89
|
+
label: point.label,
|
|
90
|
+
};
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
return {
|
|
94
|
+
bubbles,
|
|
95
|
+
color: s.color,
|
|
96
|
+
label: s.label,
|
|
97
|
+
};
|
|
98
|
+
});
|
|
99
|
+
}, [series, chartWidth, chartHeight, globalMinX, globalMaxX, globalMinY, globalMaxY, globalMinSize, globalMaxSize, minBubbleSize, maxBubbleSize]);
|
|
100
|
+
|
|
101
|
+
return (
|
|
102
|
+
<View style={[styles.wrapper, { width: dimensions.width, height: dimensions.height, backgroundColor: theme.colors.surface, borderRadius: theme.radius.md, padding }]} testID={testID}>
|
|
103
|
+
{title && (
|
|
104
|
+
<RNText style={[styles.title, { color: theme.colors.text, fontSize: theme.fontScale.md, fontWeight: 'bold', marginBottom: theme.spacing.sm }]}>
|
|
105
|
+
{title}
|
|
106
|
+
</RNText>
|
|
107
|
+
)}
|
|
108
|
+
|
|
109
|
+
<View style={styles.chartRow}>
|
|
110
|
+
{showYAxis && (
|
|
111
|
+
<View style={[styles.yAxis, { width: yAxisWidth }]}>
|
|
112
|
+
{yAxisLabels.map((label, index) => (
|
|
113
|
+
<RNText key={`y-${index}`} style={[styles.yAxisLabel, { color: theme.colors.textSecondary, fontSize: theme.fontScale.xs, top: label.y - 6 }]}>
|
|
114
|
+
{label.value.toFixed(0)}
|
|
115
|
+
</RNText>
|
|
116
|
+
))}
|
|
117
|
+
</View>
|
|
118
|
+
)}
|
|
119
|
+
|
|
120
|
+
<View>
|
|
121
|
+
<Svg width={chartWidth} height={chartHeight}>
|
|
122
|
+
{showGrid && yAxisLabels.map((label, index) => (
|
|
123
|
+
<SvgLine key={`grid-${index}`} x1={0} y1={label.y} x2={chartWidth} y2={label.y} stroke={theme.colors.borderLight} strokeWidth={1} />
|
|
124
|
+
))}
|
|
125
|
+
|
|
126
|
+
{seriesBubbles.map((series, seriesIndex) => (
|
|
127
|
+
series.bubbles.map((bubble, bubbleIndex) => (
|
|
128
|
+
<Circle
|
|
129
|
+
key={`series-${seriesIndex}-bubble-${bubbleIndex}`}
|
|
130
|
+
cx={bubble.cx}
|
|
131
|
+
cy={bubble.cy}
|
|
132
|
+
r={bubble.r}
|
|
133
|
+
fill={series.color}
|
|
134
|
+
opacity={0.6}
|
|
135
|
+
stroke={series.color}
|
|
136
|
+
strokeWidth={2}
|
|
137
|
+
/>
|
|
138
|
+
))
|
|
139
|
+
))}
|
|
140
|
+
</Svg>
|
|
141
|
+
</View>
|
|
142
|
+
</View>
|
|
143
|
+
|
|
144
|
+
{showLegend && (
|
|
145
|
+
<View style={styles.legend}>
|
|
146
|
+
{seriesBubbles.map((series, index) => (
|
|
147
|
+
series.label && (
|
|
148
|
+
<View key={`legend-${index}`} style={styles.legendItem}>
|
|
149
|
+
<View style={[styles.legendColor, { backgroundColor: series.color }]} />
|
|
150
|
+
<RNText style={[styles.legendText, { color: theme.colors.textSecondary, fontSize: theme.fontScale.xs }]}>{series.label}</RNText>
|
|
151
|
+
</View>
|
|
152
|
+
)
|
|
153
|
+
))}
|
|
154
|
+
</View>
|
|
155
|
+
)}
|
|
156
|
+
</View>
|
|
157
|
+
);
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
BubbleChart.displayName = 'BubbleChart';
|
|
161
|
+
|
|
162
|
+
const styles = StyleSheet.create({
|
|
163
|
+
wrapper: { justifyContent: 'flex-start', alignItems: 'flex-start' },
|
|
164
|
+
container: { justifyContent: 'center', alignItems: 'center' },
|
|
165
|
+
loadingText: { fontSize: 16 },
|
|
166
|
+
emptyText: { fontSize: 16 },
|
|
167
|
+
title: { textAlign: 'center', width: '100%' },
|
|
168
|
+
chartRow: { flexDirection: 'row', alignItems: 'flex-start' },
|
|
169
|
+
yAxis: { position: 'relative', marginRight: 8 },
|
|
170
|
+
yAxisLabel: { position: 'absolute', right: 0, textAlign: 'right' },
|
|
171
|
+
legend: { flexDirection: 'row', flexWrap: 'wrap', justifyContent: 'center', marginTop: 12, gap: 12 },
|
|
172
|
+
legendItem: { flexDirection: 'row', alignItems: 'center', gap: 6 },
|
|
173
|
+
legendColor: { width: 12, height: 12, borderRadius: 6 },
|
|
174
|
+
legendText: { textTransform: 'uppercase', letterSpacing: 0.5 },
|
|
175
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BubbleChart Widget types - 3D scatter plot with size dimension
|
|
3
|
+
*/
|
|
4
|
+
import { BaseWidgetProps } from '../../core';
|
|
5
|
+
|
|
6
|
+
export interface BubbleDataPoint {
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
size: number;
|
|
10
|
+
label?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface BubbleSeries {
|
|
14
|
+
data: BubbleDataPoint[];
|
|
15
|
+
color: string;
|
|
16
|
+
label?: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface BubbleChartData {
|
|
20
|
+
series: BubbleSeries[];
|
|
21
|
+
title?: string;
|
|
22
|
+
xAxisLabel?: string;
|
|
23
|
+
yAxisLabel?: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface BubbleChartWidgetProps extends BaseWidgetProps<BubbleChartData> {
|
|
27
|
+
showXAxis?: boolean;
|
|
28
|
+
showYAxis?: boolean;
|
|
29
|
+
showGrid?: boolean;
|
|
30
|
+
showLegend?: boolean;
|
|
31
|
+
minBubbleSize?: number;
|
|
32
|
+
maxBubbleSize?: number;
|
|
33
|
+
}
|