Skip to content

Commit

Permalink
Merge pull request #522 from provenance-io/nullpointer0x00/fix-volume…
Browse files Browse the repository at this point in the history
…-to-fixed-issue

Remove toFixed on volume
  • Loading branch information
nullpointer0x00 committed Jun 17, 2024
2 parents d2f8d25 + 6f5c13c commit af1f18a
Showing 1 changed file with 16 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,22 @@ const PriceChart = ({ startDate, endDate, data }: PriceChartProps) => {
// Build dynamic chart data
const buildChartData = useCallback(
(data, startDate, endDate) => {
const seriesData = data.map((item: HistoricalPricing) => [
format(parseISO(item.time_close), 'yyyy-MM-dd'),
parseFloat(item.quote.USD.close.toFixed(3)),
parseFloat(item.quote.USD.high.toFixed(3)),
parseFloat(item.quote.USD.low.toFixed(3)),
parseFloat(item.quote.USD.volume.toFixed(3)),
]);
const seriesData = data.map((item: HistoricalPricing) => {
const timeClose = format(parseISO(item.time_close), 'yyyy-MM-dd');
const close = parseFloat(item.quote.USD.close.toFixed(3));
const high = parseFloat(item.quote.USD.high.toFixed(3));
const low = parseFloat(item.quote.USD.low.toFixed(3));


return [
timeClose,
close,
high,
low,
item.quote.USD.volume,
];
});

// Build dynamic chart items
chartData.grid = { bottom: isLg ? 90 : 75 };
chartData.tooltip.axisPointer = { lineStyle: { color: theme.CHART_LINE_MAIN, width: '1' } };
Expand Down

0 comments on commit af1f18a

Please sign in to comment.