문제

I have a bottom time axis, which is defined as following:

{
  "title":"Date",
  "description":"",
  "position":"bottom",
  "type":"Time",
  "fields":["date"],
  "dateFormat":"d.m.Y"
}

But all the labels are "NaN.NaN.0NaN"

When I look in the store, the date field is a normal Date object with the right values. But when I look in the drawLabel function of Axis, me.labels has no objects, so nothing gets drawn.

도움이 되었습니까?

해결책

I have a renderer for the time axis:

getDateRenderer: function(v) {
    return Ext.util.Format.date(v, 'd.m.Y');
}

and here setting it to it:

this.chart.axes.items[2].label.renderer = this.getDateRenderer;
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top