@easyv/charts 1.4.16 → 1.4.17
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/lib/components/AnimateData.js +16 -8
- package/lib/components/Axis.js +128 -82
- package/lib/components/Background.js +24 -16
- package/lib/components/Band.js +89 -62
- package/lib/components/BaseLine.js +41 -29
- package/lib/components/Brush.js +46 -29
- package/lib/components/Carousel.js +40 -13
- package/lib/components/CartesianChart.js +98 -78
- package/lib/components/Chart.js +36 -23
- package/lib/components/ChartContainer.js +27 -18
- package/lib/components/ConicalGradient.js +68 -35
- package/lib/components/ExtentData.js +17 -9
- package/lib/components/FilterData.js +27 -16
- package/lib/components/Indicator.js +8 -6
- package/lib/components/Label.js +112 -82
- package/lib/components/Legend.js +66 -41
- package/lib/components/Lighter.js +48 -19
- package/lib/components/Line.js +59 -39
- package/lib/components/LinearGradient.js +20 -14
- package/lib/components/Mapping.js +34 -9
- package/lib/components/Marquee.js +30 -14
- package/lib/components/PieChart.js +400 -306
- package/lib/components/StackData.js +18 -8
- package/lib/components/StereoBar.js +105 -65
- package/lib/components/TextOverflow.js +25 -9
- package/lib/components/Tooltip.js +55 -41
- package/lib/components/index.js +27 -0
- package/lib/context/index.js +2 -0
- package/lib/element/ConicGradient.js +35 -29
- package/lib/element/Line.js +13 -9
- package/lib/element/index.js +2 -0
- package/lib/formatter/index.js +2 -0
- package/lib/formatter/legend.js +41 -30
- package/lib/hooks/index.js +8 -0
- package/lib/hooks/useAnimateData.js +16 -3
- package/lib/hooks/useAxes.js +115 -65
- package/lib/hooks/useCarouselAxisX.js +56 -26
- package/lib/hooks/useExtentData.js +46 -14
- package/lib/hooks/useFilterData.js +29 -8
- package/lib/hooks/useStackData.js +30 -7
- package/lib/hooks/useTooltip.js +43 -26
- package/lib/index.js +15 -0
- package/lib/utils/index.js +247 -95
- package/package.json +1 -1
- package/src/components/CartesianChart.js +6 -6
- package/src/components/TextOverflow.tsx +4 -1
package/package.json
CHANGED
|
@@ -151,12 +151,6 @@ const Chart = memo(
|
|
|
151
151
|
</svg>
|
|
152
152
|
</foreignObject>
|
|
153
153
|
)}
|
|
154
|
-
{[...axes.values()].reverse().map((item, index) => {
|
|
155
|
-
const config = item.axisType == 'x' ? axisX : item;
|
|
156
|
-
return (
|
|
157
|
-
<Axis triggerClick={onInteraction} xLineRange={xLineRange} yLineRange={yLineRange} {...config} key={index} />
|
|
158
|
-
);
|
|
159
|
-
})}
|
|
160
154
|
{showTooltip && <Indicator {...indicator} {...indicatorAttr} />}
|
|
161
155
|
<foreignObject style={isVertical?{
|
|
162
156
|
width:xLineRange+marginRight+marginLeft,
|
|
@@ -203,6 +197,12 @@ const Chart = memo(
|
|
|
203
197
|
})}
|
|
204
198
|
</svg>
|
|
205
199
|
</foreignObject>
|
|
200
|
+
{[...axes.values()].reverse().map((item, index) => {
|
|
201
|
+
const config = item.axisType == 'x' ? axisX : item;
|
|
202
|
+
return (
|
|
203
|
+
<Axis triggerClick={onInteraction} xLineRange={xLineRange} yLineRange={yLineRange} {...config} key={index} />
|
|
204
|
+
);
|
|
205
|
+
})}
|
|
206
206
|
{baseLineData &&
|
|
207
207
|
baseLineData.length > 0 &&
|
|
208
208
|
baseLineData.map((item, index) => {
|
|
@@ -47,6 +47,9 @@ export default memo(forwardRef((props:flowText, ref:any) => {
|
|
|
47
47
|
...getTextOverflow(type),
|
|
48
48
|
...style
|
|
49
49
|
}
|
|
50
|
+
const textDom = document.createElement("div");
|
|
51
|
+
textDom.innerHTML = value;
|
|
52
|
+
const text = textDom.innerText;
|
|
50
53
|
return type == 'marquee' ? (
|
|
51
54
|
<Marquee
|
|
52
55
|
value={value}
|
|
@@ -54,6 +57,6 @@ export default memo(forwardRef((props:flowText, ref:any) => {
|
|
|
54
57
|
style={styles}
|
|
55
58
|
ref={ref} />
|
|
56
59
|
) : (
|
|
57
|
-
<div style={styles} ref={ref} title={type=="ellipsis"?
|
|
60
|
+
<div style={styles} ref={ref} title={type=="ellipsis"?text || undefined:undefined} dangerouslySetInnerHTML={{__html:value}}></div>
|
|
58
61
|
);
|
|
59
62
|
}));
|