2016-10-21 2 views
0

나는 가로보기로 세로보기에서 전설을 변경하고 싶습니다. 여기범례를 세로보기에서 가로보기로 변경하는 방법은 무엇입니까?

voicecalldata 
.width(400) 
.height(190) 
.x(d3.scale.ordinal()) 
.xUnits(dc.units.ordinal) 
.brushOn(true) 
.dimension(voicecalldataDimension) 
.group(Incoming1,"Incoming") 
.group(Outgoing1,"Outgoing") 
.legend(dc.legend().x(5).y(165).itemHeight(8).gap(3)) 

는 voicecalldata 내 compositechart 이름입니다.

enter image description here

상기 범례

포맷이 아래로 변경한다. enter image description here

누군가 나를 도와주십시오.

+0

추가'수평 (참)' –

+0

감사 남자. –

답변

1

사용

.legend(dc.legend().horizontal(true).x(5).y(165).itemHeight(8).gap(3)) 

를 더 많은 읽기 : 도움

http://dc-js.github.io/dc.js/docs/html/dc.legend.html#horizontal__anchor

+0

가로 범례 사이의 간격을 늘리는 방법을 알고 계십니까? 나는 격차'의 값을()'증가했지만, 그것은 도움이되지 않습니다. 'gap()'은 범례가 수직 일 때만 도움이됩니다. –

관련 문제