I'm using ExtJS 4 to draw a very simple line chart:
Ext.create('Ext.Panel', {
width: '100%',
height: 300,
hidden: false,
renderTo: Ext.Element.get('container'),
layout: 'fit',
items: {
xtype: 'chart',
animate: false,
store: plots[title]['instances'][instance]['store'],
axes: [{
type: 'Numeric',
position: 'left',
fields: ['samples'],
minimum : minimum,
maximum : maximum,
grid : true,
title: plots[title]['yLabel']
}, {
type: 'Category',
position: 'bottom',
fields: ['time'],
title: plots[title]['xLabel']
}],
series: [{
type: 'line',
highlight: {
size: 7,
radius: 7
},
axis: 'left',
xField: 'time',
yField: 'samples',
showMarkers: false,
style: {
fill: '#18428E',
stroke: '#18428E',
'stroke-width': 3
},
}]
}
});
The problem is that the time series in the x axis is very long. As result the labels tend to overlap. Is there a way to visualize only some labels?
I remember that this was the default behavior with ExtJS 3.
The series in the x-axis is a date derived from a timestamp.