디자인킷 · 반폭
반폭 · 워터폴(기준, 증감 2~4개, 합계, 값 자리판)
D-반폭-워터폴5막대-값자리
언제 쓰는가
시작 값에서 요인별 증가와 감소를 거쳐 결과 값에 이르는 과정을 절반 칸에. D-반폭-워터폴5막대와 같은 모양이며 막대의 위치와 길이가 값 자리(style bottom · height). 막대 4~6개(원고의 rows 로 조정, 기준 1 + 증감 2~4 + 합계 1). 막대 이름 5자 이내(6개면 4자), 값은 지수나 건수. 합계 막대만 강조색. 값 바꾸는 법: .r 하나가 막대 하나(안의 i 의 style bottom = 막대 아래 끝 ÷ 축 최댓값 × 100%, height = 막대 길이 ÷ 축 최댓값 × 100%, i 안 span=값 라벨, .tx=이름). 기준 · 합계 막대는 bottom 0%, height = 값. 증가 막대는 bottom = 직전 누계, height = 증가분. 감소 막대는 bottom = 새 누계(직전 누계 - 감소분), height = 감소분. 행의 상태가 색과 연결 점선의 위치를 정함: up=증가(진회색, 점선이 위 끝에서 다음 막대로), off=감소(옅은 회색, 점선이 아래 끝에서), 없음=기준 막대와 합계 막대("@is:-"). 맨 마지막 막대가 언제나 합계(강조색, 점선 없음)이므로 강조 자리는 없음. 축 최댓값은 가장 높은 누계의 1.1배쯤으로 잡음. 예시는 축 최댓값 160. 감소 값 라벨은 "-10" 처럼 빼기 기호로. 막대 4~6개는 원고 rows 로(늘리거나 줄인 뒤 값을 처음부터 다시 채움. 마지막 막대가 합계).
참고
컨설팅 장표의 waterfall(bridge) 관행과 Financial Times Visual Vocabulary(https://ft-interactive.github.io/visual-vocabulary/)의 deviation · flow 분류를 참고한 기존 D-반폭-워터폴5막대의 값 자리판. 좌표를 SVG 대신 HTML 요소의 style 값으로 두는 방식으로 직접 제작.
조각
<div class="dk dkh dkh-g3-wfall"><div class="dk-card"><p class="dk-lb">전환 지수의 요인별 증감 · 집행 전 100 · 예시 값</p> <div class="pl"> <div class="r"><i class="b" style="bottom:0%;height:62.5%"><span>100</span></i><b class="tx">집행 전</b></div> <div class="r up"><i class="b" style="bottom:62.5%;height:15%"><span>+24</span></i><b class="tx">검색 확대</b></div> <div class="r up"><i class="b" style="bottom:77.5%;height:11.3%"><span>+18</span></i><b class="tx">SNS</b></div> <div class="r off"><i class="b" style="bottom:82.5%;height:6.3%"><span>-10</span></i><b class="tx">광고 피로</b></div> <div class="r"><i class="b" style="bottom:0%;height:82.5%"><span>132</span></i><b class="tx">집행 후</b></div> </div> </div></div>
스타일
.dkh-g3-wfall .dk-card{display:flex;flex-direction:column;padding:20px 24px 16px}
.dkh-g3-wfall .dk-lb{flex:none;margin:0 0 8px}
.dkh-g3-wfall .pl{flex:1;min-height:150px;display:flex;margin:22px 0 30px;border-bottom:1px solid var(--line2)}
.dkh-g3-wfall .r{position:relative;flex:1;min-width:0}
.dkh-g3-wfall .b{position:absolute;left:17%;width:66%;border-radius:3px;background:var(--g4);font-style:normal}
.dkh-g3-wfall .b span{position:absolute;left:-16px;right:-16px;top:-22px;text-align:center;font-size:var(--f-cap);line-height:1.3;font-weight:600;color:var(--ink);font-variant-numeric:tabular-nums}
.dkh-g3-wfall .b::after{content:"";position:absolute;left:100%;top:0;width:51.5%;border-top:1px dashed var(--g3)}
.dkh-g3-wfall .r.off .b::after{top:auto;bottom:0}
.dkh-g3-wfall .r:last-child .b::after{display:none}
.dkh-g3-wfall .r.up .b{background:var(--g3)}
.dkh-g3-wfall .r.off .b{background:var(--g1)}
.dkh-g3-wfall .r:last-child .b{background:var(--ac)}
.dkh-g3-wfall .r:last-child .b span{color:var(--ac);font-weight:700}
.dkh-g3-wfall .tx{position:absolute;left:-4px;right:-4px;top:100%;margin-top:8px;text-align:center;font-size:13px;line-height:1.3;font-weight:400;color:var(--ink2);white-space:nowrap}
.dkh-g3-wfall .r:last-child .tx{font-weight:600;color:var(--ink)}