@publishfx/publish-chart 2.1.11 → 2.1.12
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.
|
@@ -177,7 +177,7 @@ const G2CombineChart = ({ height = 300, data, x = "", y = "", z = "", indicatorM
|
|
|
177
177
|
if (!activeIds.length) return leftData;
|
|
178
178
|
const result = leftData.filter((d)=>d.groupType ? activeIds.includes(String(d.groupType.replace("_compare", "") + "_" + d.isCombine)) : true);
|
|
179
179
|
if (isGroupRef.current) result.forEach((item)=>{
|
|
180
|
-
item.total = result.filter((d)=>d.groupName === item.groupName).reduce((acc, d)=>acc + d.groupValue
|
|
180
|
+
item.total = result.filter((d)=>d.groupName === item.groupName).reduce((acc, d)=>acc + ('' === d.groupValue ? 0 : d.groupValue), 0);
|
|
181
181
|
});
|
|
182
182
|
return result;
|
|
183
183
|
}, [
|
|
@@ -38,10 +38,11 @@ function renderG2CombineChart(container, options) {
|
|
|
38
38
|
console.log('renderG2CombineChart interval data:', intervalData);
|
|
39
39
|
const intervalMaxY = intervalData.reduce((max, item)=>{
|
|
40
40
|
const key = isGroup ? "total" : BAR_Y_FIELD;
|
|
41
|
-
console.log('
|
|
41
|
+
console.log('intervalMaxY item:', key, item[key], intervalData);
|
|
42
42
|
if ('-' === item[key] || void 0 === item[key] || null === item[key] || '' === item[key]) return max;
|
|
43
43
|
return Math.max(max, item[key]);
|
|
44
44
|
}, 0);
|
|
45
|
+
console.log('intervalMaxY:', intervalMaxY);
|
|
45
46
|
console.log('tdv:', intervalMaxY);
|
|
46
47
|
const auxLeftValues = auxiliaryLineData?.length ? auxiliaryLineData.filter((item)=>'left' === item.axis).map((item)=>item.value) : [];
|
|
47
48
|
const maxAuxLeft = auxLeftValues.length ? Math.max(...auxLeftValues) : 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@publishfx/publish-chart",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.12",
|
|
4
4
|
"description": "A React chart component library for the Publish platform, including BarChart, LineChart, BarLineChart and other visualization components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|