1

在此处输入图像描述

在左边,有重复的数字,我不知道为什么?如何让它只显示单个数字?0,1,2 并且只有。

和条上的网格显示,我怎样才能让它放在图表后面?

代码

axes: [{
    type: 'Numeric',
    position: 'left',
    fields: ['inCnt'],
    label: {
        renderer: Ext.util.Format.numberRenderer('0,0')
    },
    title: 'In Transaction Qty',
    grid: true,
    minimum: 0
}, {
    type: 'Category',
    position: 'bottom',
    fields: ['month'],
    title: 'Current 12 Month'
}],

series: [{
    type: 'column',
    axis: 'left',
    highlight: true,
    tips: {
        trackMouse: true,
        width: 130,
        height: 40,
        renderer: function (storeItem, item) {
            this.setTitle(storeItem.get('inCnt') + ' transaction(s) in '+storeItem.get('month'));
        }
    },
    label: {
        display: 'insideEnd',
        'text-anchor': 'middle',
        field: 'inCnt',
        renderer: Ext.util.Format.numberRenderer('0'),
        orientation: 'vertical',
        color: '#333'
    },
    xField: 'month',
    yField: 'inCnt'
}]

JSON数据

[
    { "month" : "Nov", "inCnt" : 0 },
    { "month" : "Oct", "inCnt" : 2 },
    { "month" : "Sep", "inCnt" : 0 },
    { "month" : "Aug", "inCnt" : 0 },
    { "month" : "Jul", "inCnt" : 0 },
    { "month" : "Jun", "inCnt" : 3 },
    { "month" : "May", "inCnt" : 0 },
    { "month" : "Apr", "inCnt" : 0 },
    { "month" : "Mar", "inCnt" : 0 },
    { "month" : "Feb", "inCnt" : 0 },
    { "month" : "Jan", "inCnt" : 0 },
    { "month" : "Dec", "inCnt" : 0 }
]
4

1 回答 1

1

因为您在截断小数点的轴上使用渲染器,所以

1.8
1.6
1.4
1.2

变成

1
1
1
1
于 2012-11-22T03:33:27.553 回答