맨위로가기
 

SBCHART

닫기

Axis Outer Tick

#latest  #options

X, Y축의 바깥쪽 Tick을 숨기거나 표시합니다.
axis.x.type = "categories" 인 경우는 X축 마지막 Tick과 동일한 위치에 중복되어 표시됩니다.

Options

  • axis.x.tick.outer = true/false

  • axis.x.tick.centered = true/false

  • axis.y.tick.outer = true/false

Example

사용 가능 차트 :

Code

var chart = sb.chart.render("#chartWrap", {
    data: {
        type: "bar",
        columns: [
            ["2016",0.71,2.14,3.18,-1.84,0.79,0.35,0.28,0.44,0.79,0.84,1.33,-0.7,-1.51,0.09,1.05,-1.66,-0.58,4.63],
            ["2017",1.48,3.64,2.35,1.29,1.42,1.34,1.51,-1.08,4.29,1.67,2.4,-0.36,-0.53,1.98,2.23,-0.9,-1.62,1.66]
        ]
    },
    axis: {
        x: {
            tick: { 
                outer: false
            }
        },
        y: {
            tick: { 
                outer: false
            }
        }
    }
});

//outer tick-x
document.getElementById("chkOuterX").onchange = function() {
    chart.axis({
        x: {
            tick: {
                outer: this.checked
            }
        }
    }).render();
};
//centered
document.getElementById("chkCentered").onchange = function() {
    chart.axis({
        x: {
            tick: {
                centered: this.checked
            }
        }
    }).render();
};
//outer tick-y
document.getElementById("chkOuterY").onchange = function() {
    chart.axis({
        y: {
            tick: {
                outer: this.checked
            }
        }
    }).render();
};