ui fix
This commit is contained in:
parent
62e827f2df
commit
9fdae33344
@ -71,10 +71,12 @@ const getAnalystEstimate = async (ticker) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
analystEstimateList = await response?.json();
|
analystEstimateList = await response?.json();
|
||||||
|
analystEstimateList = analystEstimateList?.filter(item => !item.date.toString().startsWith("19"));
|
||||||
|
|
||||||
// Cache the data for this specific tickerID with a specific name 'getAnalystEstimate'
|
// Cache the data for this specific tickerID with a specific name 'getAnalystEstimate'
|
||||||
setCache(ticker, analystEstimateList, 'getAnalystEstimate');
|
setCache(ticker, analystEstimateList, 'getAnalystEstimate');
|
||||||
}
|
}
|
||||||
|
|
||||||
if(analystEstimateList?.length !== 0) {
|
if(analystEstimateList?.length !== 0) {
|
||||||
$analystEstimateComponent = true;
|
$analystEstimateComponent = true;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -10,10 +10,10 @@
|
|||||||
|
|
||||||
import { Chart } from 'svelte-echarts'
|
import { Chart } from 'svelte-echarts'
|
||||||
import { init, use } from 'echarts/core'
|
import { init, use } from 'echarts/core'
|
||||||
import { BarChart } from 'echarts/charts'
|
import { BarChart, PieChart } from 'echarts/charts'
|
||||||
import { GridComponent, TooltipComponent } from 'echarts/components'
|
import { GridComponent, TooltipComponent } from 'echarts/components'
|
||||||
import { CanvasRenderer } from 'echarts/renderers'
|
import { CanvasRenderer } from 'echarts/renderers'
|
||||||
use([BarChart, GridComponent, TooltipComponent, CanvasRenderer])
|
use([BarChart, PieChart, GridComponent, TooltipComponent, CanvasRenderer])
|
||||||
|
|
||||||
|
|
||||||
import { onMount } from 'svelte';
|
import { onMount } from 'svelte';
|
||||||
@ -23,13 +23,13 @@ use([BarChart, GridComponent, TooltipComponent, CanvasRenderer])
|
|||||||
|
|
||||||
|
|
||||||
let isLoaded = false;
|
let isLoaded = false;
|
||||||
|
let optionsPie;
|
||||||
let rawData = data?.getHedgeFundsData;
|
let rawData = data?.getHedgeFundsData;
|
||||||
let rawList = []
|
let rawList = []
|
||||||
let displayList = [];
|
let displayList = [];
|
||||||
let optionsData = {};
|
let optionsData = {};
|
||||||
let currentPage=1;
|
let currentPage=1;
|
||||||
const itemsPerPage = 50;
|
const itemsPerPage = 50;
|
||||||
let images = {};
|
|
||||||
|
|
||||||
|
|
||||||
let numOfAssets;
|
let numOfAssets;
|
||||||
@ -328,8 +328,39 @@ async function handleMode(i) {
|
|||||||
return option;
|
return option;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function getPieChart() {
|
||||||
|
const options = {
|
||||||
|
animation: false,
|
||||||
|
silent: true,
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
name: 'Access From',
|
||||||
|
type: 'pie',
|
||||||
|
radius: ['70%', '90%'],
|
||||||
|
avoidLabelOverlap: false,
|
||||||
|
label: {
|
||||||
|
show: false,
|
||||||
|
position: 'center'
|
||||||
|
},
|
||||||
|
labelLine: {
|
||||||
|
show: false
|
||||||
|
},
|
||||||
|
data: [
|
||||||
|
{ value: 1048, name: 'Search Engine' },
|
||||||
|
{ value: 735, name: 'Direct' },
|
||||||
|
{ value: 580, name: 'Email' },
|
||||||
|
{ value: 484, name: 'Union Ads' },
|
||||||
|
],
|
||||||
|
color: ['#C8603E', '#B53199', '#5DAD85', '#9969FB', '#AB33B2']
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
return options;
|
||||||
|
}
|
||||||
|
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
optionsData = await getPerformancePlot();
|
optionsData = await getPerformancePlot();
|
||||||
|
//optionsPie = await getPieChart();
|
||||||
isLoaded = true;
|
isLoaded = true;
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -467,6 +498,12 @@ onMount(async () => {
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!--
|
||||||
|
<div class="w-full mt-5">
|
||||||
|
<Chart {init} options={optionsPie} class="" />
|
||||||
|
</div>
|
||||||
|
-->
|
||||||
|
|
||||||
<!--End Card-->
|
<!--End Card-->
|
||||||
|
|
||||||
<!--Start Widget-->
|
<!--Start Widget-->
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user