@publishfx/publish-chart 2.1.15 → 2.1.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.
|
@@ -127,9 +127,10 @@ const G2BarLegend = ({ items, activeIds, onChange, pageSize: pageSizeProp, maxLa
|
|
|
127
127
|
marker,
|
|
128
128
|
/*#__PURE__*/ jsx(Tooltip, {
|
|
129
129
|
content: item.label,
|
|
130
|
-
disabled:
|
|
130
|
+
disabled: false,
|
|
131
131
|
children: /*#__PURE__*/ jsx("span", {
|
|
132
132
|
style: {
|
|
133
|
+
maxWidth: 300,
|
|
133
134
|
overflow: "hidden",
|
|
134
135
|
textOverflow: "ellipsis",
|
|
135
136
|
whiteSpace: "nowrap"
|
|
@@ -143,7 +143,7 @@ const G2CombineChart = ({ height = 300, data, x = "", y = "", z = "", indicatorM
|
|
|
143
143
|
const lineGroupTypeArr = sortedGroupTypes.filter((v)=>"true" === v.split("_")[1]);
|
|
144
144
|
const items = sortedGroupTypes.map((id, index)=>{
|
|
145
145
|
const colorIndex = index;
|
|
146
|
-
const indicatorId = id.split("_")[0];
|
|
146
|
+
const indicatorId = isGroupRef.current ? id : id.split("_")[0];
|
|
147
147
|
const isCombine = "true" === id.split("_")[1];
|
|
148
148
|
const lineGroupTypeIndex = lineGroupTypeArr.indexOf(id);
|
|
149
149
|
const color = isGroupRef.current ? isCombine ? lineColors[lineGroupTypeIndex] || lineColors[0] : themeColors[colorIndex] || themeColors[0] : 0 === colorIndex ? themeColors[colorIndex] : lineColors[colorIndex - 1];
|
|
@@ -192,7 +192,7 @@ const G2CombineChart = ({ height = 300, data, x = "", y = "", z = "", indicatorM
|
|
|
192
192
|
groupResult = groupResult.concat(groupData);
|
|
193
193
|
});
|
|
194
194
|
groupResult.forEach((item)=>{
|
|
195
|
-
item.total = result.filter((d)=>d.groupName === item.groupName).reduce((acc, d)=>acc + ("" === d.groupValue ? 0 : d.groupValue), 0);
|
|
195
|
+
item.total = result.filter((d)=>d.groupName === item.groupName).reduce((acc, d)=>acc + ("" === d.groupValue || "-" === d.groupValue ? 0 : d.groupValue), 0);
|
|
196
196
|
});
|
|
197
197
|
return groupResult;
|
|
198
198
|
}
|
|
@@ -81,7 +81,7 @@ function applyAxisX(mark, options = {}) {
|
|
|
81
81
|
},
|
|
82
82
|
labelAlign: 'horizontal',
|
|
83
83
|
labelDx: (_datum, _index, _data)=>0,
|
|
84
|
-
labelRender: (datum)=>{
|
|
84
|
+
labelRender: isHorizontal ? void 0 : (datum)=>{
|
|
85
85
|
let left = '0%';
|
|
86
86
|
if (datum.value > 0.9) left = '-13%';
|
|
87
87
|
else if (datum.value < 0.1) left = '10%';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@publishfx/publish-chart",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.17",
|
|
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": [
|