const Base_xAxis = { // tickInterval: 24 * 3600 * 1000, // zIndex: 1, lineWidth: 1, lineColor: '#EDF0F1', tickWidth: 0, // crosshair: false, endOnTick: true, labels: { // rotation: -45, // x: 35, style: { color: '#666', fontSize: '12px', fontWeight: 400, }, formatter: function () { let value = this.value; if (typeof value !== 'string') return value; if ((value || '').indexOf('~') > -1) { value = value.split('~')[1]; } value = value.replace(/-/g, '/').replace(/^20/g, ''); return value; }, useHTML: true, // step: 2, }, tickPositioner: function () { let categories = this.categories || []; let tickPosition = categories.map((val, i) => i); if (categories.length > 12) { const arr = []; const split = Math.ceil(categories.length / 8); categories.forEach((val, i) => { if (i % split === 0) arr.push(i); }); arr[arr.length - 1] = (categories || []).length - 1; tickPosition = arr; } return tickPosition; }, title: { style: { color: '#666', fontSize: '12px', fontWeight: 400, }, align: 'high', y: -18, x: 30, }, }; export { Base_xAxis }