hochileo / achartengine

Automatically exported from code.google.com/p/achartengine
0 stars 0 forks source link

Cutom label formatter #261

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It would be great to have the possibility to format labels through a  callback, 
something like this

    GraphView graphView = new LineGraphView(this, "example") {  
       @Override  
       protected String formatLabel(double value, boolean isValueX) {  
          if (isValueX) {  
             // convert unix time to human time  
             return dateTimeFormatter.format(new Date((long) value*1000));  
          } else return super.formatLabel(value, isValueX); // let the y-value be normal-formatted  
       }  
    };  

Original issue reported on code.google.com by stef.ba...@gmail.com on 25 Dec 2012 at 10:56

GoogleCodeExporter commented 9 years ago

Original comment by dandrome...@gmail.com on 8 Jan 2013 at 12:25