Gallery / Bars & columns

col

One long label among short ones

A layout specimen: short categories with a single four-word outlier at a normal desktop width, where the axis should wrap rather than rotate everything.

One long label among short ones

Source

Svelte, builder, JSON

<script lang="ts">
  import { GeomCol, GGPlot, Labs } from "@ggsvelte/svelte";

  import { filings } from "./data.js";
</script>

<!--
  640px width is intentional (#634): mixed short + one multi-word outlier must
  wrap at desktop width, not escalate to −90° + truncate.
-->
<GGPlot
  data={filings}
  aes={{ x: "category", y: "count" }}
  width={640}
  height={320}
>
  <Labs
    title="One long label among short ones"
    subtitle="At a normal panel width the axis should wrap the outlier, not rotate every label"
    x="Category"
    y="Count"
  />
  <GeomCol />
</GGPlot>

Meta

Details

Family
Bars & columns
Source
col/mixed-outlier-labels
Rendering
SVG
Techniques

col · band · labels · i18n · vr