Fix chart error
parent
922f83d557
commit
41a1d2fdaf
|
@ -104,6 +104,7 @@ export function process(id) {
|
||||||
const nextBanner = getNextBanner(pull.time, currentBannerIndex, selectedBanners);
|
const nextBanner = getNextBanner(pull.time, currentBannerIndex, selectedBanners);
|
||||||
|
|
||||||
if (nextBanner === undefined) {
|
if (nextBanner === undefined) {
|
||||||
|
console.log('error banner here', JSON.stringify(pull));
|
||||||
pushToast(t('wish.errorBanner'), 'error');
|
pushToast(t('wish.errorBanner'), 'error');
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,6 +41,8 @@
|
||||||
beginners: 'beginners',
|
beginners: 'beginners',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let errorProcessingPull = '';
|
||||||
|
|
||||||
const bannerType = bannerTypes[id];
|
const bannerType = bannerTypes[id];
|
||||||
let bannerChart;
|
let bannerChart;
|
||||||
let pieChart;
|
let pieChart;
|
||||||
|
@ -138,6 +140,8 @@
|
||||||
currentBanner = getNextBanner(pull.time);
|
currentBanner = getNextBanner(pull.time);
|
||||||
|
|
||||||
if (currentBanner === undefined) {
|
if (currentBanner === undefined) {
|
||||||
|
console.log('error banner here', JSON.stringify(pull));
|
||||||
|
errorProcessingPull = JSON.stringify(pull);
|
||||||
pushToast($t('wish.errorBanner'), 'error');
|
pushToast($t('wish.errorBanner'), 'error');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -234,7 +238,6 @@
|
||||||
|
|
||||||
await tick();
|
await tick();
|
||||||
|
|
||||||
setTimeout(() => {
|
|
||||||
new Chart(pieChart, {
|
new Chart(pieChart, {
|
||||||
type: 'pie',
|
type: 'pie',
|
||||||
data: {
|
data: {
|
||||||
|
@ -260,6 +263,7 @@
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (id === 'character-event' || id === 'weapon-event') {
|
||||||
new Chart(bannerChart, {
|
new Chart(bannerChart, {
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
data: {
|
data: {
|
||||||
|
@ -319,7 +323,7 @@
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}, 500);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function sortPulls() {
|
function sortPulls() {
|
||||||
|
@ -403,6 +407,9 @@
|
||||||
</div>
|
</div>
|
||||||
{#if loading}
|
{#if loading}
|
||||||
<div class="text-white pl-4 md:pl-8 mt-4">{$t('wish.detail.loading')}</div>
|
<div class="text-white pl-4 md:pl-8 mt-4">{$t('wish.detail.loading')}</div>
|
||||||
|
{#if errorProcessingPull !== ''}
|
||||||
|
Error when getting banner for {errorProcessingPull}
|
||||||
|
{/if}
|
||||||
{:else}
|
{:else}
|
||||||
<div class="flex mt-4 wrapper">
|
<div class="flex mt-4 wrapper">
|
||||||
<div class="block overflow-x-auto xl:overflow-x-visible whitespace-no-wrap px">
|
<div class="block overflow-x-auto xl:overflow-x-visible whitespace-no-wrap px">
|
||||||
|
|
Loading…
Reference in New Issue