开发者

ExtJS gauge chart label not displaying

The gauge is showing up just fine but the label "Some diff data" does not show up under the chart as expected. Ext JS 4 API - Gauge says display denotes how the label gets displayed. I assume title is the label. Any idea开发者_开发百科s?

series: [{
    type: 'gauge',
    field: 'diff1',
    donut: false,
    title: "Some diff data",
    display: 'under', //tried outside as well
    colorSet: ['#FFFFCC', '#FF9999']
 }]


You are correct that the title field is for the title. But it's not specified as part of the series...it needs to be applied to the axes. Such as, like this:

    items: [{
        xtype: 'chart',
        data: 'data',
        height: 200,
        width: 200,
        animate: true,
        store: 'store1',
        axes: [{
            position: 'gauge',
            title: 'Your Title Here', // << HERE >>
            type: 'Gauge',
            margin: 8,
            maximum: 100,
            minimum: 0,
            steps: 4
        }],
        series: [{
            type: 'gauge',
            angleField: 'data1',
            donut: 60,
            needle: false
        }]


create text sprites for the title or any labels.

Look at the Ex.draw package.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