Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions texturefrontend/src/components/ColumnProfile.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

let active = true;
let showSettings = false;
let useLogScale = false;
$: showChartForType =
displayCol.type === "number" ||
displayCol.type === "categorical" ||
Expand Down Expand Up @@ -83,6 +84,7 @@
showBackground={$showBackgroundDistMap[displayCol.name]}
shouldBin={colSummary?.cardinality == undefined ||
colSummary.cardinality >= 10}
{useLogScale}
/>
{:else if displayCol.type === "categorical"}
<CategoricalChart
Expand Down Expand Up @@ -135,6 +137,16 @@
/>
<span> Show background distribution </span>
</label>
{#if displayCol.type === "number"}
<label class="flex items-center gap-2 text-sm text-gray-500 mt-2">
<input
type="checkbox"
class="w-4 h-4 bg-gray-100 border-gray-300 dark:ring-offset-gray-800 focus:ring-2 me-2 dark:bg-gray-700 dark:border-gray-600 rounded text-primary-600 focus:ring-primary-500 dark:focus:ring-primary-600"
bind:checked={useLogScale}
/>
<span> Use log scale </span>
</label>
{/if}
</div>
{/if}
</div>
Expand Down
6 changes: 6 additions & 0 deletions texturefrontend/src/components/charts/Histogram.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
export let mainDatasetName: string;
export let showBackground = true;
export let shouldBin = true;
export let useLogScale = false;

$: width = $sidebarWidth - 50;
let uuid = getUUID();
Expand Down Expand Up @@ -79,6 +80,11 @@
vg.margins({ top: 10, right: 15, left: 40 }),
];

if (useLogScale) {
console.log("using log scale");
plotDirectives.push(vg.xScale("log"));
}

if (showBackground) {
plotDirectives.unshift(
vg.rectY(vg.from(table), {
Expand Down