PDA

View Full Version : useNull values extjs linechart



zalol
6 Jun 2013, 1:32 AM
Looks like I am doing something wrong. Can you please point me at the right direction.
Why using "useNull: true" property in datastore produces this results? Please see attached file.

Just as a reference below is my code.

Any help is highly appriciated.


DATASTORE:




Ext.define('MAIN.ChartStore',{
extend: 'Ext.data.Store',
autoLoad: false,
fields: [
{name: 'PK', mapping: 'pk'},
{name: 'SEQUENCE', mapping: 'fields.sequence'},
{name: 'Timestamp', type: 'date', dateFormat: 'Y-m-d H:i:s', mapping: 'fields.charttime'},
{name: 'Bid_1', mapping: 'fields.bid_1', type: 'float', useNull: true},
{name: 'Ask_1', mapping: 'fields.ask_1', type: 'float', useNull: true},
{name: 'Bid_2', mapping: 'fields.bid_2', type: 'float', useNull: true},
{name: 'Ask_2', mapping: 'fields.ask_2', type: 'float', useNull: true},
{name: 'Bid_3', mapping: 'fields.bid_3', type: 'float', useNull: true},
{name: 'Ask_3', mapping: 'fields.ask_3', type: 'float', useNull: true},
{name: 'Bid_4', mapping: 'fields.bid_4', type: 'float', useNull: true},
{name: 'Ask_4', mapping: 'fields.ask_4', type: 'float', useNull: true},
{name: 'Bid_5', mapping: 'fields.bid_5', type: 'float', useNull: true},
{name: 'Ask_5', mapping: 'fields.ask_5', type: 'float', useNull: true},
{name: 'Bid_6', mapping: 'fields.bid_6', type: 'float', useNull: true},
{name: 'Ask_6', mapping: 'fields.ask_6', type: 'float', useNull: true},
],
proxy: {
type: 'memory',
reader: {
root: 'data',
totalProperty: 'total'
}
}
});

slemmon
7 Jun 2013, 1:24 PM
Instead of useNull can you just use false as a value for when you don't have data for a point?
Example: http://jsfiddle.net/tqdj8/