【问题标题】:Cannot show legend in Sencha Chart无法在煎茶图中显示图例
【发布时间】:2011-10-06 15:17:06
【问题描述】:

我已经实现了一个需要在创建后填充的图表。

这是我创建的对象的片段:

       MyApp.views.chartPanel = new Ext.chart.Panel({
       id: 'chartPanel',
       title: 'Pie Chart',  
       items: {
            cls: 'pie1',
            theme: 'Demo',
            store: null,
            shadow: false,
            animate: false,
            insetPadding: 20,
            legend: {
                position: 'top'
            },

.....

    pass: function(id) {
            MyApp.views.chartPanel.items.items[0].bindStore(getData(id));

        }

调用传递函数并填充图表,但我看不到只有当用户双击窗口并重置图表时才会显示的图例。

如何正确显示图例?

【问题讨论】:

    标签: sencha-touch sencha-charts


    【解决方案1】:

    在您的系列配置中添加以下内容:

    series: [{
        type: 'pie',
        ....
        showInLegend: true,
        label: {
            field: 'name'
        }
    }]
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-10-04
      • 1970-01-01
      相关资源
      最近更新 更多