Domanda

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.

È stato utile?

Soluzione

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;
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top