Compare commits

..

No commits in common. "afe010ae1d121c6c93bccd79f28dad64ee4118b9" and "1abd94cdcedf6eab1b64a48ea3ba3a69f4ada35c" have entirely different histories.

2 changed files with 10 additions and 21 deletions

View File

@ -87,13 +87,6 @@ const initEcharts = (data) => {
animation: false,
progressive: 500,
progressiveThreshold: 3000,
// title: {
// text: 'FiEE, Inc. Stock Price History',
// },
grid: {
left: '8%', // '2%'
right: '12%', // yylabel
},
tooltip: {
trigger: 'axis',
axisPointer: {
@ -338,15 +331,15 @@ function findClosestDateIndexDescLeft(data, targetDateStr) {
let left = 0,
right = data.length - 1
const target = new Date(targetDateStr).getTime()
let res = -1
let res = -1 // -1
while (left <= right) {
const mid = Math.floor((left + right) / 2)
const midTime = new Date(data[mid].date).getTime()
if (midTime > target) {
left = mid + 1 // mid
if (midTime < target) {
right = mid - 1 //
} else {
res = mid // mid <= target
right = mid - 1
res = mid //
left = mid + 1 //
}
}
return res

View File

@ -84,10 +84,6 @@ const initEcharts = (data) => {
// title: {
// text: 'FiEE, Inc. Stock Price History',
// },
grid: {
left: '8%', // '2%'
right: '15%', // yylabel
},
tooltip: {
trigger: 'axis',
axisPointer: {
@ -331,15 +327,15 @@ function findClosestDateIndexDescLeft(data, targetDateStr) {
let left = 0,
right = data.length - 1
const target = new Date(targetDateStr).getTime()
let res = -1
let res = -1 // -1
while (left <= right) {
const mid = Math.floor((left + right) / 2)
const midTime = new Date(data[mid].date).getTime()
if (midTime > target) {
left = mid + 1 // mid
if (midTime < target) {
right = mid - 1 //
} else {
res = mid // mid <= target
right = mid - 1
res = mid //
left = mid + 1 //
}
}
return res