Hi,

I have different problems using time axis.
I have a line chart showing the evolution of events during time, so my bottom axes is a time axes:
Code:
{     
type: 'Time',     
position: 'bottom',     
grid: grid,     fields: 'name',     
title: false,     
dateFormat: 'd/m/y',     
groupBy: 'year,month,day',      
aggregateOp: 'sum',    
label: {         
   orientation: 'horizontal',         
   rotate: {degrees: 315 }     
}


The user interface provides three links to change the scale. Clicking on one of those link should change dateformat and groupby options. Here is the code:

Code:
scaleGroups = {    
 'DAY': { dateFormat: 'd/m/y',  groupBy: 'year,month,day' }, 
 'MONTH' :{ dateFormat: 'M Y',groupBy: 'year,month'  },    
 'YEAR' :{dateFormat: 'Y', groupBy: 'year'} }; 

 function changeChartScale(chart_id, scale) {     
var chart = Ext.getCmp(chart_id);     
var axis = chart.axes.get(1);     
selectedGroup = scaleGroups[scale];     
axis.dateFormat = selectedGroup.dateFormat;     
axis.groupBy = selectedGroup.groupBy;      
chart.redraw(); 
}

The problem is that changing from a scale to another, for example from days to months, previous labels don't disappear.



So the line is correct, but I see both day labels and month labels (see the image below).
Sometimes even the grid isn't updated.

Does anyone know why?



chart.jpg



Another problem is that when the new scale has only one element, it seems that extjs chart doesn't work anymore.
I try to explain better:
consider to have a daily chart showing the evolution from 1-03-2011 to 15-05-2011; in this case changing scale to month will show a line with 3 points:March 2011, April 2011 and May 2011.
But if the daily chart goes from 1-03 to 15-03, changin to month scale should produce only one point (March 2011). This doesn't work. And after clicking "month", no other chart on the page will work anymore.


Please help me.

Thanks in advance,

Sabrina