Hc Gauge Semicircle

Preview

Loading…

Installation

CLI
npx @sonojs/ui@latest add hc-gauge-semicircle
Also needsnpx @sonojs/ui@latest add chart-styles hc-gauge-shared && npm i highcharts highcharts-react-official

Usage

import
import HcGaugeSemicircleDemo from "@/components/charts/hc-gauge-semicircle"
page.tsx
export default function Page() {
  return <HcGaugeSemicircleDemo />
}

Scrub

scrub highlights the active category and dims the rest (default true). Pass false to keep the idle last-category view.

scrub
import { HcGaugeSemicircle } from "@/components/charts/hc-gauge-semicircle"

export default function Page() {
  return <HcGaugeSemicircle scrub={false} />
}

Plot direction

plotDir only flips the plot (bars / axes). Header and legend still follow page dir. Omit it to match the page (default).

plotDir
import { HcGaugeSemicircle } from "@/components/charts/hc-gauge-semicircle"

export default function Page() {
  return (
    <div dir="rtl">
      {/* Chrome RTL · bars still start on the left */}
      <HcGaugeSemicircle plotDir="ltr" />
    </div>
  )
}

Props

PropTypeDefaultDescription
scrubbooleantrueHover, touch, and keyboard scrub — dim inactive categories and update the metric header.
plotDir"ltr" · "rtl"page dirPlot-only layout (bar sides / axes). Header and legend keep following page dir.