tvision-charts-component 3.3.24
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/README.md +40 -0
- package/dist/esm/_type/chart.d.ts +6 -0
- package/dist/esm/_type/chart.js +2 -0
- package/dist/esm/_type/chart.js.map +1 -0
- package/dist/esm/_type/data.d.ts +40 -0
- package/dist/esm/_type/data.js +2 -0
- package/dist/esm/_type/data.js.map +1 -0
- package/dist/esm/_type/index.d.ts +3 -0
- package/dist/esm/_type/index.js +4 -0
- package/dist/esm/_type/index.js.map +1 -0
- package/dist/esm/_type/options.d.ts +83 -0
- package/dist/esm/_type/options.js +2 -0
- package/dist/esm/_type/options.js.map +1 -0
- package/dist/esm/basicBar/README.md +79 -0
- package/dist/esm/basicBar/_example/Basic.d.ts +1 -0
- package/dist/esm/basicBar/_example/Basic.js +29 -0
- package/dist/esm/basicBar/_example/Basic.js.map +1 -0
- package/dist/esm/basicBar/_example/Basic.jsx +32 -0
- package/dist/esm/basicBar/_example/CustomColorSingleBar.d.ts +1 -0
- package/dist/esm/basicBar/_example/CustomColorSingleBar.js +58 -0
- package/dist/esm/basicBar/_example/CustomColorSingleBar.js.map +1 -0
- package/dist/esm/basicBar/_example/CustomColorSingleBar.jsx +66 -0
- package/dist/esm/basicBar/_example/FixedWidthBar.d.ts +1 -0
- package/dist/esm/basicBar/_example/FixedWidthBar.js +57 -0
- package/dist/esm/basicBar/_example/FixedWidthBar.js.map +1 -0
- package/dist/esm/basicBar/_example/FixedWidthBar.jsx +92 -0
- package/dist/esm/basicBar/_example/GroupedBar.d.ts +1 -0
- package/dist/esm/basicBar/_example/GroupedBar.js +35 -0
- package/dist/esm/basicBar/_example/GroupedBar.js.map +1 -0
- package/dist/esm/basicBar/_example/GroupedBar.jsx +37 -0
- package/dist/esm/basicBar/_example/HorizontalBar.d.ts +1 -0
- package/dist/esm/basicBar/_example/HorizontalBar.js +92 -0
- package/dist/esm/basicBar/_example/HorizontalBar.js.map +1 -0
- package/dist/esm/basicBar/_example/HorizontalBar.jsx +95 -0
- package/dist/esm/basicBar/_example/HorizontalStackedBar.d.ts +1 -0
- package/dist/esm/basicBar/_example/HorizontalStackedBar.js +97 -0
- package/dist/esm/basicBar/_example/HorizontalStackedBar.js.map +1 -0
- package/dist/esm/basicBar/_example/HorizontalStackedBar.jsx +100 -0
- package/dist/esm/basicBar/_example/LabelRotate.d.ts +1 -0
- package/dist/esm/basicBar/_example/LabelRotate.js +20 -0
- package/dist/esm/basicBar/_example/LabelRotate.js.map +1 -0
- package/dist/esm/basicBar/_example/LabelRotate.jsx +24 -0
- package/dist/esm/basicBar/_example/StackedBar.d.ts +1 -0
- package/dist/esm/basicBar/_example/StackedBar.js +44 -0
- package/dist/esm/basicBar/_example/StackedBar.js.map +1 -0
- package/dist/esm/basicBar/_example/StackedBar.jsx +46 -0
- package/dist/esm/basicBar/_example/VerticalWaterfallBar.d.ts +1 -0
- package/dist/esm/basicBar/_example/VerticalWaterfallBar.js +100 -0
- package/dist/esm/basicBar/_example/VerticalWaterfallBar.js.map +1 -0
- package/dist/esm/basicBar/_example/VerticalWaterfallBar.jsx +117 -0
- package/dist/esm/basicBar/_example/WaterfallHoverBar.d.ts +1 -0
- package/dist/esm/basicBar/_example/WaterfallHoverBar.js +134 -0
- package/dist/esm/basicBar/_example/WaterfallHoverBar.js.map +1 -0
- package/dist/esm/basicBar/_example/WaterfallHoverBar.jsx +152 -0
- package/dist/esm/basicBar/_example/WaterfallZebraBar.d.ts +1 -0
- package/dist/esm/basicBar/_example/WaterfallZebraBar.js +122 -0
- package/dist/esm/basicBar/_example/WaterfallZebraBar.js.map +1 -0
- package/dist/esm/basicBar/_example/WaterfallZebraBar.jsx +137 -0
- package/dist/esm/basicBar/_example/XaxisBelowWaterfall.d.ts +1 -0
- package/dist/esm/basicBar/_example/XaxisBelowWaterfall.js +93 -0
- package/dist/esm/basicBar/_example/XaxisBelowWaterfall.js.map +1 -0
- package/dist/esm/basicBar/_example/XaxisBelowWaterfall.jsx +101 -0
- package/dist/esm/basicBar/_example/XaxisHideBar.d.ts +1 -0
- package/dist/esm/basicBar/_example/XaxisHideBar.js +54 -0
- package/dist/esm/basicBar/_example/XaxisHideBar.js.map +1 -0
- package/dist/esm/basicBar/_example/XaxisHideBar.jsx +59 -0
- package/dist/esm/basicBar/_example/XaxisLabelWrap.d.ts +1 -0
- package/dist/esm/basicBar/_example/XaxisLabelWrap.js +66 -0
- package/dist/esm/basicBar/_example/XaxisLabelWrap.js.map +1 -0
- package/dist/esm/basicBar/_example/XaxisLabelWrap.jsx +70 -0
- package/dist/esm/basicBar/_example/XaxisTopWaterfall.d.ts +1 -0
- package/dist/esm/basicBar/_example/XaxisTopWaterfall.js +94 -0
- package/dist/esm/basicBar/_example/XaxisTopWaterfall.js.map +1 -0
- package/dist/esm/basicBar/_example/XaxisTopWaterfall.jsx +102 -0
- package/dist/esm/basicBar/_example/XaxisTopWaterfallWithLabel.d.ts +1 -0
- package/dist/esm/basicBar/_example/XaxisTopWaterfallWithLabel.js +104 -0
- package/dist/esm/basicBar/_example/XaxisTopWaterfallWithLabel.js.map +1 -0
- package/dist/esm/basicBar/_example/XaxisTopWaterfallWithLabel.jsx +112 -0
- package/dist/esm/basicBar/_example/YaxisNegativeBasicBar.d.ts +1 -0
- package/dist/esm/basicBar/_example/YaxisNegativeBasicBar.js +28 -0
- package/dist/esm/basicBar/_example/YaxisNegativeBasicBar.js.map +1 -0
- package/dist/esm/basicBar/_example/YaxisNegativeBasicBar.jsx +31 -0
- package/dist/esm/basicBar/_example/YaxisReverseZoomBar.d.ts +1 -0
- package/dist/esm/basicBar/_example/YaxisReverseZoomBar.js +117 -0
- package/dist/esm/basicBar/_example/YaxisReverseZoomBar.js.map +1 -0
- package/dist/esm/basicBar/_example/YaxisReverseZoomBar.jsx +135 -0
- package/dist/esm/basicBar/demo/basic.md +34 -0
- package/dist/esm/basicBar/demo/labelRotate.md +35 -0
- package/dist/esm/basicBar/index.d.ts +56 -0
- package/dist/esm/basicBar/index.js +42 -0
- package/dist/esm/basicBar/index.js.map +1 -0
- package/dist/esm/basicBar/index.md +30 -0
- package/dist/esm/basicBar/style/index.less +0 -0
- package/dist/esm/basicFlame/README.md +56 -0
- package/dist/esm/basicFlame/_example/BackgroundBasic.d.ts +1 -0
- package/dist/esm/basicFlame/_example/BackgroundBasic.js +52 -0
- package/dist/esm/basicFlame/_example/BackgroundBasic.js.map +1 -0
- package/dist/esm/basicFlame/_example/BackgroundBasic.jsx +57 -0
- package/dist/esm/basicFlame/_example/Basic.d.ts +1 -0
- package/dist/esm/basicFlame/_example/Basic.js +49 -0
- package/dist/esm/basicFlame/_example/Basic.js.map +1 -0
- package/dist/esm/basicFlame/_example/Basic.jsx +52 -0
- package/dist/esm/basicFlame/_example/ColorsBasic.d.ts +1 -0
- package/dist/esm/basicFlame/_example/ColorsBasic.js +50 -0
- package/dist/esm/basicFlame/_example/ColorsBasic.js.map +1 -0
- package/dist/esm/basicFlame/_example/ColorsBasic.jsx +53 -0
- package/dist/esm/basicFlame/_example/FillBasic.d.ts +1 -0
- package/dist/esm/basicFlame/_example/FillBasic.js +53 -0
- package/dist/esm/basicFlame/_example/FillBasic.js.map +1 -0
- package/dist/esm/basicFlame/_example/FillBasic.jsx +56 -0
- package/dist/esm/basicFlame/_example/HeightBasic.d.ts +1 -0
- package/dist/esm/basicFlame/_example/HeightBasic.js +49 -0
- package/dist/esm/basicFlame/_example/HeightBasic.js.map +1 -0
- package/dist/esm/basicFlame/_example/HeightBasic.jsx +52 -0
- package/dist/esm/basicFlame/_example/HueBasic.d.ts +1 -0
- package/dist/esm/basicFlame/_example/HueBasic.js +50 -0
- package/dist/esm/basicFlame/_example/HueBasic.js.map +1 -0
- package/dist/esm/basicFlame/_example/HueBasic.jsx +53 -0
- package/dist/esm/basicFlame/_example/LabelBasic.d.ts +1 -0
- package/dist/esm/basicFlame/_example/LabelBasic.js +53 -0
- package/dist/esm/basicFlame/_example/LabelBasic.js.map +1 -0
- package/dist/esm/basicFlame/_example/LabelBasic.jsx +56 -0
- package/dist/esm/basicFlame/_example/LargeBasic1.d.ts +1 -0
- package/dist/esm/basicFlame/_example/LargeBasic1.js +3895 -0
- package/dist/esm/basicFlame/_example/LargeBasic1.js.map +1 -0
- package/dist/esm/basicFlame/_example/LargeBasic1.jsx +3899 -0
- package/dist/esm/basicFlame/_example/LargeBasic2.d.ts +1 -0
- package/dist/esm/basicFlame/_example/LargeBasic2.js +10511 -0
- package/dist/esm/basicFlame/_example/LargeBasic2.js.map +1 -0
- package/dist/esm/basicFlame/_example/LargeBasic2.jsx +10515 -0
- package/dist/esm/basicFlame/_example/ResetBasic.d.ts +1 -0
- package/dist/esm/basicFlame/_example/ResetBasic.js +59 -0
- package/dist/esm/basicFlame/_example/ResetBasic.js.map +1 -0
- package/dist/esm/basicFlame/_example/ResetBasic.jsx +62 -0
- package/dist/esm/basicFlame/demo/basic.md +55 -0
- package/dist/esm/basicFlame/index.d.ts +28 -0
- package/dist/esm/basicFlame/index.js +29 -0
- package/dist/esm/basicFlame/index.js.map +1 -0
- package/dist/esm/basicFlame/index.md +23 -0
- package/dist/esm/basicFlame/style/index.less +0 -0
- package/dist/esm/basicFunnel/README.md +19 -0
- package/dist/esm/basicFunnel/_example/Basic.d.ts +1 -0
- package/dist/esm/basicFunnel/_example/Basic.js +70 -0
- package/dist/esm/basicFunnel/_example/Basic.js.map +1 -0
- package/dist/esm/basicFunnel/_example/Basic.jsx +82 -0
- package/dist/esm/basicFunnel/_example/SpaceFunnel.d.ts +1 -0
- package/dist/esm/basicFunnel/_example/SpaceFunnel.js +71 -0
- package/dist/esm/basicFunnel/_example/SpaceFunnel.js.map +1 -0
- package/dist/esm/basicFunnel/_example/SpaceFunnel.jsx +83 -0
- package/dist/esm/basicFunnel/demo/basic.md +45 -0
- package/dist/esm/basicFunnel/index.d.ts +19 -0
- package/dist/esm/basicFunnel/index.js +27 -0
- package/dist/esm/basicFunnel/index.js.map +1 -0
- package/dist/esm/basicFunnel/index.md +21 -0
- package/dist/esm/basicFunnel/style/index.less +0 -0
- package/dist/esm/basicGauge/README.md +24 -0
- package/dist/esm/basicGauge/_example/Basic.d.ts +1 -0
- package/dist/esm/basicGauge/_example/Basic.js +31 -0
- package/dist/esm/basicGauge/_example/Basic.js.map +1 -0
- package/dist/esm/basicGauge/_example/Basic.jsx +34 -0
- package/dist/esm/basicGauge/_example/ScaleGauge.d.ts +1 -0
- package/dist/esm/basicGauge/_example/ScaleGauge.js +31 -0
- package/dist/esm/basicGauge/_example/ScaleGauge.js.map +1 -0
- package/dist/esm/basicGauge/_example/ScaleGauge.jsx +34 -0
- package/dist/esm/basicGauge/_example/ThresholdGauge.d.ts +1 -0
- package/dist/esm/basicGauge/_example/ThresholdGauge.js +31 -0
- package/dist/esm/basicGauge/_example/ThresholdGauge.js.map +1 -0
- package/dist/esm/basicGauge/_example/ThresholdGauge.jsx +34 -0
- package/dist/esm/basicGauge/index.d.ts +23 -0
- package/dist/esm/basicGauge/index.js +26 -0
- package/dist/esm/basicGauge/index.js.map +1 -0
- package/dist/esm/basicHBar/README.md +15 -0
- package/dist/esm/basicHBar/_example/Basic.d.ts +1 -0
- package/dist/esm/basicHBar/_example/Basic.js +49 -0
- package/dist/esm/basicHBar/_example/Basic.js.map +1 -0
- package/dist/esm/basicHBar/_example/Basic.jsx +56 -0
- package/dist/esm/basicHBar/_example/DiskBasic.d.ts +1 -0
- package/dist/esm/basicHBar/_example/DiskBasic.js +43 -0
- package/dist/esm/basicHBar/_example/DiskBasic.js.map +1 -0
- package/dist/esm/basicHBar/_example/DiskBasic.jsx +46 -0
- package/dist/esm/basicHBar/_example/LabelRotate.d.ts +1 -0
- package/dist/esm/basicHBar/_example/LabelRotate.js +20 -0
- package/dist/esm/basicHBar/_example/LabelRotate.js.map +1 -0
- package/dist/esm/basicHBar/_example/LabelRotate.jsx +26 -0
- package/dist/esm/basicHBar/demo/basic.md +48 -0
- package/dist/esm/basicHBar/demo/labelRotate.md +35 -0
- package/dist/esm/basicHBar/index.d.ts +19 -0
- package/dist/esm/basicHBar/index.js +28 -0
- package/dist/esm/basicHBar/index.js.map +1 -0
- package/dist/esm/basicHBar/index.md +31 -0
- package/dist/esm/basicHBar/style/index.less +0 -0
- package/dist/esm/basicHeatMap/README.md +19 -0
- package/dist/esm/basicHeatMap/_example/Basic.d.ts +1 -0
- package/dist/esm/basicHeatMap/_example/Basic.js +383 -0
- package/dist/esm/basicHeatMap/_example/Basic.js.map +1 -0
- package/dist/esm/basicHeatMap/_example/Basic.jsx +386 -0
- package/dist/esm/basicHeatMap/_example/CustomRoundHeatMap.d.ts +1 -0
- package/dist/esm/basicHeatMap/_example/CustomRoundHeatMap.js +1333 -0
- package/dist/esm/basicHeatMap/_example/CustomRoundHeatMap.js.map +1 -0
- package/dist/esm/basicHeatMap/_example/CustomRoundHeatMap.jsx +1337 -0
- package/dist/esm/basicHeatMap/index.d.ts +52 -0
- package/dist/esm/basicHeatMap/index.js +26 -0
- package/dist/esm/basicHeatMap/index.js.map +1 -0
- package/dist/esm/basicLine/README.md +115 -0
- package/dist/esm/basicLine/_example/AreaLine.d.ts +1 -0
- package/dist/esm/basicLine/_example/AreaLine.js +38 -0
- package/dist/esm/basicLine/_example/AreaLine.js.map +1 -0
- package/dist/esm/basicLine/_example/AreaLine.jsx +41 -0
- package/dist/esm/basicLine/_example/AuxiliaryHLine.d.ts +1 -0
- package/dist/esm/basicLine/_example/AuxiliaryHLine.js +71 -0
- package/dist/esm/basicLine/_example/AuxiliaryHLine.js.map +1 -0
- package/dist/esm/basicLine/_example/AuxiliaryHLine.jsx +74 -0
- package/dist/esm/basicLine/_example/AuxiliaryLine.d.ts +1 -0
- package/dist/esm/basicLine/_example/AuxiliaryLine.js +53 -0
- package/dist/esm/basicLine/_example/AuxiliaryLine.js.map +1 -0
- package/dist/esm/basicLine/_example/AuxiliaryLine.jsx +58 -0
- package/dist/esm/basicLine/_example/AuxiliaryVLine.d.ts +1 -0
- package/dist/esm/basicLine/_example/AuxiliaryVLine.js +71 -0
- package/dist/esm/basicLine/_example/AuxiliaryVLine.js.map +1 -0
- package/dist/esm/basicLine/_example/AuxiliaryVLine.jsx +75 -0
- package/dist/esm/basicLine/_example/AxisFormatter.d.ts +1 -0
- package/dist/esm/basicLine/_example/AxisFormatter.js +95 -0
- package/dist/esm/basicLine/_example/AxisFormatter.js.map +1 -0
- package/dist/esm/basicLine/_example/AxisFormatter.jsx +108 -0
- package/dist/esm/basicLine/_example/BarLine.d.ts +1 -0
- package/dist/esm/basicLine/_example/BarLine.js +91 -0
- package/dist/esm/basicLine/_example/BarLine.js.map +1 -0
- package/dist/esm/basicLine/_example/BarLine.jsx +94 -0
- package/dist/esm/basicLine/_example/Basic.d.ts +1 -0
- package/dist/esm/basicLine/_example/Basic.js +26 -0
- package/dist/esm/basicLine/_example/Basic.js.map +1 -0
- package/dist/esm/basicLine/_example/Basic.jsx +29 -0
- package/dist/esm/basicLine/_example/CustomColorLine.d.ts +1 -0
- package/dist/esm/basicLine/_example/CustomColorLine.js +135 -0
- package/dist/esm/basicLine/_example/CustomColorLine.js.map +1 -0
- package/dist/esm/basicLine/_example/CustomColorLine.jsx +148 -0
- package/dist/esm/basicLine/_example/DataZoomLine.d.ts +1 -0
- package/dist/esm/basicLine/_example/DataZoomLine.js +1332 -0
- package/dist/esm/basicLine/_example/DataZoomLine.js.map +1 -0
- package/dist/esm/basicLine/_example/DataZoomLine.jsx +1344 -0
- package/dist/esm/basicLine/_example/DottedLine.d.ts +1 -0
- package/dist/esm/basicLine/_example/DottedLine.js +105 -0
- package/dist/esm/basicLine/_example/DottedLine.js.map +1 -0
- package/dist/esm/basicLine/_example/DottedLine.jsx +118 -0
- package/dist/esm/basicLine/_example/DualaxisLine.d.ts +1 -0
- package/dist/esm/basicLine/_example/DualaxisLine.js +91 -0
- package/dist/esm/basicLine/_example/DualaxisLine.js.map +1 -0
- package/dist/esm/basicLine/_example/DualaxisLine.jsx +94 -0
- package/dist/esm/basicLine/_example/LabelLine.d.ts +1 -0
- package/dist/esm/basicLine/_example/LabelLine.js +83 -0
- package/dist/esm/basicLine/_example/LabelLine.js.map +1 -0
- package/dist/esm/basicLine/_example/LabelLine.jsx +96 -0
- package/dist/esm/basicLine/_example/LegendLeftLine.d.ts +1 -0
- package/dist/esm/basicLine/_example/LegendLeftLine.js +135 -0
- package/dist/esm/basicLine/_example/LegendLeftLine.js.map +1 -0
- package/dist/esm/basicLine/_example/LegendLeftLine.jsx +138 -0
- package/dist/esm/basicLine/_example/LegendSelectedLine.d.ts +1 -0
- package/dist/esm/basicLine/_example/LegendSelectedLine.js +53 -0
- package/dist/esm/basicLine/_example/LegendSelectedLine.js.map +1 -0
- package/dist/esm/basicLine/_example/LegendSelectedLine.jsx +56 -0
- package/dist/esm/basicLine/_example/MarkLine.d.ts +1 -0
- package/dist/esm/basicLine/_example/MarkLine.js +1345 -0
- package/dist/esm/basicLine/_example/MarkLine.js.map +1 -0
- package/dist/esm/basicLine/_example/MarkLine.jsx +1356 -0
- package/dist/esm/basicLine/_example/ScatterBarLine.d.ts +1 -0
- package/dist/esm/basicLine/_example/ScatterBarLine.js +50 -0
- package/dist/esm/basicLine/_example/ScatterBarLine.js.map +1 -0
- package/dist/esm/basicLine/_example/ScatterBarLine.jsx +53 -0
- package/dist/esm/basicLine/_example/ScatterLine.d.ts +1 -0
- package/dist/esm/basicLine/_example/ScatterLine.js +117 -0
- package/dist/esm/basicLine/_example/ScatterLine.js.map +1 -0
- package/dist/esm/basicLine/_example/ScatterLine.jsx +130 -0
- package/dist/esm/basicLine/_example/SmoothLine.d.ts +1 -0
- package/dist/esm/basicLine/_example/SmoothLine.js +27 -0
- package/dist/esm/basicLine/_example/SmoothLine.js.map +1 -0
- package/dist/esm/basicLine/_example/SmoothLine.jsx +30 -0
- package/dist/esm/basicLine/_example/StackAreaLine.d.ts +1 -0
- package/dist/esm/basicLine/_example/StackAreaLine.js +54 -0
- package/dist/esm/basicLine/_example/StackAreaLine.js.map +1 -0
- package/dist/esm/basicLine/_example/StackAreaLine.jsx +57 -0
- package/dist/esm/basicLine/_example/StepLine.d.ts +1 -0
- package/dist/esm/basicLine/_example/StepLine.js +57 -0
- package/dist/esm/basicLine/_example/StepLine.js.map +1 -0
- package/dist/esm/basicLine/_example/StepLine.jsx +61 -0
- package/dist/esm/basicLine/_example/StepLineArea.d.ts +1 -0
- package/dist/esm/basicLine/_example/StepLineArea.js +58 -0
- package/dist/esm/basicLine/_example/StepLineArea.js.map +1 -0
- package/dist/esm/basicLine/_example/StepLineArea.jsx +62 -0
- package/dist/esm/basicLine/_example/ThresholdLine.d.ts +1 -0
- package/dist/esm/basicLine/_example/ThresholdLine.js +37 -0
- package/dist/esm/basicLine/_example/ThresholdLine.js.map +1 -0
- package/dist/esm/basicLine/_example/ThresholdLine.jsx +40 -0
- package/dist/esm/basicLine/_example/XaxisHideLine.d.ts +1 -0
- package/dist/esm/basicLine/_example/XaxisHideLine.js +86 -0
- package/dist/esm/basicLine/_example/XaxisHideLine.js.map +1 -0
- package/dist/esm/basicLine/_example/XaxisHideLine.jsx +99 -0
- package/dist/esm/basicLine/_example/YaxisSetMaxMinLine.d.ts +1 -0
- package/dist/esm/basicLine/_example/YaxisSetMaxMinLine.js +165 -0
- package/dist/esm/basicLine/_example/YaxisSetMaxMinLine.js.map +1 -0
- package/dist/esm/basicLine/_example/YaxisSetMaxMinLine.jsx +177 -0
- package/dist/esm/basicLine/_example/YaxisTitleLine.d.ts +1 -0
- package/dist/esm/basicLine/_example/YaxisTitleLine.js +1349 -0
- package/dist/esm/basicLine/_example/YaxisTitleLine.js.map +1 -0
- package/dist/esm/basicLine/_example/YaxisTitleLine.jsx +1361 -0
- package/dist/esm/basicLine/_example/ZoombarLine.d.ts +1 -0
- package/dist/esm/basicLine/_example/ZoombarLine.js +25 -0
- package/dist/esm/basicLine/_example/ZoombarLine.js.map +1 -0
- package/dist/esm/basicLine/_example/ZoombarLine.jsx +26 -0
- package/dist/esm/basicLine/demo/basic.md +35 -0
- package/dist/esm/basicLine/demo/labelRotate.md +34 -0
- package/dist/esm/basicLine/demo/linex.md +33 -0
- package/dist/esm/basicLine/index.d.ts +59 -0
- package/dist/esm/basicLine/index.js +122 -0
- package/dist/esm/basicLine/index.js.map +1 -0
- package/dist/esm/basicLine/index.md +30 -0
- package/dist/esm/basicLine/style/index.less +0 -0
- package/dist/esm/basicMap/README.md +31 -0
- package/dist/esm/basicMap/_example/Basic.d.ts +1 -0
- package/dist/esm/basicMap/_example/Basic.js +84 -0
- package/dist/esm/basicMap/_example/Basic.js.map +1 -0
- package/dist/esm/basicMap/_example/Basic.jsx +88 -0
- package/dist/esm/basicMap/_example/ChinaMap.d.ts +1 -0
- package/dist/esm/basicMap/_example/ChinaMap.js +78 -0
- package/dist/esm/basicMap/_example/ChinaMap.js.map +1 -0
- package/dist/esm/basicMap/_example/ChinaMap.jsx +81 -0
- package/dist/esm/basicMap/_example/ChinaMapEx.d.ts +1 -0
- package/dist/esm/basicMap/_example/ChinaMapEx.js +78 -0
- package/dist/esm/basicMap/_example/ChinaMapEx.js.map +1 -0
- package/dist/esm/basicMap/_example/ChinaMapEx.jsx +92 -0
- package/dist/esm/basicMap/_example/ChinaMapNodeLink.d.ts +1 -0
- package/dist/esm/basicMap/_example/ChinaMapNodeLink.js +138 -0
- package/dist/esm/basicMap/_example/ChinaMapNodeLink.js.map +1 -0
- package/dist/esm/basicMap/_example/ChinaMapNodeLink.jsx +183 -0
- package/dist/esm/basicMap/_example/WorldMap.d.ts +1 -0
- package/dist/esm/basicMap/_example/WorldMap.js +49 -0
- package/dist/esm/basicMap/_example/WorldMap.js.map +1 -0
- package/dist/esm/basicMap/_example/WorldMap.jsx +53 -0
- package/dist/esm/basicMap/index.d.ts +40 -0
- package/dist/esm/basicMap/index.js +19 -0
- package/dist/esm/basicMap/index.js.map +1 -0
- package/dist/esm/basicPie/README.md +35 -0
- package/dist/esm/basicPie/_example/Basic.d.ts +1 -0
- package/dist/esm/basicPie/_example/Basic.js +40 -0
- package/dist/esm/basicPie/_example/Basic.js.map +1 -0
- package/dist/esm/basicPie/_example/Basic.jsx +43 -0
- package/dist/esm/basicPie/_example/DonutPic.d.ts +1 -0
- package/dist/esm/basicPie/_example/DonutPic.js +39 -0
- package/dist/esm/basicPie/_example/DonutPic.js.map +1 -0
- package/dist/esm/basicPie/_example/DonutPic.jsx +42 -0
- package/dist/esm/basicPie/_example/LabelPic.d.ts +1 -0
- package/dist/esm/basicPie/_example/LabelPic.js +25 -0
- package/dist/esm/basicPie/_example/LabelPic.js.map +1 -0
- package/dist/esm/basicPie/_example/LabelPic.jsx +27 -0
- package/dist/esm/basicPie/_example/RosePic.d.ts +1 -0
- package/dist/esm/basicPie/_example/RosePic.js +56 -0
- package/dist/esm/basicPie/_example/RosePic.js.map +1 -0
- package/dist/esm/basicPie/_example/RosePic.jsx +65 -0
- package/dist/esm/basicPie/_example/SpaceDonutPic.d.ts +1 -0
- package/dist/esm/basicPie/_example/SpaceDonutPic.js +51 -0
- package/dist/esm/basicPie/_example/SpaceDonutPic.js.map +1 -0
- package/dist/esm/basicPie/_example/SpaceDonutPic.jsx +59 -0
- package/dist/esm/basicPie/_example/SpacePic.d.ts +1 -0
- package/dist/esm/basicPie/_example/SpacePic.js +40 -0
- package/dist/esm/basicPie/_example/SpacePic.js.map +1 -0
- package/dist/esm/basicPie/_example/SpacePic.jsx +43 -0
- package/dist/esm/basicPie/demo/basic.md +31 -0
- package/dist/esm/basicPie/index.d.ts +47 -0
- package/dist/esm/basicPie/index.js +34 -0
- package/dist/esm/basicPie/index.js.map +1 -0
- package/dist/esm/basicPie/index.md +27 -0
- package/dist/esm/basicPie/style/index.less +0 -0
- package/dist/esm/basicSankey/README.md +12 -0
- package/dist/esm/basicSankey/_example/Basic.d.ts +1 -0
- package/dist/esm/basicSankey/_example/Basic.js +75 -0
- package/dist/esm/basicSankey/_example/Basic.js.map +1 -0
- package/dist/esm/basicSankey/_example/Basic.jsx +79 -0
- package/dist/esm/basicSankey/demo/basic.md +88 -0
- package/dist/esm/basicSankey/index.d.ts +19 -0
- package/dist/esm/basicSankey/index.js +27 -0
- package/dist/esm/basicSankey/index.js.map +1 -0
- package/dist/esm/basicSankey/index.md +21 -0
- package/dist/esm/basicSankey/style/index.less +0 -0
- package/dist/esm/basicStat/README.md +23 -0
- package/dist/esm/basicStat/_example/Basic.d.ts +1 -0
- package/dist/esm/basicStat/_example/Basic.js +399 -0
- package/dist/esm/basicStat/_example/Basic.js.map +1 -0
- package/dist/esm/basicStat/_example/Basic.jsx +402 -0
- package/dist/esm/basicStat/_example/LineStat.d.ts +1 -0
- package/dist/esm/basicStat/_example/LineStat.js +399 -0
- package/dist/esm/basicStat/_example/LineStat.js.map +1 -0
- package/dist/esm/basicStat/_example/LineStat.jsx +402 -0
- package/dist/esm/basicStat/_example/ThresholdStat.d.ts +1 -0
- package/dist/esm/basicStat/_example/ThresholdStat.js +399 -0
- package/dist/esm/basicStat/_example/ThresholdStat.js.map +1 -0
- package/dist/esm/basicStat/_example/ThresholdStat.jsx +402 -0
- package/dist/esm/basicStat/index.d.ts +44 -0
- package/dist/esm/basicStat/index.js +85 -0
- package/dist/esm/basicStat/index.js.map +1 -0
- package/dist/esm/basicTopo/README.md +39 -0
- package/dist/esm/basicTopo/_example/Basic.d.ts +1 -0
- package/dist/esm/basicTopo/_example/Basic.js +124 -0
- package/dist/esm/basicTopo/_example/Basic.js.map +1 -0
- package/dist/esm/basicTopo/_example/Basic.jsx +132 -0
- package/dist/esm/basicTopo/_example/GroupLinkTopo.d.ts +1 -0
- package/dist/esm/basicTopo/_example/GroupLinkTopo.js +875 -0
- package/dist/esm/basicTopo/_example/GroupLinkTopo.js.map +1 -0
- package/dist/esm/basicTopo/_example/GroupLinkTopo.jsx +902 -0
- package/dist/esm/basicTopo/_example/GroupTopo.d.ts +1 -0
- package/dist/esm/basicTopo/_example/GroupTopo.js +193 -0
- package/dist/esm/basicTopo/_example/GroupTopo.js.map +1 -0
- package/dist/esm/basicTopo/_example/GroupTopo.jsx +221 -0
- package/dist/esm/basicTopo/_example/LinkLabel.d.ts +1 -0
- package/dist/esm/basicTopo/_example/LinkLabel.js +109 -0
- package/dist/esm/basicTopo/_example/LinkLabel.js.map +1 -0
- package/dist/esm/basicTopo/_example/LinkLabel.jsx +117 -0
- package/dist/esm/basicTopo/_example/NoIconTopo.d.ts +1 -0
- package/dist/esm/basicTopo/_example/NoIconTopo.js +203 -0
- package/dist/esm/basicTopo/_example/NoIconTopo.js.map +1 -0
- package/dist/esm/basicTopo/_example/NoIconTopo.jsx +235 -0
- package/dist/esm/basicTopo/_example/PerformanceTest.d.ts +1 -0
- package/dist/esm/basicTopo/_example/PerformanceTest.js +155 -0
- package/dist/esm/basicTopo/_example/PerformanceTest.js.map +1 -0
- package/dist/esm/basicTopo/_example/PerformanceTest.jsx +171 -0
- package/dist/esm/basicTopo/_example/VisioLinkTopo.d.ts +1 -0
- package/dist/esm/basicTopo/_example/VisioLinkTopo.js +209 -0
- package/dist/esm/basicTopo/_example/VisioLinkTopo.js.map +1 -0
- package/dist/esm/basicTopo/_example/VisioLinkTopo.jsx +234 -0
- package/dist/esm/basicTopo/demo/basic.md +48 -0
- package/dist/esm/basicTopo/demo/labelRotate.md +35 -0
- package/dist/esm/basicTopo/index.d.ts +40 -0
- package/dist/esm/basicTopo/index.js +24 -0
- package/dist/esm/basicTopo/index.js.map +1 -0
- package/dist/esm/basicTopo/index.md +25 -0
- package/dist/esm/basicTopo/style/index.less +0 -0
- package/dist/esm/basicTreeMap/basicTreeMap.d.ts +19 -0
- package/dist/esm/basicTreeMap/basicTreeMap.js +25 -0
- package/dist/esm/basicTreeMap/basicTreeMap.js.map +1 -0
- package/dist/esm/common/chart.d.ts +23 -0
- package/dist/esm/common/chart.js +56 -0
- package/dist/esm/common/chart.js.map +1 -0
- package/dist/esm/common/compareObjWithoutFunction.d.ts +1 -0
- package/dist/esm/common/compareObjWithoutFunction.js +34 -0
- package/dist/esm/common/compareObjWithoutFunction.js.map +1 -0
- package/dist/esm/common/functionChart.d.ts +7 -0
- package/dist/esm/common/functionChart.js +37 -0
- package/dist/esm/common/functionChart.js.map +1 -0
- package/dist/esm/common/optionsHelp.d.ts +101 -0
- package/dist/esm/common/optionsHelp.js +464 -0
- package/dist/esm/common/optionsHelp.js.map +1 -0
- package/dist/esm/diskPart/README.md +19 -0
- package/dist/esm/diskPart/_example/MultipleDiskPart.d.ts +1 -0
- package/dist/esm/diskPart/_example/MultipleDiskPart.js +43 -0
- package/dist/esm/diskPart/_example/MultipleDiskPart.js.map +1 -0
- package/dist/esm/diskPart/_example/MultipleDiskPart.jsx +46 -0
- package/dist/esm/diskPart/_example/SingleDiskPart.d.ts +1 -0
- package/dist/esm/diskPart/_example/SingleDiskPart.js +43 -0
- package/dist/esm/diskPart/_example/SingleDiskPart.js.map +1 -0
- package/dist/esm/diskPart/_example/SingleDiskPart.jsx +46 -0
- package/dist/esm/diskPart/index.d.ts +43 -0
- package/dist/esm/diskPart/index.js +25 -0
- package/dist/esm/diskPart/index.js.map +1 -0
- package/dist/esm/index.d.ts +16 -0
- package/dist/esm/index.js +17 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/liquidFillChart/README.md +19 -0
- package/dist/esm/liquidFillChart/_example/Basic.d.ts +1 -0
- package/dist/esm/liquidFillChart/_example/Basic.js +53 -0
- package/dist/esm/liquidFillChart/_example/Basic.js.map +1 -0
- package/dist/esm/liquidFillChart/_example/Basic.jsx +56 -0
- package/dist/esm/liquidFillChart/_example/Basicx.d.ts +1 -0
- package/dist/esm/liquidFillChart/_example/Basicx.js +73 -0
- package/dist/esm/liquidFillChart/_example/Basicx.js.map +1 -0
- package/dist/esm/liquidFillChart/_example/Basicx.jsx +78 -0
- package/dist/esm/liquidFillChart/demo/basic.md +62 -0
- package/dist/esm/liquidFillChart/demo/basicx.md +82 -0
- package/dist/esm/liquidFillChart/index.d.ts +32 -0
- package/dist/esm/liquidFillChart/index.js +28 -0
- package/dist/esm/liquidFillChart/index.js.map +1 -0
- package/dist/esm/liquidFillChart/index.md +27 -0
- package/dist/esm/liquidFillChart/style/index.less +0 -0
- package/dist/esm/proxy.d.ts +2 -0
- package/dist/esm/proxy.js +3 -0
- package/dist/esm/proxy.js.map +1 -0
- package/dist/esm/radarChart/README.md +18 -0
- package/dist/esm/radarChart/_example/CommonRadarChart.d.ts +1 -0
- package/dist/esm/radarChart/_example/CommonRadarChart.js +44 -0
- package/dist/esm/radarChart/_example/CommonRadarChart.js.map +1 -0
- package/dist/esm/radarChart/_example/CommonRadarChart.jsx +48 -0
- package/dist/esm/radarChart/_example/FilledRadarChart.d.ts +1 -0
- package/dist/esm/radarChart/_example/FilledRadarChart.js +73 -0
- package/dist/esm/radarChart/_example/FilledRadarChart.js.map +1 -0
- package/dist/esm/radarChart/_example/FilledRadarChart.jsx +77 -0
- package/dist/esm/radarChart/demo/basic.md +53 -0
- package/dist/esm/radarChart/demo/basicx.md +83 -0
- package/dist/esm/radarChart/index.d.ts +37 -0
- package/dist/esm/radarChart/index.js +26 -0
- package/dist/esm/radarChart/index.js.map +1 -0
- package/dist/esm/radarChart/index.md +28 -0
- package/dist/esm/radarChart/style/index.less +0 -0
- package/dist/esm/wordcloud/README.md +25 -0
- package/dist/esm/wordcloud/_example/Basic.d.ts +1 -0
- package/dist/esm/wordcloud/_example/Basic.js +219 -0
- package/dist/esm/wordcloud/_example/Basic.js.map +1 -0
- package/dist/esm/wordcloud/_example/Basic.jsx +222 -0
- package/dist/esm/wordcloud/_example/CenterBasic.d.ts +1 -0
- package/dist/esm/wordcloud/_example/CenterBasic.js +220 -0
- package/dist/esm/wordcloud/_example/CenterBasic.js.map +1 -0
- package/dist/esm/wordcloud/_example/CenterBasic.jsx +223 -0
- package/dist/esm/wordcloud/_example/ColorsBasic.d.ts +1 -0
- package/dist/esm/wordcloud/_example/ColorsBasic.js +220 -0
- package/dist/esm/wordcloud/_example/ColorsBasic.js.map +1 -0
- package/dist/esm/wordcloud/_example/ColorsBasic.jsx +224 -0
- package/dist/esm/wordcloud/demo/basic.md +39 -0
- package/dist/esm/wordcloud/index.d.ts +26 -0
- package/dist/esm/wordcloud/index.js +26 -0
- package/dist/esm/wordcloud/index.js.map +1 -0
- package/dist/esm/wordcloud/index.md +22 -0
- package/dist/esm/wordcloud/style/index.less +0 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +84 -0
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
import React, { useRef, useMemo } from 'react';
|
|
2
|
+
import { BasicTopo } from '@tencent/tcharts-component';
|
|
3
|
+
import { Button } from '@tencent/tea-component';
|
|
4
|
+
|
|
5
|
+
export default function TaxiLinkTopo() {
|
|
6
|
+
const chartDom = useRef(null);
|
|
7
|
+
// const [showMsg, setShowMsg] = useState(false);
|
|
8
|
+
const options = {
|
|
9
|
+
grid: { left: 300, right: 0, bottom: 0, top: 300, containLabel: true },
|
|
10
|
+
// 如果需要定制节点label的最大长度,在props中增加node配置
|
|
11
|
+
node: {
|
|
12
|
+
maxLabelLen: 130,
|
|
13
|
+
},
|
|
14
|
+
link: {
|
|
15
|
+
curveStyle: 'visio',
|
|
16
|
+
// escapeDistance: 30,
|
|
17
|
+
// slotDistance: 30,
|
|
18
|
+
},
|
|
19
|
+
tooltip: {
|
|
20
|
+
trigger: 'item',
|
|
21
|
+
formatter: (items) => {
|
|
22
|
+
const content = `节点ID: ${items.id}<br />`;
|
|
23
|
+
// console.log('tooltip', items)
|
|
24
|
+
return content;
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
chartRef: (chart) => {
|
|
28
|
+
chartDom.current = chart;
|
|
29
|
+
chart.network.registerImages([
|
|
30
|
+
{
|
|
31
|
+
id: 'application',
|
|
32
|
+
path: 'M48.872727 446.836364C23.272727 446.836364 0 425.890909 0 397.963636v-349.090909C0 20.945455 20.945455 0 48.872727 0h351.418182c25.6 0 48.872727 20.945455 48.872727 48.872727v351.418182c0 25.6-20.945455 48.872727-48.872727 48.872727H48.872727zM623.709091 446.836364c-25.6 0-48.872727-20.945455-48.872727-48.872728v-349.090909c0-25.6 20.945455-48.872727 48.872727-48.872727h351.418182c27.927273 0 48.872727 20.945455 48.872727 48.872727v351.418182c0 25.6-20.945455 48.872727-48.872727 48.872727H623.709091zM48.872727 1024C20.945455 1024 0 1003.054545 0 975.127273V623.709091c0-25.6 20.945455-48.872727 48.872727-48.872727h351.418182c25.6 0 48.872727 20.945455 48.872727 48.872727v351.418182c0 25.6-20.945455 48.872727-48.872727 48.872727H48.872727zM623.709091 1024c-25.6 0-48.872727-20.945455-48.872727-48.872727V623.709091c0-25.6 20.945455-48.872727 48.872727-48.872727h351.418182c25.6 0 48.872727 20.945455 48.872727 48.872727v351.418182c0 25.6-20.945455 48.872727-48.872727 48.872727H623.709091z',
|
|
33
|
+
color: '#AAAAAA',
|
|
34
|
+
width: 32,
|
|
35
|
+
height: 32,
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
id: 'database',
|
|
39
|
+
path: 'M170.666667 798.464V262.101333C170.666667 235.178667 192.512 213.333333 219.434667 213.333333h585.130666C831.488 213.333333 853.333333 235.178667 853.333333 262.101333v536.362667c0 26.922667-21.845333 48.768-48.768 48.768H219.434667A48.768 48.768 0 0 1 170.666667 798.464z m48.768-146.261333v146.261333h585.130666v-146.261333H219.434667z m0-48.768h585.130666v-146.304H219.434667v146.304z m0-195.072h585.130666V262.101333H219.434667V408.32z m73.130666-97.493334h97.536a24.362667 24.362667 0 1 1 0 48.768H292.565333a24.362667 24.362667 0 1 1 0-48.768z m0 195.029334h97.536a24.362667 24.362667 0 1 1 0 48.768H292.565333a24.362667 24.362667 0 0 1 0-48.768z m0 195.072h97.536a24.362667 24.362667 0 0 1 0 48.725333H292.565333a24.362667 24.362667 0 0 1 0-48.725333z',
|
|
40
|
+
color: '#AAAAAA',
|
|
41
|
+
width: 32,
|
|
42
|
+
height: 32,
|
|
43
|
+
},
|
|
44
|
+
]);
|
|
45
|
+
|
|
46
|
+
chart.network.add([
|
|
47
|
+
{
|
|
48
|
+
group: 'nodes',
|
|
49
|
+
data: { id: 'n0', name: 'skywalking-watch', selectable: true, animation: false },
|
|
50
|
+
position: { x: 100, y: 100 },
|
|
51
|
+
style: { width: 20, height: 20, color: '#D2514C', borer: 2, imageStyle: 'auto' },
|
|
52
|
+
property: { type: 'server' },
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
group: 'nodes',
|
|
56
|
+
data: { id: 'n1', name: 'skywalking-agent', grabbable: false, selectable: false },
|
|
57
|
+
position: { x: 300, y: 300 },
|
|
58
|
+
style: { width: 20, height: 20, color: '#D2514C', border: 2, imageStyle: 'auto' },
|
|
59
|
+
property: { type: 'cpu' },
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
group: 'nodes',
|
|
63
|
+
data: { id: 'n2', name: 'skywalking-agent2' },
|
|
64
|
+
position: { x: 500, y: 100 },
|
|
65
|
+
style: { width: 20, height: 20, imageStyle: 'auto' },
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
group: 'nodes',
|
|
69
|
+
data: { id: 'n3', name: 'skywalking-agent3' },
|
|
70
|
+
position: { x: 300, y: 500 },
|
|
71
|
+
style: { width: 20, height: 20, color: '#F0A139', border: 2, imageStyle: 'auto' },
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
group: 'nodes',
|
|
75
|
+
data: { id: 'n4', name: 'skywalking-agent4', animation: false },
|
|
76
|
+
position: { x: 200, y: 600 },
|
|
77
|
+
style: { width: 20, height: 20, color: '#F0A139', border: 2, imageStyle: 'auto' },
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
group: 'nodes',
|
|
81
|
+
data: { id: 'n5', name: 'skywalking-agent5', animation: false },
|
|
82
|
+
position: { x: 400, y: 600 },
|
|
83
|
+
style: { width: 20, height: 20, color: '#F0A139', border: 2, imageStyle: 'auto' },
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
group: 'nodes',
|
|
87
|
+
data: { id: 'n6', name: 'skywalking-agent6', animation: false },
|
|
88
|
+
position: { x: 400, y: 400 },
|
|
89
|
+
style: { width: 20, height: 20, color: '#F0A139', border: 2, imageStyle: 'auto' },
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
group: 'nodes',
|
|
93
|
+
data: { id: 'n7', name: 'skywalking-agent-v1' },
|
|
94
|
+
position: { x: 300, y: 300 },
|
|
95
|
+
style: { width: 20, height: 20, color: '#D2514C', border: 2, imageStyle: 'auto' },
|
|
96
|
+
property: { type: 'cpu' },
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
group: 'nodes',
|
|
100
|
+
data: { id: 'n8', name: 'skywalking-agent-v2' },
|
|
101
|
+
position: { x: 300, y: 300 },
|
|
102
|
+
style: { width: 20, height: 20, color: '#D2514C', border: 2, imageStyle: 'auto' },
|
|
103
|
+
property: { type: 'cpu' },
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
group: 'nodes',
|
|
107
|
+
data: { id: 'n9', name: 'skywalking-agent-v3' },
|
|
108
|
+
position: { x: 300, y: 300 },
|
|
109
|
+
style: { width: 20, height: 20, color: '#D2514C', border: 2, imageStyle: 'auto' },
|
|
110
|
+
property: { type: 'cpu' },
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
group: 'nodes',
|
|
114
|
+
data: { id: 'n10', name: 'skywalking-agent-v4' },
|
|
115
|
+
position: { x: 300, y: 300 },
|
|
116
|
+
style: { width: 20, height: 20, color: '#D2514C', border: 2, imageStyle: 'auto' },
|
|
117
|
+
property: { type: 'cpu' },
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
group: 'edges',
|
|
121
|
+
data: { id: 'e0', source: 'n0', target: 'n1', selectable: false },
|
|
122
|
+
style: { color: '#AAAAAA', width: 1, curveStyle: 'visio' },
|
|
123
|
+
},
|
|
124
|
+
{ group: 'edges', data: { id: 'e1', source: 'n1', target: 'n2' }, style: { color: '#AAAAAA', width: 1 } },
|
|
125
|
+
{ group: 'edges', data: { id: 'e2', source: 'n1', target: 'n3' }, style: { color: '#AAAAAA', width: 1 } },
|
|
126
|
+
{ group: 'edges', data: { id: 'e3', source: 'n3', target: 'n4' }, style: { color: '#AAAAAA', width: 1 } },
|
|
127
|
+
{ group: 'edges', data: { id: 'e4', source: 'n3', target: 'n5' }, style: { color: '#AAAAAA', width: 1 } },
|
|
128
|
+
|
|
129
|
+
{
|
|
130
|
+
group: 'edges',
|
|
131
|
+
data: { id: 'e7', source: 'n2', target: 'n6' },
|
|
132
|
+
style: { color: '#AAAAAA', width: 1 },
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
group: 'edges',
|
|
136
|
+
data: { id: 'e8', source: 'n1', target: 'n7' },
|
|
137
|
+
style: { color: '#AAAAAA', width: 1 },
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
group: 'edges',
|
|
141
|
+
data: { id: 'e9', source: 'n1', target: 'n8' },
|
|
142
|
+
style: { color: '#AAAAAA', width: 1 },
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
group: 'edges',
|
|
146
|
+
data: { id: 'e10', source: 'n1', target: 'n9' },
|
|
147
|
+
style: { color: '#AAAAAA', width: 1 },
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
group: 'edges',
|
|
151
|
+
data: { id: 'e11', source: 'n1', target: 'n10' },
|
|
152
|
+
style: { color: '#AAAAAA', width: 1 },
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
group: 'edges',
|
|
156
|
+
data: { id: 'e8', source: 'n6', target: 'n6' },
|
|
157
|
+
style: { color: '#AAAAAA', width: 1 },
|
|
158
|
+
},
|
|
159
|
+
// {
|
|
160
|
+
// group: 'edges',
|
|
161
|
+
// data: { id: 'e6', source: 'n4', target: 'n5' },
|
|
162
|
+
// style: { color: '#AAAAAA', width: 1 }
|
|
163
|
+
// },
|
|
164
|
+
]);
|
|
165
|
+
|
|
166
|
+
chart.network.layout('dagre', { rankDir: 'LR' }, { alignHCenter: false, alignVCenter: true });
|
|
167
|
+
},
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
function bindClick(e) {
|
|
171
|
+
switch (e) {
|
|
172
|
+
case 'zoomOut':
|
|
173
|
+
chartDom.current.network.zoomOut();
|
|
174
|
+
break;
|
|
175
|
+
case 'zoomIn':
|
|
176
|
+
chartDom.current.network.zoomIn();
|
|
177
|
+
break;
|
|
178
|
+
case 'zoomReset':
|
|
179
|
+
chartDom.current.network.zoomReset();
|
|
180
|
+
break;
|
|
181
|
+
case 'remove':
|
|
182
|
+
chartDom.current.network.remove('n0');
|
|
183
|
+
break;
|
|
184
|
+
case 'highlight':
|
|
185
|
+
chartDom.current.dispatchAction({
|
|
186
|
+
type: 'highlight',
|
|
187
|
+
seriesName: ['n0', 'n1', 'e0'],
|
|
188
|
+
});
|
|
189
|
+
break;
|
|
190
|
+
case 'downplay':
|
|
191
|
+
chartDom.current.dispatchAction({
|
|
192
|
+
type: 'downplay',
|
|
193
|
+
});
|
|
194
|
+
break;
|
|
195
|
+
case 'dagreH':
|
|
196
|
+
chartDom.current.network.layout('dagre', { rankDir: 'LR' });
|
|
197
|
+
break;
|
|
198
|
+
case 'dagreV':
|
|
199
|
+
chartDom.current.network.layout('dagre', { rankDir: 'TB' });
|
|
200
|
+
break;
|
|
201
|
+
case 'FruchtermanLayout':
|
|
202
|
+
// setShowMsg(true);
|
|
203
|
+
chartDom.current.network.layout('FruchtermanLayout', null, {
|
|
204
|
+
onLayoutEnd: () => {
|
|
205
|
+
// setShowMsg(false);
|
|
206
|
+
},
|
|
207
|
+
});
|
|
208
|
+
break;
|
|
209
|
+
case 'ForceLayout':
|
|
210
|
+
chartDom.current.network.layout('ForceLayout');
|
|
211
|
+
break;
|
|
212
|
+
case 'springy':
|
|
213
|
+
chartDom.current.network.layout('springy');
|
|
214
|
+
break;
|
|
215
|
+
default:
|
|
216
|
+
break;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
// 防止无关属性变更引起图表重新初始化
|
|
221
|
+
const mapRender = useMemo(() => <BasicTopo height={850} {...options} />, []);
|
|
222
|
+
|
|
223
|
+
return (
|
|
224
|
+
<>
|
|
225
|
+
<Button title="Dagre布局-水平" onClick={() => bindClick('dagreH')}>
|
|
226
|
+
Dagre布局-水平
|
|
227
|
+
</Button>
|
|
228
|
+
<Button title="Dagre布局-竖直" onClick={() => bindClick('dagreV')}>
|
|
229
|
+
Dagre布局-竖直
|
|
230
|
+
</Button>
|
|
231
|
+
{mapRender}
|
|
232
|
+
</>
|
|
233
|
+
);
|
|
234
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
order: 0
|
|
3
|
+
title: 基础柱状图
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
基础柱状图,使用垂直的柱子显示类别之间的数值比较。其中一个轴表示需要对比的分类维度,另一个轴代表相应的数值。
|
|
7
|
+
|
|
8
|
+
````jsx
|
|
9
|
+
import { BasicHBar} from '@tencent/tcharts-component';
|
|
10
|
+
|
|
11
|
+
var yAxis= {
|
|
12
|
+
type: 'category',
|
|
13
|
+
data: ['ins-8zybiffy', 'ins-8zybiffy1', 'ins-8zybiffy2', 'ins-8zybiffy3', 'ins-8zybiffy4', 'ins-8zybiffy5', 'ins-8zybiffy-long-test'],
|
|
14
|
+
description: ['ins-8zybiffy0', 'ins-8zybiffy10', 'ins-8zybiffy22', 'ins-8zybiffy33', 'ins-8zybiffy44', 'ins-8zybiffy55', 'ins-8zybiffy-long-test66']
|
|
15
|
+
};
|
|
16
|
+
var dataSource = [
|
|
17
|
+
{
|
|
18
|
+
name: '磁盘容量',
|
|
19
|
+
type: 'HBar',
|
|
20
|
+
stack: '总量',
|
|
21
|
+
label: {
|
|
22
|
+
show: true,
|
|
23
|
+
position: 'insideRight'
|
|
24
|
+
},
|
|
25
|
+
data: [10, 23, 50, 10, 15, 30, 40],
|
|
26
|
+
maxData: [59.01, 40.04, 59.04, 59.04, 59.04, 59.04, 59.04]
|
|
27
|
+
},
|
|
28
|
+
];
|
|
29
|
+
|
|
30
|
+
var grid = {
|
|
31
|
+
left: 20,
|
|
32
|
+
right: 20,
|
|
33
|
+
bottom: 20,
|
|
34
|
+
top:20,
|
|
35
|
+
containLabel: true
|
|
36
|
+
};
|
|
37
|
+
ReactDOM.render(
|
|
38
|
+
<div>
|
|
39
|
+
<BasicHBar
|
|
40
|
+
yAxis={yAxis}
|
|
41
|
+
dataSource={dataSource}
|
|
42
|
+
grid={grid}
|
|
43
|
+
height = '500px'>
|
|
44
|
+
默认
|
|
45
|
+
</BasicHBar>
|
|
46
|
+
</div>
|
|
47
|
+
, mountNode);
|
|
48
|
+
````
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
order: 0
|
|
3
|
+
title: x轴文字旋转的柱状图
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
基础柱状图,使用垂直的柱子显示类别之间的数值比较。其中一个轴表示需要对比的分类维度,另一个轴代表相应的数值。
|
|
7
|
+
|
|
8
|
+
````jsx
|
|
9
|
+
import { BasicBar} from '@tencent/tcharts-component';
|
|
10
|
+
|
|
11
|
+
var xAxis = {
|
|
12
|
+
axisLabel: { rotate: 60 },
|
|
13
|
+
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
|
|
14
|
+
};
|
|
15
|
+
var dataSource = [
|
|
16
|
+
{
|
|
17
|
+
name: '日志数量',
|
|
18
|
+
type: 'bar',
|
|
19
|
+
barWidth: '60%',
|
|
20
|
+
data: [10, 52, 200, 334, 390, 330, 220]
|
|
21
|
+
}
|
|
22
|
+
];
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
ReactDOM.render(
|
|
26
|
+
<div>
|
|
27
|
+
<BasicBar
|
|
28
|
+
xAxis={xAxis}
|
|
29
|
+
dataSource={dataSource}
|
|
30
|
+
height = '500px'>
|
|
31
|
+
默认
|
|
32
|
+
</BasicBar>
|
|
33
|
+
</div>
|
|
34
|
+
, mountNode);
|
|
35
|
+
````
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ChartComponent, ChartProps } from '../common/chart';
|
|
2
|
+
import { ToolTipOptions, GridOptions, ChartRef, Data } from '../_type';
|
|
3
|
+
export interface TopoProps {
|
|
4
|
+
width?: number | string;
|
|
5
|
+
height: number | string;
|
|
6
|
+
tooltip?: ToolTipOptions;
|
|
7
|
+
theme?: string;
|
|
8
|
+
dataSource?: Data[];
|
|
9
|
+
grid?: GridOptions;
|
|
10
|
+
node?: any;
|
|
11
|
+
link?: any;
|
|
12
|
+
hooks?: {
|
|
13
|
+
draw?: (ctx?: any) => void;
|
|
14
|
+
setSelect?: (ctx?: any) => void;
|
|
15
|
+
locationChanged?: (pipelines?: any) => void;
|
|
16
|
+
};
|
|
17
|
+
hideScroll?: boolean;
|
|
18
|
+
chartRef?: (chart?: ChartRef) => void;
|
|
19
|
+
}
|
|
20
|
+
declare abstract class Topo<T extends ChartProps> extends ChartComponent<T> {
|
|
21
|
+
chartType: string;
|
|
22
|
+
}
|
|
23
|
+
export default class BasicTopo extends Topo<TopoProps> {
|
|
24
|
+
getOptions(props: any): {
|
|
25
|
+
legend: any;
|
|
26
|
+
tooltip: any;
|
|
27
|
+
series: any;
|
|
28
|
+
grid: any;
|
|
29
|
+
theme: any;
|
|
30
|
+
visualMap: any;
|
|
31
|
+
showSouthChinaSea: any;
|
|
32
|
+
chartRef: any;
|
|
33
|
+
link: any;
|
|
34
|
+
node: any;
|
|
35
|
+
hooks: any;
|
|
36
|
+
hideScroll: any;
|
|
37
|
+
geo: any;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { __extends, __read, __spreadArray } from "tslib";
|
|
2
|
+
import { ChartComponent } from '../common/chart';
|
|
3
|
+
import { addMapOption } from '../common/optionsHelp';
|
|
4
|
+
var Topo = (function (_super) {
|
|
5
|
+
__extends(Topo, _super);
|
|
6
|
+
function Topo() {
|
|
7
|
+
var _this = _super.apply(this, __spreadArray([], __read(arguments), false)) || this;
|
|
8
|
+
_this.chartType = 'topo';
|
|
9
|
+
return _this;
|
|
10
|
+
}
|
|
11
|
+
return Topo;
|
|
12
|
+
}(ChartComponent));
|
|
13
|
+
var BasicTopo = (function (_super) {
|
|
14
|
+
__extends(BasicTopo, _super);
|
|
15
|
+
function BasicTopo() {
|
|
16
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
17
|
+
}
|
|
18
|
+
BasicTopo.prototype.getOptions = function (props) {
|
|
19
|
+
return addMapOption(props || this.props);
|
|
20
|
+
};
|
|
21
|
+
return BasicTopo;
|
|
22
|
+
}(Topo));
|
|
23
|
+
export default BasicTopo;
|
|
24
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/basicTopo/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAc,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAsDrD;IAAkD,wBAAiB;IAAnE;;QACE,eAAS,GAAG,MAAM,CAAC;;IACrB,CAAC;IAAD,WAAC;AAAD,CAAC,AAFD,CAAkD,cAAc,GAE/D;AACD;IAAuC,6BAAe;IAAtD;;IAIA,CAAC;IAHC,8BAAU,GAAV,UAAW,KAAK;QACd,OAAO,YAAY,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC;IAC3C,CAAC;IACH,gBAAC;AAAD,CAAC,AAJD,CAAuC,IAAI,GAI1C"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
category: Charts
|
|
3
|
+
title: basicTopo
|
|
4
|
+
subtitle: 基础拓扑图
|
|
5
|
+
cols: 1
|
|
6
|
+
type: 拓扑图
|
|
7
|
+
author: minchang,卢耀和
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
基础拓扑图
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## API
|
|
15
|
+
|
|
16
|
+
按钮的属性说明如下:
|
|
17
|
+
|
|
18
|
+
属性 | 说明 | 类型 | 默认值
|
|
19
|
+
-----|-----|-----|------
|
|
20
|
+
hooks | 拓扑的扩展 | string | - |
|
|
21
|
+
height | 图表的高度 | number | - |
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
File without changes
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ChartComponent, ChartProps } from '../common/chart';
|
|
2
|
+
import { ToolTipOptions, GridOptions, ChartRef, Data } from '../_type';
|
|
3
|
+
export interface TreeMapProps {
|
|
4
|
+
width?: number | string;
|
|
5
|
+
height: number | string;
|
|
6
|
+
tooltip?: ToolTipOptions;
|
|
7
|
+
theme?: string;
|
|
8
|
+
dataSource: Data[];
|
|
9
|
+
grid?: GridOptions;
|
|
10
|
+
chartRef?: (chart?: ChartRef) => void;
|
|
11
|
+
}
|
|
12
|
+
declare abstract class TreeMap<T extends ChartProps> extends ChartComponent<T> {
|
|
13
|
+
chartType: string;
|
|
14
|
+
constructor(props: any);
|
|
15
|
+
}
|
|
16
|
+
export default class BasicTreeMap extends TreeMap<TreeMapProps> {
|
|
17
|
+
getOptions(props: any): any;
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { __assign, __extends } from "tslib";
|
|
2
|
+
import { ChartComponent } from '../common/chart';
|
|
3
|
+
import { ChartTreemapComponent, ChartCore } from 'tvision-charts';
|
|
4
|
+
var TreeMap = (function (_super) {
|
|
5
|
+
__extends(TreeMap, _super);
|
|
6
|
+
function TreeMap(props) {
|
|
7
|
+
var _this = _super.call(this, props) || this;
|
|
8
|
+
_this.chartType = 'treeMap';
|
|
9
|
+
ChartCore.use(ChartTreemapComponent);
|
|
10
|
+
return _this;
|
|
11
|
+
}
|
|
12
|
+
return TreeMap;
|
|
13
|
+
}(ChartComponent));
|
|
14
|
+
var BasicTreeMap = (function (_super) {
|
|
15
|
+
__extends(BasicTreeMap, _super);
|
|
16
|
+
function BasicTreeMap() {
|
|
17
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
18
|
+
}
|
|
19
|
+
BasicTreeMap.prototype.getOptions = function (props) {
|
|
20
|
+
return __assign({}, (props || this.props));
|
|
21
|
+
};
|
|
22
|
+
return BasicTreeMap;
|
|
23
|
+
}(TreeMap));
|
|
24
|
+
export default BasicTreeMap;
|
|
25
|
+
//# sourceMappingURL=basicTreeMap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"basicTreeMap.js","sourceRoot":"","sources":["../../../src/basicTreeMap/basicTreeMap.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAc,MAAM,iBAAiB,CAAC;AAE7D,OAAO,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAmClE;IAAqD,2BAAiB;IAEpE,iBAAY,KAAK;QACf,YAAA,MAAK,YAAC,KAAK,CAAC,SAAC;QAFf,eAAS,GAAG,SAAS,CAAC;QAGpB,SAAS,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;;IACvC,CAAC;IACH,cAAC;AAAD,CAAC,AAND,CAAqD,cAAc,GAMlE;AAED;IAA0C,gCAAqB;IAA/D;;IAIA,CAAC;IAHC,iCAAU,GAAV,UAAW,KAAK;QACd,oBAAY,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,EAAG;IACtC,CAAC;IACH,mBAAC;AAAD,CAAC,AAJD,CAA0C,OAAO,GAIhD"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ChartProps {
|
|
3
|
+
height: number | string;
|
|
4
|
+
width?: number | string;
|
|
5
|
+
theme?: string;
|
|
6
|
+
dataSource?: any[];
|
|
7
|
+
chartRef?: any;
|
|
8
|
+
geo?: any;
|
|
9
|
+
}
|
|
10
|
+
export declare abstract class ChartComponent<T extends ChartProps> extends React.Component<T, {
|
|
11
|
+
height: number;
|
|
12
|
+
}> {
|
|
13
|
+
private dom;
|
|
14
|
+
private proxyElement;
|
|
15
|
+
abstract chartType: string;
|
|
16
|
+
constructor(props: any);
|
|
17
|
+
getHeight(props: any): any;
|
|
18
|
+
componentDidMount(): void;
|
|
19
|
+
componentWillUnmount(): void;
|
|
20
|
+
componentWillReceiveProps(props: any): void;
|
|
21
|
+
render(): JSX.Element;
|
|
22
|
+
abstract getOptions(props: any): any;
|
|
23
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { __extends } from "tslib";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { compareObjWithoutFunction } from './compareObjWithoutFunction';
|
|
4
|
+
import { ChartCore } from 'tvision-charts';
|
|
5
|
+
var ChartComponent = (function (_super) {
|
|
6
|
+
__extends(ChartComponent, _super);
|
|
7
|
+
function ChartComponent(props) {
|
|
8
|
+
var _this = _super.call(this, props) || this;
|
|
9
|
+
_this.state = {
|
|
10
|
+
height: 0,
|
|
11
|
+
};
|
|
12
|
+
return _this;
|
|
13
|
+
}
|
|
14
|
+
ChartComponent.prototype.getHeight = function (props) {
|
|
15
|
+
return props.height;
|
|
16
|
+
};
|
|
17
|
+
ChartComponent.prototype.componentDidMount = function () {
|
|
18
|
+
var _this = this;
|
|
19
|
+
var height = this.getHeight(this.props);
|
|
20
|
+
this.setState({
|
|
21
|
+
height: height,
|
|
22
|
+
}, function () {
|
|
23
|
+
_this.dom = new ChartCore(_this.chartType, _this.proxyElement);
|
|
24
|
+
var theme = _this.props.theme;
|
|
25
|
+
var options = _this.getOptions(null);
|
|
26
|
+
_this.dom.setOption(options, theme);
|
|
27
|
+
if (options.chartRef) {
|
|
28
|
+
options.chartRef(_this.dom);
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
ChartComponent.prototype.componentWillUnmount = function () {
|
|
33
|
+
var _a, _b;
|
|
34
|
+
(_b = (_a = this.dom) === null || _a === void 0 ? void 0 : _a.destroy) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
35
|
+
this.dom = null;
|
|
36
|
+
};
|
|
37
|
+
ChartComponent.prototype.componentWillReceiveProps = function (props) {
|
|
38
|
+
var _a;
|
|
39
|
+
if (typeof ((_a = this.dom) === null || _a === void 0 ? void 0 : _a.setOption) !== 'function') {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
if (compareObjWithoutFunction(this.props, props)) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
var theme = props.theme;
|
|
46
|
+
this.dom.setOption(this.getOptions(props) || {}, theme);
|
|
47
|
+
};
|
|
48
|
+
ChartComponent.prototype.render = function () {
|
|
49
|
+
var _this = this;
|
|
50
|
+
var _a = this.props, width = _a.width, height = _a.height;
|
|
51
|
+
return (React.createElement("div", { style: { height: height, width: width }, ref: function (e) { return _this.proxyElement = e; } }));
|
|
52
|
+
};
|
|
53
|
+
return ChartComponent;
|
|
54
|
+
}(React.Component));
|
|
55
|
+
export { ChartComponent };
|
|
56
|
+
//# sourceMappingURL=chart.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chart.js","sourceRoot":"","sources":["../../../src/common/chart.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAW3C;IAAmE,kCAAoC;IAOrG,wBAAY,KAAK;QACf,YAAA,MAAK,YAAC,KAAK,CAAC,SAAC;QACb,KAAI,CAAC,KAAK,GAAG;YACX,MAAM,EAAE,CAAC;SACV,CAAC;;IACJ,CAAC;IAGD,kCAAS,GAAT,UAAU,KAAK;QACb,OAAO,KAAK,CAAC,MAAM,CAAC;IACtB,CAAC;IAID,0CAAiB,GAAjB;QAAA,iBAaC;QAZC,IAAM,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC1C,IAAI,CAAC,QAAQ,CAAC;YACZ,MAAM,QAAA;SACP,EAAE;YACD,KAAI,CAAC,GAAG,GAAG,IAAI,SAAS,CAAC,KAAI,CAAC,SAAS,EAAE,KAAI,CAAC,YAAY,CAAC,CAAC;YACpD,IAAA,KAAK,GAAK,KAAI,CAAC,KAAK,MAAf,CAAgB;YAC7B,IAAM,OAAO,GAAG,KAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;YACtC,KAAI,CAAC,GAAG,CAAC,SAAS,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;YACnC,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;gBACrB,OAAO,CAAC,QAAQ,CAAC,KAAI,CAAC,GAAG,CAAC,CAAC;YAC7B,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAKD,6CAAoB,GAApB;;QACE,MAAA,MAAA,IAAI,CAAC,GAAG,0CAAE,OAAO,kDAAI,CAAC;QACtB,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC;IAClB,CAAC;IAED,kDAAyB,GAAzB,UAA0B,KAAK;;QAC7B,IAAI,OAAO,CAAA,MAAA,IAAI,CAAC,GAAG,0CAAE,SAAS,CAAA,KAAK,UAAU,EAAE,CAAC;YAC9C,OAAO;QACT,CAAC;QACD,IAAI,yBAAyB,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC;YACjD,OAAO;QACT,CAAC;QACO,IAAA,KAAK,GAAK,KAAK,MAAV,CAAW;QACxB,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,KAAK,CAAC,CAAC;IAC1D,CAAC;IAKD,+BAAM,GAAN;QAAA,iBAKC;QAJO,IAAA,KAAqB,IAAI,CAAC,KAAK,EAA5B,KAAK,WAAA,EAAE,MAAM,YAAe,CAAC;QACtC,OAAO,CACL,6BAAK,KAAK,EAAE,EAAE,MAAM,QAAA,EAAE,KAAK,OAAA,EAAE,EAAE,GAAG,EAAE,UAAA,CAAC,IAAI,OAAA,KAAI,CAAC,YAAY,GAAG,CAAC,EAArB,CAAqB,GAAQ,CACvE,CAAC;IACJ,CAAC;IAGH,qBAAC;AAAD,CAAC,AAlED,CAAmE,KAAK,CAAC,SAAS,GAkEjF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function compareObjWithoutFunction(obj1: any, obj2: any): boolean;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export function compareObjWithoutFunction(obj1, obj2) {
|
|
2
|
+
if (obj1 === obj2) {
|
|
3
|
+
return true;
|
|
4
|
+
}
|
|
5
|
+
if ((obj1 == null && obj2 != null) || (obj1 != null && obj2 == null)) {
|
|
6
|
+
return false;
|
|
7
|
+
}
|
|
8
|
+
var keys = [];
|
|
9
|
+
if (obj1 != null) {
|
|
10
|
+
keys = Object.keys(obj1);
|
|
11
|
+
}
|
|
12
|
+
if (obj2 != null) {
|
|
13
|
+
var ks = Object.keys(obj2);
|
|
14
|
+
ks.forEach(function (k) {
|
|
15
|
+
if (keys.indexOf(k) < 0) {
|
|
16
|
+
keys.push(k);
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
var notEqual = false;
|
|
21
|
+
keys.find(function (key) {
|
|
22
|
+
var value1 = obj1[key];
|
|
23
|
+
var value2 = obj2[key];
|
|
24
|
+
var type1 = typeof value1;
|
|
25
|
+
var type2 = typeof value2;
|
|
26
|
+
if (type1 !== 'function' && type2 !== 'function' && value1 !== value2) {
|
|
27
|
+
notEqual = true;
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
return false;
|
|
31
|
+
});
|
|
32
|
+
return !notEqual;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=compareObjWithoutFunction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compareObjWithoutFunction.js","sourceRoot":"","sources":["../../../src/common/compareObjWithoutFunction.ts"],"names":[],"mappings":"AAOA,MAAM,UAAU,yBAAyB,CAAC,IAAI,EAAE,IAAI;IAClD,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAClB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,CAAC,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,CAAC,EAAE,CAAC;QACrE,OAAO,KAAK,CAAC;IACf,CAAC;IAED,IAAI,IAAI,GAAa,EAAE,CAAC;IACxB,IAAI,IAAI,IAAI,IAAI,EAAE,CAAC;QAEjB,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC;IACD,IAAI,IAAI,IAAI,IAAI,EAAE,CAAC;QACjB,IAAM,EAAE,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC7B,EAAE,CAAC,OAAO,CAAC,UAAC,CAAC;YACX,IAAI,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;gBAExB,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YACf,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IACD,IAAI,QAAQ,GAAG,KAAK,CAAC;IACrB,IAAI,CAAC,IAAI,CAAC,UAAC,GAAG;QACZ,IAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;QACzB,IAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;QACzB,IAAM,KAAK,GAAG,OAAO,MAAM,CAAC;QAC5B,IAAM,KAAK,GAAG,OAAO,MAAM,CAAC;QAE5B,IAAI,KAAK,KAAK,UAAU,IAAI,KAAK,KAAK,UAAU,IAAI,MAAM,KAAK,MAAM,EAAE,CAAC;YACtE,QAAQ,GAAG,IAAI,CAAC;YAChB,OAAO,IAAI,CAAC;QACd,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC,CAAC,CAAC;IACH,OAAO,CAAC,QAAQ,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React, { useEffect, useRef } from 'react';
|
|
2
|
+
import { TCharts } from '../proxy';
|
|
3
|
+
import { compareObjWithoutFunction } from './compareObjWithoutFunction';
|
|
4
|
+
export function FunctionChart(props) {
|
|
5
|
+
var chartType = props.chartType, _a = props.getOptions, getOptions = _a === void 0 ? function (e) { return e; } : _a, _b = props.theme, theme = _b === void 0 ? '' : _b, chartRef = props.chartRef;
|
|
6
|
+
var chartInstRef = useRef();
|
|
7
|
+
var oldPropsRef = useRef({});
|
|
8
|
+
var setDom = function (dom) {
|
|
9
|
+
var _a;
|
|
10
|
+
if (dom) {
|
|
11
|
+
if (!(chartInstRef.current instanceof TCharts)) {
|
|
12
|
+
chartInstRef.current = new TCharts(chartType, null);
|
|
13
|
+
chartRef(chartInstRef.current);
|
|
14
|
+
}
|
|
15
|
+
(_a = chartInstRef.current) === null || _a === void 0 ? void 0 : _a.init(chartType, dom);
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
useEffect(function () { return function () {
|
|
19
|
+
var _a, _b;
|
|
20
|
+
(_b = (_a = chartInstRef.current) === null || _a === void 0 ? void 0 : _a.destroy) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
21
|
+
chartInstRef.current = null;
|
|
22
|
+
oldPropsRef.current = null;
|
|
23
|
+
}; }, []);
|
|
24
|
+
useEffect(function () {
|
|
25
|
+
var _a, _b;
|
|
26
|
+
if (chartInstRef.current && !compareObjWithoutFunction(oldPropsRef.current, props)) {
|
|
27
|
+
var options = getOptions(props);
|
|
28
|
+
(_b = (_a = chartInstRef.current).setOption) === null || _b === void 0 ? void 0 : _b.call(_a, options, theme);
|
|
29
|
+
}
|
|
30
|
+
oldPropsRef.current = props;
|
|
31
|
+
}, [props]);
|
|
32
|
+
var width = props.width, height = props.height;
|
|
33
|
+
return (React.createElement("div", { style: { height: height, width: width }, ref: function (inst) {
|
|
34
|
+
setDom(inst);
|
|
35
|
+
} }));
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=functionChart.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"functionChart.js","sourceRoot":"","sources":["../../../src/common/functionChart.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAEnC,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAQxE,MAAM,UAAU,aAAa,CAAoC,KAAQ;IAC/D,IAAA,SAAS,GAAqD,KAAK,UAA1D,EAAE,KAAmD,KAAK,WAAhC,EAAxB,UAAU,mBAAG,UAAC,CAAI,IAAK,OAAA,CAAC,EAAD,CAAC,KAAA,EAAE,KAAyB,KAAK,MAApB,EAAV,KAAK,mBAAG,EAAE,KAAA,EAAE,QAAQ,GAAK,KAAK,SAAV,CAAW;IAC5E,IAAM,YAAY,GAAG,MAAM,EAAc,CAAC;IAC1C,IAAM,WAAW,GAAG,MAAM,CAAY,EAAe,CAAC,CAAC;IAEvD,IAAM,MAAM,GAAG,UAAC,GAAuB;;QACrC,IAAI,GAAG,EAAE,CAAC;YACR,IAAI,CAAC,CAAC,YAAY,CAAC,OAAO,YAAY,OAAO,CAAC,EAAE,CAAC;gBAC/C,YAAY,CAAC,OAAO,GAAG,IAAI,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;gBACpD,QAAQ,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;YACjC,CAAC;YACD,MAAA,YAAY,CAAC,OAAO,0CAAE,IAAI,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC;QAC7C,CAAC;IACH,CAAC,CAAC;IAEF,SAAS,CAAC,cAAM,OAAA;;QACd,MAAA,MAAA,YAAY,CAAC,OAAO,0CAAE,OAAO,kDAAI,CAAC;QAClC,YAAY,CAAC,OAAO,GAAG,IAAI,CAAC;QAC5B,WAAW,CAAC,OAAO,GAAG,IAAI,CAAC;IAC7B,CAAC,EAJe,CAIf,EAAE,EAAE,CAAC,CAAC;IAGP,SAAS,CAAC;;QACR,IAAI,YAAY,CAAC,OAAO,IAAI,CAAC,yBAAyB,CAAC,WAAW,CAAC,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC;YACnF,IAAM,OAAO,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;YAClC,MAAA,MAAA,YAAY,CAAC,OAAO,EAAC,SAAS,mDAAG,OAAO,EAAE,KAAK,CAAC,CAAC;QACnD,CAAC;QACD,WAAW,CAAC,OAAO,GAAG,KAAK,CAAC;IAC9B,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEH,IAAA,KAAK,GAAa,KAAK,MAAlB,EAAE,MAAM,GAAK,KAAK,OAAV,CAAW;IACjC,OAAO,CACH,6BAAK,KAAK,EAAE,EAAE,MAAM,QAAA,EAAE,KAAK,OAAA,EAAE,EAAE,GAAG,EAAE,UAAC,IAAI;YACvC,MAAM,CAAC,IAAI,CAAC,CAAC;QACf,CAAC,GAAQ,CACZ,CAAC;AACJ,CAAC"}
|