Кстати опять таки вопрос возник.
Вот json строка с данными:
{"contents":[{"name":0,"data1":48,"name2":0,"data2":50},{"name" :1,"data1":48,"name2":1},{"name":2,"data1":50.4,"n ame2":2},{"name":3,"data1":50.4,"name2":3},{"name" :4,"data1":48,"name2":4},{"name":5,"data1":48,"nam e2":5},{"name":6,"data1":48,"name2":6},{"name":7," data1":48,"name2":7},{"name":8,"data1":48,"name2": 8},{"name":9,"data1":48,"name2":9},{"name":10,"dat a1":50.4,"name2":10},{"name":11,"data1":48,"name2" :11},
{"name":12,"data2":50},{"name":12,"data2":48},{"name":12,"data1":50.4,"name2":12},{"name":13,"d ata1":50.4,"name2":13},{"name":14,"data1":50.4,"na me2":14},{"name":15,"data1":50.4,"name2":15},{"nam e":16,"data1":48,"name2":16},{"name":17,"data1":48 ,"name2":17},{"name":18,"data1":50.4,"name2":18},{ "name":19,"data1":48,"name2":19},{"name":20,"data1 ":50.4,"name2":20},{"name":21,"data1":50.4,"name2" :21},{"name":22,"data1":50.4,"name2":22},{"name":2 3,"data1":50.4,"name2":23,"data2":48}]}
Вот код графика:
var ColumnChart = Ext.create('Ext.chart.Chart', {
height: 600,
width: 980,
x: 0,
y: 0,
id: 'ColumnChart',
xtype: 'chart',
style: 'background:#fff',
animate: true,
store: store,
axes: [{
type: 'Numeric',
position: 'left',
fields: 'data1',
grid: true,
minimum: 0
}, {
type: 'Category',
position: 'bottom',
fields: 'name2'
}],
series: [{
type: 'column',
axis: 'left',
gutter: 80,
xField: 'name2',
yField: 'data1',
tips: {
trackMouse: true,
width: 165,
height: 28,
renderer: function(storeItem, item) {
this.setTitle(storeItem.get('name2') + ' : ' + storeItem.get('data1'));
}
},
style: {
fill: '#38B8BF'
},
label: {
display: 'insideEnd',
'text-anchor': 'middle',
field: 'data1',
orientation: 'vertical',
color: '#333'
}
}]
});
И собственно сам график:
http://saveimg.ru/show-image.php?id=...17dc2b09521820
Вопрос: почему отсраиваются эти два пустых элемента???