设置堆栈图的最小高度

时间:2019-08-20 11:57:35

标签: d3.js c3.js

我使用c3图表存在以下问题

see picture here

    var chart = c3.generate({
        bindto: '#' + chartId,
        data: {
            columns: columns,
            type: 'bar',
            groups: [
                chartData.Legend
            ],
            labels: true
        },
        tooltip: {
            show: false
        },
        color: {
            pattern: ['#8C564B', '#1F77B4', '#F5D4EB', '#FF7F0E', '#9467BD', '#707070', '#01adee', '#444444', '#707070', '#026590']
        },
        bar: {
            width: {
                ratio: 0.5
            },
            space: 0.25
        },
        size: 250,
        legend: {
            position: 'right'
        },
        axis: {
            x: {
                type: 'category',
                categories: chartData.ComparisonSettings
            },
            y: {
                show: true,
                center: 0
            }
        }
    });
}

是否可以设置堆叠图表的最小高度,以便可以轻松看到所有数字?

0 个答案:

没有答案