@easyv/charts 1.3.37 → 1.3.39
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.
- package/lib/hooks/useAxes.js +2 -1
- package/package.json +1 -1
- package/src/hooks/useAxes.js +1 -2
package/lib/hooks/useAxes.js
CHANGED
|
@@ -116,7 +116,8 @@ var _default = function _default(_ref) {
|
|
|
116
116
|
|
|
117
117
|
var scaler = scales[type]().domain(newDomain).range(range);
|
|
118
118
|
scaler.type = type;
|
|
119
|
-
if (type !== 'ordinal') scaler.nice().clamp(true)
|
|
119
|
+
if (type !== 'ordinal') scaler.clamp(true); //scaler.nice().clamp(true)
|
|
120
|
+
|
|
120
121
|
var allTicks = ticks ? ticks : scaler.ticks ? scaler.ticks(tickCount) : scaler.domain();
|
|
121
122
|
var _ticks = allTicks;
|
|
122
123
|
|
package/package.json
CHANGED
package/src/hooks/useAxes.js
CHANGED
|
@@ -20,7 +20,6 @@ const getNewDomain=(domain, mode, step)=>{
|
|
|
20
20
|
let newDomain=[];
|
|
21
21
|
let min = domain[0], max = domain[1];
|
|
22
22
|
let minCount = Math.pow(10,getCount(min)), maxCount = Math.pow(10,getCount(max));
|
|
23
|
-
|
|
24
23
|
switch(mode){
|
|
25
24
|
case 'count':
|
|
26
25
|
newDomain[0] = Math.floor(domain[0]/minCount)*minCount;
|
|
@@ -102,7 +101,7 @@ export default ({ axes, context: { width, height } }) => {
|
|
|
102
101
|
|
|
103
102
|
const scaler = scales[type]().domain(newDomain).range(range);
|
|
104
103
|
scaler.type = type;
|
|
105
|
-
if (type !== 'ordinal') scaler.nice().clamp(true)
|
|
104
|
+
if (type !== 'ordinal') scaler.clamp(true); //scaler.nice().clamp(true)
|
|
106
105
|
const allTicks = ticks
|
|
107
106
|
? ticks
|
|
108
107
|
: scaler.ticks
|