@easyv/charts 1.4.6 → 1.4.8

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.
@@ -107,8 +107,11 @@ var _default = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardRef
107
107
  ref: i == 0 ? target : null,
108
108
  style: {
109
109
  display: i == 1 && !overflow ? "none" : "inline"
110
+ },
111
+ dangerouslySetInnerHTML: {
112
+ __html: item + (overflow ? "<span>&nbsp;</span>" : "")
110
113
  }
111
- }, item, overflow && /*#__PURE__*/_react["default"].createElement("span", null, "\xA0"));
114
+ });
112
115
  }));
113
116
  }));
114
117
 
@@ -66,8 +66,11 @@ var _default = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardRef
66
66
  }) : /*#__PURE__*/_react["default"].createElement("div", {
67
67
  style: styles,
68
68
  ref: ref,
69
- title: value || undefined
70
- }, " ", value);
69
+ title: value || undefined,
70
+ dangerouslySetInnerHTML: {
71
+ __html: value
72
+ }
73
+ });
71
74
  }));
72
75
 
73
76
  exports["default"] = _default;
@@ -110,7 +110,7 @@ var _default = function _default(_ref) {
110
110
  var range = direction === 'horizontal' ? [start, end] : direction === 'vertical' ? [end, start] : [0, 0];
111
111
  var newDomain = domain;
112
112
 
113
- if (type !== 'ordinal' && !isNaN(domain[1])) {
113
+ if (type !== 'ordinal' && !isNaN(domain[1]) && !auto) {
114
114
  newDomain = getNewDomain(domain, mode, step);
115
115
  }
116
116
 
@@ -119,7 +119,7 @@ var _default = function _default(_ref) {
119
119
  if (type !== 'ordinal') scaler.clamp(true); //scaler.nice().clamp(true)
120
120
 
121
121
  var allTicks = ticks ? ticks : scaler.ticks ? scaler.ticks(tickCount) : scaler.domain();
122
- var _ticks = allTicks;
122
+ var _ticks = allTicks; //
123
123
 
124
124
  if (type === 'ordinal') {
125
125
  if (carousel === false) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easyv/charts",
3
- "version": "1.4.6",
3
+ "version": "1.4.8",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -89,9 +89,10 @@ export default memo(forwardRef((props:marquee, ref:any) => {
89
89
  key={i}
90
90
  ref={i == 0 ? target : null}
91
91
  style={{ display: i == 1 && !overflow ? "none" : "inline" }}
92
+ dangerouslySetInnerHTML={{
93
+ __html:item+(overflow?`<span>&nbsp;</span>`:"")
94
+ }}
92
95
  >
93
- {item}
94
- {overflow && <span>&nbsp;</span>}
95
96
  </span>
96
97
  );
97
98
  })}
@@ -55,6 +55,6 @@ export default memo(forwardRef((props:flowText, ref:any) => {
55
55
  style={styles}
56
56
  ref={ref} />
57
57
  ) : (
58
- <div style={styles} ref={ref} title={value || undefined}> {value}</div>
58
+ <div style={styles} ref={ref} title={value || undefined} dangerouslySetInnerHTML={{__html:value}}></div>
59
59
  );
60
60
  }));
@@ -95,11 +95,12 @@ export default ({ axes, context: { width, height } }) => {
95
95
  ? [end, start]
96
96
  : [0, 0];
97
97
  let newDomain = domain;
98
- if(type !== 'ordinal' && !isNaN(domain[1])){
98
+ if(type !== 'ordinal' && !isNaN(domain[1]) && !auto){
99
99
  newDomain = getNewDomain(domain, mode, step);
100
100
  }
101
101
 
102
102
  const scaler = scales[type]().domain(newDomain).range(range);
103
+
103
104
  scaler.type = type;
104
105
  if (type !== 'ordinal') scaler.clamp(true); //scaler.nice().clamp(true)
105
106
  const allTicks = ticks
@@ -108,6 +109,7 @@ export default ({ axes, context: { width, height } }) => {
108
109
  ? scaler.ticks(tickCount)
109
110
  : scaler.domain();
110
111
  let _ticks = allTicks;
112
+ //
111
113
  if (type === 'ordinal') {
112
114
  if (carousel === false) {
113
115
  _ticks = getTicksOfAxis(_ticks, +tickCount, showLast);