View Full Version : Any way to set intervals for X-Axis in Line Chart?

Syed Huda
22 Aug 2012, 1:08 PM
I'm trying to verify if there is a way to set the x-axis interval for line chart in EXT 3.4
I didn't see anything in the API.

I would like to show only every 2 or so tick marks with labels on the X-Axis. For the example chart below, how could I make it so it shows every other x-axis tick: basically not show the Aug 07, Oct 07, Dec 07, Feb 08 Labels on X-axis and leave the other ticks, also leave all data points in the chart.


23 Aug 2012, 7:18 PM
You should be able to play with the major/minor ticks and units to perform this. You should be able to look at the YUI charts API for this.


27 Aug 2012, 12:46 AM

try this

var timeAxisConfig = {
minimum: minimum
, maximum: maximum
, majorTimeUnit: 'day'
, majorUnit: 1
xtype: 'linechart'
, xAxis: new Ext.chart.TimeAxis(Ext.apply(timeAxisConfig || {}))


20 Aug 2014, 5:26 AM
Hi sword-it,

What are the possible values for majorTimeUnit?