View Full Version : Chart timeAxis: how to hide minorUnit labels

13 Sep 2010, 12:51 AM

I have a chart showing progress in 3 criteria on a day-to-day basis (data point per day).
I set the majorUnit as "week", and formatted the labels to show week number.
When the time scale is wide enough it looks OK - labels are shown one per week, or even more sparse for real wide date range.
However, when a narrow date range is selected, more labels are shown and it results in showing of duplicate labels.

timeAxis configuration:

xAxis: new Ext.chart.TimeAxis({
displayName: "Week",
title: "Week",
majorUnit: "week",
minorUnit: "day",
labelFunction: "format_week"

How can I make the timeAxis show labels only once a week or less ?