맨위로가기
 

SBCHART

닫기

ImageSingle Options

#latest  #options

ImageSingle 차트 고유 옵션입니다.

Options

  • data.imageConf

  • extend.imageSingle.padding

Example

Code

var chart = sb.chart.render("#chartWrap", {
    data: {
        type: "imageSingle",
        rows: [
            'device1' : 'TV/Radio',
            'device2' : 'PC/노트북',
            'device3' : '스마트 기기',
            'device4' : 'Video/DVD',
        ],
        labels: false,
        legends: {
            ['device1', 'device2', 'device3', 'device4' ],
            [61.1, 25.2, 48.5, 21.3]
        },
        imageConf: [
            {"key": "device1", "src": "/res/images/chart/device-1.png", "repeat": false,  "rectColor":"#78B5E2"},
            {"key": "device2", "src": "/res/images/chart/device-2.png", "repeat": false,  "rectColor":"#5CC6CB"},
            {"key": "device3", "src": "/res/images/chart/device-3.png", "repeat": false,  "rectColor":"#7FC9A2"},
            {"key": "device4", "src": "/res/images/chart/device-4.png", "repeat": false,  "rectColor":"#A9C138"},
        ],
    },
    extend: {
        imageSingle: {
            padding: 25,
        }
    }
});