Graflume · Alpha

Pie / Donut · 극단 환경 적용

소수 범주의 전체 대비 비중을 각도와 면적으로 보여줍니다. 기기 이름을 추측하지 않고 컨테이너 크기, 입력 방식, 표시 능력과 사용자 선호를 조합합니다. 모바일·워치·전자종이·흑백·도트 화면과 표준 기반 극단 환경을 같은 차트에서 비교하세요.

차트 계열 · 기본 차트 계열

Pie / Donut

소수 범주의 전체 대비 비중을 각도와 면적으로 보여줍니다.

Quick API
pie()
브라우저 스냅샷
graflume
mark
pie
프리셋
3

극단 환경

디바이스·입력·표시 능력에 맞춘 재구성

기기 이름을 추측하지 않고 컨테이너 크기, 입력 방식, 표시 능력과 사용자 선호를 조합합니다. 모바일·워치·전자종이·흑백·도트 화면과 표준 기반 극단 환경을 같은 차트에서 비교하세요.

반응형 화면

컨테이너 폭과 높이에 따라 축, 범례, 설명과 조작부를 자동 재배치합니다.

960×540 · adaptive.profiles=responsive-fluid
  • zoom-reflow
  • shape-rectangle
  • display-color
  • input-fine
  • motion-full
  • renderer-canvas-spatial

극단 환경 미리보기

위 프로필 탭을 선택하면 같은 데이터와 ChartSpec을 유지한 채 화면 크기, 입력 방식, 표시 능력과 사용자 선호에 맞춰 차트를 다시 구성합니다.

상태불러오는 중

  • adaptive
  • capability-driven
  • no-user-agent-branching
  • 범례: legend · categories · category
  • 포인트·범위 하이라이트: highlights[] · datum · category
  • 설명 말풍선: annotations[] · datum · category · callout · placement:auto
  • 대화형 선택: selection · multiple · toggle
Graflume.pie() Canvas 2D
조작 도움말

확대·이동은 화면을 살펴보기 위한 기능이며 데이터 축이나 값은 바꾸지 않습니다. 재생 조작이 보이는 차트에서는 원본 데이터에서 고유값이 처음 등장한 순서대로 실제 단계만 이동합니다.

Tab으로 조작부를 이동하고 Enter 또는 Space로 실행하세요. 차트에 초점이 있을 때 더하기·빼기 키로 확대·축소하고 화살표 키로 이동할 수 있습니다.

자동 배치는 둘레 후보를 비교해 차트·범례·다른 말풍선과의 겹침을 가능한 한 피합니다. 명시한 위치는 필요한 안전 보정만 적용해 유지합니다. 말풍선 글자는 상자 안에서 안전하게 자동 줄바꿈됩니다. 끊어지지 않는 긴 토큰은 정해진 줄 수 안에서 시각적으로 축약하지만, 보조 기술에는 원문 전체를 유지합니다.

불러오는 중

브라우저 API · 이식 가능한 스키마

브라우저 API

Graflume.pie()

const data = [
  {
    "category": "Organic search",
    "radius": 34,
    "value": 38
  },
  {
    "category": "Direct",
    "radius": 28,
    "value": 27
  },
  {
    "category": "Product referrals",
    "radius": 23,
    "value": 18
  },
  {
    "category": "Community",
    "radius": 18,
    "value": 11
  },
  {
    "category": "Campaigns",
    "radius": 13,
    "value": 6
  }
];

const options = {
  "accessibility": {
    "description": "Acquisition channels shown as a restrained five-part composition. The example uses curated, deterministic data and exposes its exact values in a semantic table.",
    "label": "Pie chart: Acquisition channels shown as a restrained five-part composition"
  },
  "annotations": [
    {
      "connector": {
        "visible": true
      },
      "detail": "데이터, 축 범위 또는 화면 위치에 사용자가 작성한 안전한 텍스트 설명을 연결합니다.",
      "id": "manual-callout",
      "placement": "auto",
      "style": {
        "maxWidth": 220,
        "padding": 8
      },
      "target": {
        "field": "category",
        "type": "datum",
        "value": "Product referrals"
      },
      "text": "포인트·범위 하이라이트 · Product referrals"
    }
  ],
  "axes": {
    "x": false,
    "y": false
  },
  "create": {
    "adaptive": {
      "profiles": "auto"
    }
  },
  "height": 620,
  "highlights": [
    {
      "id": "manual-focus",
      "padding": 7,
      "target": {
        "field": "category",
        "type": "datum",
        "value": "Product referrals"
      }
    }
  ],
  "interaction": {
    "controls": {
      "annotations": true,
      "export": true,
      "fullscreen": true,
      "labels": {
        "controls": "차트 조작",
        "enterFullscreen": "전체 화면 열기",
        "exitFullscreen": "전체 화면 닫기",
        "exportPng": "PNG 다운로드",
        "hideAnnotations": "설명 말풍선 숨기기",
        "loop": "반복 재생",
        "nextFrame": "다음 프레임",
        "pause": "일시 정지",
        "play": "재생",
        "previousFrame": "이전 프레임",
        "reset": "보기 초기화",
        "seek": "재생 위치",
        "showAnnotations": "설명 말풍선 표시",
        "speed": "재생 속도",
        "zoomIn": "확대",
        "zoomOut": "축소"
      },
      "playback": false,
      "reset": true,
      "zoom": true
    },
    "hover": true,
    "navigation": {
      "drag": true,
      "keyboard": true,
      "maxZoom": 6,
      "minZoom": 1,
      "pinch": true,
      "wheel": "modifier"
    },
    "selection": {
      "ariaLabel": "대화형 선택",
      "clearOnBackground": true,
      "clearOnEscape": true,
      "highlight": {
        "padding": 5
      },
      "key": "category",
      "mode": "multiple",
      "toggle": true
    },
    "tooltip": {
      "fields": [
        {
          "field": "category",
          "format": "auto",
          "label": "범주"
        },
        {
          "field": "value",
          "format": "number",
          "label": "값"
        }
      ],
      "title": "Pie / Donut",
      "trigger": "mark"
    }
  },
  "legend": {
    "field": "category",
    "interactive": true,
    "labels": {
      "hide": "숨기기",
      "show": "표시"
    },
    "maxItems": 8,
    "mode": "categories",
    "orientation": "horizontal",
    "position": "bottom",
    "title": "범주",
    "visible": true
  },
  "locale": "ko",
  "mark": {},
  "padding": {
    "top": 52
  },
  "theme": "graflume-light",
  "title": {
    "subtitle": "Acquisition channels shown as a restrained five-part composition",
    "text": "Pie chart"
  },
  "width": "container",
  "x": {
    "field": "category",
    "title": "Channel",
    "type": "ordinal"
  },
  "y": {
    "field": "value",
    "title": "Share (%)",
    "type": "quantitative"
  }
};

