Skip to content

Commit

Permalink
Isolate the fix sample commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Iinh committed Oct 31, 2023
1 parent 92d55f6 commit 60bd2ec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/components/explore/ToplineMetrics.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@
class="topline__client-count"
class:topline__client-count--highlighted={hovered &&
hovered.sample_count > tweenValue}>
{formatCount(hovered.sample_count)}
{hovered.sample_count ? formatCount(hovered.sample_count) : ''}
</span>
samples
{hovered.sample_count ? 'samples' : 'No sample data available'}
{/if}
</div>
{#if hovered}
Expand Down
5 changes: 4 additions & 1 deletion src/utils/probe-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ export function clientCounts(arr) {
}

export function sampleCounts(arr) {
return arr.map((a) => ({ totalSample: a.sample_count, label: a.label }));
return arr.map((a) => ({
totalSample: a.sample_count ? a.sample_count : 0,
label: a.label,
}));
}

function uniques(d, k) {
Expand Down

0 comments on commit 60bd2ec

Please sign in to comment.