@easyv/charts 1.8.26 → 1.8.28

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.
@@ -97,7 +97,7 @@ var Area = function Area(_ref) {
97
97
  var _default = exports["default"] = /*#__PURE__*/(0, _react.memo)(function (_ref5) {
98
98
  var type = _ref5.type,
99
99
  _ref5$config = _ref5.config,
100
- opacity = _ref5$config.areaColor.linear.opacity,
100
+ areaColor = _ref5$config.areaColor,
101
101
  _ref5$config$line = _ref5$config.line,
102
102
  lineType = _ref5$config$line.type,
103
103
  lineWidth = _ref5$config$line.lineWidth,
@@ -174,7 +174,7 @@ var _default = exports["default"] = /*#__PURE__*/(0, _react.memo)(function (_ref
174
174
  }),
175
175
  xScaler: xScaler,
176
176
  yScaler: yScaler,
177
- opacity: opacity
177
+ opacity: areaColor ? areaColor.linear.opacity : 1
178
178
  }), showLighter && /*#__PURE__*/_react["default"].createElement(_.Lighter, {
179
179
  path: path,
180
180
  config: lighter
@@ -94,7 +94,7 @@ var _default = exports["default"] = function _default(_ref) {
94
94
  type = _xAxis$config$label.format.type;
95
95
  if (type == "date" && autoSort) {
96
96
  x.sort(function (a, b) {
97
- return a > b ? 1 : -1;
97
+ return new Date(a).getTime() - new Date(b).getTime();
98
98
  });
99
99
  // const groupBySeries = group(data, (d) => d.s);
100
100
  // data=[...groupBySeries].flatMap(d=>{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easyv/charts",
3
- "version": "1.8.26",
3
+ "version": "1.8.28",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -70,9 +70,7 @@ export default memo(
70
70
  ({
71
71
  type,
72
72
  config: {
73
- areaColor:{linear:{
74
- opacity
75
- }},
73
+ areaColor,
76
74
  line: {
77
75
  type: lineType,
78
76
  lineWidth,
@@ -148,7 +146,7 @@ export default memo(
148
146
  config={{ ...area, curve, tension }}
149
147
  xScaler={xScaler}
150
148
  yScaler={yScaler}
151
- opacity={opacity}
149
+ opacity={areaColor?areaColor.linear.opacity:1}
152
150
  />
153
151
  )}
154
152
  {showLighter && <Lighter path={path} config={lighter} />}
@@ -86,7 +86,7 @@ export default ({ axes, series, data }) => {
86
86
  },
87
87
  } = xAxis;
88
88
  if (type == "date" && autoSort) {
89
- x.sort((a, b) => (a > b ? 1 : -1));
89
+ x.sort((a, b) => new Date(a).getTime() - new Date(b).getTime());
90
90
  // const groupBySeries = group(data, (d) => d.s);
91
91
  // data=[...groupBySeries].flatMap(d=>{
92
92
  // return d[1].sort((a,b)=>a.x>b.x?1:-1)