ui fix
This commit is contained in:
parent
fbe4502a92
commit
553cad483a
@ -65,13 +65,17 @@
|
|||||||
item?.close,
|
item?.close,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const padding = 0.015;
|
// Find the lowest & highest close values
|
||||||
const minValue = Math.min(...priceList);
|
let minValue = Math?.min(...rawData?.map((item) => item?.close));
|
||||||
const maxValue = Math.max(...priceList);
|
let maxValue = Math?.max(...rawData?.map((item) => item?.close));
|
||||||
const yMin = minValue * (1 - padding);
|
|
||||||
const yMax = maxValue * (1 + padding);
|
if (minValue - 0 < 1) {
|
||||||
console.log(yMin, yMax);
|
minValue = data?.getStockQuote?.dayLow;
|
||||||
console.log(priceData);
|
}
|
||||||
|
|
||||||
|
let padding = 0.015;
|
||||||
|
let yMin = minValue * (1 - padding);
|
||||||
|
let yMax = maxValue * (1 + padding);
|
||||||
|
|
||||||
const baseDate =
|
const baseDate =
|
||||||
rawData && rawData?.length ? new Date(rawData?.at(0)?.time) : new Date();
|
rawData && rawData?.length ? new Date(rawData?.at(0)?.time) : new Date();
|
||||||
@ -534,10 +538,13 @@
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
oneDayPrice = [...data?.getOneDayPrice] ?? [];
|
oneDayPrice = [...data?.getOneDayPrice] ?? [];
|
||||||
config = plotData(oneDayPrice) || null;
|
|
||||||
|
|
||||||
output = [...oneDayPrice];
|
output = [...oneDayPrice];
|
||||||
|
|
||||||
|
if (oneDayPrice?.length > 0) {
|
||||||
|
config = plotData(oneDayPrice) || null;
|
||||||
|
}
|
||||||
|
|
||||||
displayData =
|
displayData =
|
||||||
oneDayPrice?.length === 0 && sixMonthPrice?.length !== 0 ? "6M" : "1D";
|
oneDayPrice?.length === 0 && sixMonthPrice?.length !== 0 ? "6M" : "1D";
|
||||||
if (displayData === "1D") {
|
if (displayData === "1D") {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user