Chart accessibility.

색과 포인터만으로 의미를 전달하지 않는 차트를 만드세요.

차트의 의미와 대체 데이터

#

차트의 제목에 측정 대상과 단위를 쓰고, 주요 결론을 본문으로 설명하세요. 숫자는 차트 바깥의 HTML 표나 공통 파사드의 데이터 표로도 제공할 수 있습니다.

<figure aria-labelledby="trend-title" aria-describedby="trend-description">
  <figcaption id="trend-title">월별 방문자 · 천 명</figcaption>
  <p id="trend-description">1월 24에서 3월 35로 증가했습니다.</p>
  <sy-chart id="trend" type="line" aria-label="월별 방문자 추이"></sy-chart>
  <button id="show-data" type="button">데이터 표 열기</button>
</figure>
<script type="module">
  await customElements.whenDefined('sy-chart');
  const chart = document.querySelector('#trend');
  chart.series = [{ name: '방문자', values: [24, 29, 35] }];
  chart.xAxis = { kind: 'category', categories: ['1월', '2월', '3월'] };
  document.querySelector('#show-data').addEventListener('click', () => chart.showDataTable());
</script>