【问题标题】:Ext chart autosize外部图表自动调整大小
【发布时间】:2014-05-19 20:26:11
【问题描述】:

我正在尝试制作图表(ext 4.1):

    var chart = Ext.create('Ext.chart.Chart', {
    width: 280,
    height: 230,
    animate: true,
    autoSize: true,
    shadow: true,
    store: storeChart2,
    renderTo: 'chart2',
    legend: {
//position: 'right'
    },
    theme: 'Base:gradients',
    series: [{
        type: 'pie',
        field: 'data',
        showInLegend: false,
        highlight: {
          segment: {
            margin: 20
          }
        },
         tips: {
                  trackMouse: true,
          width: 100,
                  renderer: function(storeItem, item) {
                    this.setTitle(storeItem.get('name') + ': ' + Math.round(all * storeItem.get('data') / 100) +' ('+ Math.round(storeItem.get('data') / 100 * 100) + '%)');
                  }
                },
        label: {
            field: 'name',
            display: 'rotate',
            contrast: true,
            font: '12px Arial'
        }
    }]
});

AutoSize: true, - 不工作。在 Chrome 控制台中:

Error: Invalid value for <svg> attribute width="-Infinity"
Error: Invalid value for <svg> attribute height="-Infinity"

怎么了?

【问题讨论】:

  • 你能解决这个问题吗?

标签: extjs charts


【解决方案1】:

尝试添加一个属性,

最小值:0

请参考post

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-07-26
    • 1970-01-01
    • 2017-11-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-10-11
    • 2017-04-29
    相关资源
    最近更新 更多