mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-11 02:33:51 +00:00
Convert profitdistro chart to use computed props
This commit is contained in:
parent
159f69c141
commit
261b3fb947
|
@ -50,13 +50,15 @@ export default defineComponent({
|
|||
console.log('setup start');
|
||||
const settingsStore = useSettingsStore();
|
||||
// registerTransform(ecStat.transform.histogram);
|
||||
const profits = props.trades.map((trade) => trade.profit_ratio);
|
||||
// console.log(profits);
|
||||
// const data = [[]];
|
||||
|
||||
const bins = 10;
|
||||
const data = binData(profits, bins);
|
||||
console.log(profits, data);
|
||||
const data = computed(() => {
|
||||
const profits = props.trades.map((trade) => trade.profit_ratio);
|
||||
|
||||
return binData(profits, bins);
|
||||
});
|
||||
|
||||
const chartOptions = computed((): EChartsOption => {
|
||||
const chartOptionsLoc: EChartsOption = {
|
||||
|
@ -66,7 +68,7 @@ export default defineComponent({
|
|||
},
|
||||
backgroundColor: 'rgba(0, 0, 0, 0)',
|
||||
dataset: {
|
||||
source: data,
|
||||
source: data.value,
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
|
|
Loading…
Reference in New Issue
Block a user