K线图配置2(成交量) - Shaman05/wxCharts GitHub Wiki

K线图配置2(成交量):

return {
    name: 'dk',
    width: 'auto',
    height: 80,
    average: [5, 10, 20],
    axis: {
        row: 1,
        col: 5,
        showX: false,
        paddingTop: 0,
        paddingBottom: 14,
        paddingLeft: 0,
        paddingRight: 0,
        color: '#cdcdcd'
    },
    xAxis: {
        times: ['20151113', '20170118'],  //起止时间范围(由用户选择的K线种类(日K、周K、月K等)和数据决定,只显示起止时间)
        data: []
    },
    yAxis: [
        {
            type: 'bar',  //类型为柱状
            color: [],    //颜色
            data: [],     //成交量
            cData: [],    //现价(收盘价)
            gap: 1,       //间隔
            isBottomBar: true,  //是否为底部
            showMax: true   //是否显示最大值
        },
        {...}   //均线配置,同蜡烛图
    ],
    callback: function (time) {
        var page = getCurrentPages();
        page = page[page.length - 1];
        page.setData({
            kl2RenderTime: time
        });
    }
};