@lobehub/charts 5.2.0 → 5.2.1

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.
@@ -253,40 +253,9 @@ var ComposedChart = /*#__PURE__*/forwardRef(function (props, ref) {
253
253
  },
254
254
  children: yAxisRight.label
255
255
  })
256
- }), /*#__PURE__*/_jsx(Tooltip, {
257
- content: showTooltip ? function (_ref) {
258
- var active = _ref.active,
259
- payload = _ref.payload,
260
- label = _ref.label;
261
- return /*#__PURE__*/_jsx(ChartTooltip, {
262
- active: active,
263
- categoryColors: categoryColors,
264
- customCategories: customCategories,
265
- label: label,
266
- payload: payload,
267
- valueFormatter: function valueFormatter(value, name) {
268
- var _ref2, _currentSeries$valueF;
269
- var currentSeries = series.find(function (item) {
270
- return item.key === name;
271
- });
272
- var formatter = (_ref2 = (_currentSeries$valueF = currentSeries === null || currentSeries === void 0 ? void 0 : currentSeries.valueFormatter) !== null && _currentSeries$valueF !== void 0 ? _currentSeries$valueF : (currentSeries === null || currentSeries === void 0 ? void 0 : currentSeries.axis) === 'right' ? yAxisRight === null || yAxisRight === void 0 ? void 0 : yAxisRight.valueFormatter : yAxisLeft === null || yAxisLeft === void 0 ? void 0 : yAxisLeft.valueFormatter) !== null && _ref2 !== void 0 ? _ref2 : defaultValueFormatter;
273
- return formatter(value);
274
- }
275
- });
276
- } : undefined,
277
- cursor: {
278
- fill: cssVar.colorFillTertiary
279
- },
280
- isAnimationActive: false,
281
- position: {
282
- y: 0
283
- },
284
- wrapperStyle: {
285
- outline: 'none'
286
- }
287
256
  }), showLegend && /*#__PURE__*/_jsx(Legend, {
288
- content: function content(_ref3) {
289
- var payload = _ref3.payload;
257
+ content: function content(_ref) {
258
+ var payload = _ref.payload;
290
259
  return ChartLegend({
291
260
  payload: payload
292
261
  }, categoryColors, setLegendHeight, undefined, undefined, enableLegendSlider, customCategories);
@@ -323,6 +292,38 @@ var ComposedChart = /*#__PURE__*/forwardRef(function (props, ref) {
323
292
  }, s.key);
324
293
  }
325
294
  return null;
295
+ }), showTooltip && /*#__PURE__*/_jsx(Tooltip, {
296
+ content: function content(_ref2) {
297
+ var active = _ref2.active,
298
+ payload = _ref2.payload,
299
+ label = _ref2.label;
300
+ return /*#__PURE__*/_jsx(ChartTooltip, {
301
+ active: active,
302
+ categoryColors: categoryColors,
303
+ customCategories: customCategories,
304
+ label: label,
305
+ payload: payload,
306
+ valueFormatter: function valueFormatter(value, name) {
307
+ var _ref3, _currentSeries$valueF;
308
+ var currentSeries = series.find(function (item) {
309
+ return item.key === name;
310
+ });
311
+ var formatter = (_ref3 = (_currentSeries$valueF = currentSeries === null || currentSeries === void 0 ? void 0 : currentSeries.valueFormatter) !== null && _currentSeries$valueF !== void 0 ? _currentSeries$valueF : (currentSeries === null || currentSeries === void 0 ? void 0 : currentSeries.axis) === 'right' ? yAxisRight === null || yAxisRight === void 0 ? void 0 : yAxisRight.valueFormatter : yAxisLeft === null || yAxisLeft === void 0 ? void 0 : yAxisLeft.valueFormatter) !== null && _ref3 !== void 0 ? _ref3 : defaultValueFormatter;
312
+ return formatter(value);
313
+ }
314
+ });
315
+ },
316
+ cursor: {
317
+ stroke: cssVar.colorTextSecondary,
318
+ strokeWidth: 1
319
+ },
320
+ isAnimationActive: false,
321
+ position: {
322
+ y: 0
323
+ },
324
+ wrapperStyle: {
325
+ outline: 'none'
326
+ }
326
327
  })]
327
328
  }) : /*#__PURE__*/_jsx(NoData, {
328
329
  noDataText: noDataText
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/charts",
3
- "version": "5.2.0",
3
+ "version": "5.2.1",
4
4
  "description": "React modern charts components built on recharts",
5
5
  "keywords": [
6
6
  "lobehub",