extjs 4 line chart rendering problems

后端 未结 1 588
孤城傲影
孤城傲影 2020-12-21 13:32

I am having trouble with extjs rendering the line chart below. Specifically, the last six values are null which are (correctly) not shown on the series line but (incorrectly

相关标签:
1条回答
  • 2020-12-21 14:13

    There's a config option under Ext.data.Field called useNull. If the data received cannot be parsed into a number, null will be used instead. As of right now I can't recall if that alone will fix the problem, and I have a memory of once using a custom convert function that went something like this:

    convert: function(value){
        if(typeof value !=== 'number') // or other similar conversion
            return undefined;
        return value;
    }
    

    If this doesn't work, you may need to customize your store/reader to completely exclude records containing the undesirable null value.

    EDIT - Using useNull looks like this: {name: 'someName', type: 'int', useNull: true}

    0 讨论(0)
提交回复
热议问题