@easyv/charts 1.6.17 → 1.6.18
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.
|
@@ -207,7 +207,9 @@ var Chart = /*#__PURE__*/(0, _react.memo)(function (_ref) {
|
|
|
207
207
|
var data = e.currentTarget.dataset.data;
|
|
208
208
|
var _data = JSON.parse(data);
|
|
209
209
|
if (type == "setCurrent") {
|
|
210
|
-
setCurXLabel(
|
|
210
|
+
setCurXLabel(function (pre) {
|
|
211
|
+
return pre == _data.x ? "" : _data.x;
|
|
212
|
+
});
|
|
211
213
|
}
|
|
212
214
|
triggerOnRelative('click', _data);
|
|
213
215
|
onEmit("click", _data);
|
package/lib/components/Label.js
CHANGED
|
@@ -189,7 +189,7 @@ var Label = function Label(_ref4) {
|
|
|
189
189
|
}),
|
|
190
190
|
textAnchor: textAnchor,
|
|
191
191
|
dominantBaseline: dominantBaseline,
|
|
192
|
-
style: (
|
|
192
|
+
style: _objectSpread({}, font)
|
|
193
193
|
}, /*#__PURE__*/React.createElement("tspan", null, value), /*#__PURE__*/React.createElement("tspan", {
|
|
194
194
|
dx: suffixX,
|
|
195
195
|
dy: suffixY,
|
package/package.json
CHANGED
|
@@ -198,7 +198,9 @@ const Chart = memo(
|
|
|
198
198
|
const { data } = e.currentTarget.dataset;
|
|
199
199
|
const _data = JSON.parse(data);
|
|
200
200
|
if(type=="setCurrent"){
|
|
201
|
-
setCurXLabel(
|
|
201
|
+
setCurXLabel(pre=>{
|
|
202
|
+
return pre==_data.x?"":_data.x;
|
|
203
|
+
});
|
|
202
204
|
}
|
|
203
205
|
triggerOnRelative('click',_data);
|
|
204
206
|
onEmit("click", _data);
|
package/src/components/Label.js
CHANGED