@easyv/charts 1.8.0 → 1.8.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.
@@ -162,7 +162,7 @@ var _default = exports["default"] = /*#__PURE__*/(0, _react.memo)(function (_ref
162
162
  style: {
163
163
  display: 'grid',
164
164
  gridGap: gridRowGap + 'px ' + gridColumnGap + 'px',
165
- gridTemplateColumns: "".concat(nameMaxWidth, "px ").concat(valueMaxWidth, "px ").concat(percentMaxWidth, "px")
165
+ gridTemplateColumns: formatter ? "".concat(nameMaxWidth, "px ").concat(valueMaxWidth, "px ").concat(percentMaxWidth, "px") : 'repeat(' + Math.min(gridTemplateColumns, length) + ', 1fr)' //饼图或者柱状图配合不同的图例显示格式
166
166
  }
167
167
  }, _series.map(function (series, index) {
168
168
  var _series$config;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easyv/charts",
3
- "version": "1.8.0",
3
+ "version": "1.8.1",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -140,7 +140,8 @@ export default memo(
140
140
  style={{
141
141
  display: 'grid',
142
142
  gridGap: gridRowGap + 'px ' + gridColumnGap + 'px',
143
- gridTemplateColumns: `${nameMaxWidth}px ${valueMaxWidth}px ${percentMaxWidth}px`,
143
+ gridTemplateColumns:formatter?`${nameMaxWidth}px ${valueMaxWidth}px ${percentMaxWidth}px`:
144
+ 'repeat(' + Math.min(gridTemplateColumns, length) + ', 1fr)',//饼图或者柱状图配合不同的图例显示格式
144
145
  }}
145
146
  >
146
147
  {_series.map((series, index) => {