옵션은 :
size: {
height: 100,
width: 100
}
는
100px
대신
100%
의에
svg
요소의 높이와 너비를 설정하는 나는 성공적으로
width
100%
로 설정됩니다
size: {
height: '100%',
width: '100%'
}
시도 하지만 어쨌든 height
은 320px
로 설정됩니다.
그래서 당신은 당신의 CSS는이를 추가하는 경우 :
.c3 svg {
width: 100%;
height: 100%;
}
크기 조정 문제를 해결할 것이다.
편집
크기 조정에 컨트롤러 추가 초기 크기와 약간의 주석을 설정하는 그냥 작은 변화 - 당신이에 따라 차트의 일부 크기 조정을 추가해야합니다 경우, 이벤트 핸들러를 중지 새로운 크기. 사용이가 C3 플러그인과 동일 플러그인 nvd3 See it here
resizable: {
enabled: true,
handles: ['n', 'e', 's', 'w', 'ne', 'se', 'sw', 'nw'],
// optional callback fired when resize is started
start: function(event, $element, widget) {},
// optional callback fired when item is resized,
resize: function(event, $element, widget) {},
// optional callback fired when item is finished resizing
stop: function(event, $element, widget) {
// here should update the size according to the widget size
// widget.sizeX (* 160px) and widget.sizeY (* 160px)
// and further adjustments
}
},
확인이를 찾아주세요. https : // css-tricks.co.kr/scale-svg/ – Ashugeo