Graflume.pie('#chart', data, options);

이식 가능한 스키마

ChartSpec 0.1 · options

{
  "accessibility": {
    "description": "Acquisition channels shown as a restrained five-part composition. The example uses curated, deterministic data and exposes its exact values in a semantic table.",
    "label": "Pie chart: Acquisition channels shown as a restrained five-part composition"
  },
  "annotations": [
    {
      "connector": {
        "visible": true
      },
      "detail": "데이터, 축 범위 또는 화면 위치에 사용자가 작성한 안전한 텍스트 설명을 연결합니다.",
      "id": "manual-callout",
      "placement": "auto",
      "style": {
        "maxWidth": 220,
        "padding": 8
      },
      "target": {
        "field": "category",
        "type": "datum",
        "value": "Product referrals"
      },
      "text": "포인트·범위 하이라이트 · Product referrals"
    }
  ],
  "axes": {
    "x": false,
    "y": false
  },
  "create": {
    "adaptive": {
      "profiles": "auto"
    }
  },
  "height": 620,
  "highlights": [
    {
      "id": "manual-focus",
      "padding": 7,
      "target": {
        "field": "category",
        "type": "datum",
        "value": "Product referrals"
      }
    }
  ],
  "interaction": {
    "controls": {
      "annotations": true,
      "export": true,
      "fullscreen": true,
      "labels": {
        "controls": "차트 조작",
        "enterFullscreen": "전체 화면 열기",
        "exitFullscreen": "전체 화면 닫기",
        "exportPng": "PNG 다운로드",
        "hideAnnotations": "설명 말풍선 숨기기",
        "loop": "반복 재생",
        "nextFrame": "다음 프레임",
        "pause": "일시 정지",
        "play": "재생",
        "previousFrame": "이전 프레임",
        "reset": "보기 초기화",
        "seek": "재생 위치",
        "showAnnotations": "설명 말풍선 표시",
        "speed": "재생 속도",
        "zoomIn": "확대",
        "zoomOut": "축소"
      },
      "playback": false,
      "reset": true,
      "zoom": true
    },
    "hover": true,
    "navigation": {
      "drag": true,
      "keyboard": true,
      "maxZoom": 6,
      "minZoom": 1,
      "pinch": true,
      "wheel": "modifier"
    },
    "selection": {
      "ariaLabel": "대화형 선택",
      "clearOnBackground": true,
      "clearOnEscape": true,
      "highlight": {
        "padding": 5
      },
      "key": "category",
      "mode": "multiple",
      "toggle": true
    },
    "tooltip": {
      "fields": [
        {
          "field": "category",
          "format": "auto",
          "label": "범주"
        },
        {
          "field": "value",
          "format": "number",
          "label": "값"
        }
      ],
      "title": "Pie / Donut",
      "trigger": "mark"
    }
  },
  "legend": {
    "field": "category",
    "interactive": true,
    "labels": {
      "hide": "숨기기",
      "show": "표시"
    },
    "maxItems": 8,
    "mode": "categories",
    "orientation": "horizontal",
    "position": "bottom",
    "title": "범주",
    "visible": true
  },
  "locale": "ko",
  "mark": {},
  "padding": {
    "top": 52
  },
  "theme": "graflume-light",
  "title": {
    "subtitle": "Acquisition channels shown as a restrained five-part composition",
    "text": "Pie chart"
  },
  "width": "container",
  "x": {
    "field": "category",
    "title": "Channel",
    "type": "ordinal"
  },
  "y": {
    "field": "value",
    "title": "Share (%)",
    "type": "quantitative"
  }
}