2 jonskeet JonSkeet 于 2013.07.11 11:29 提问

在 Androidplot 中创建 Timeline

如何给 Calendar (Date&Time) Elements 设置一个 Androidplot 中的 X Axis ?

for(int i=1; i<sY.length;i++){
            Log.d("Watcher","sY:"+sY[i]);
            nY[i] = (Number)Double.parseDouble(sY[i]);
            }
        for(int i=1; i<sX.length;i++){
            Log.d("Watcher","sX: "+sX[i]);      
            nX[i] = (Number)Double.parseDouble(sX[i]);
            }
        XYSeries series = new SimpleXYSeries(
                Arrays.asList(nY), 
                SimpleXYSeries.ArrayFormat.Y_VALS_ONLY,
                getTitle);
        LineAndPointFormatter seriesFormat = new LineAndPointFormatter(
                Color.rgb(0, 200, 0), // line color
                Color.rgb(0, 100, 0), // point color
                Color.rgb(150, 190, 150)); // fill color (optional)
        oneChart.addSeries(series, seriesFormat); 
        oneChart.disableAllMarkup();
Csdn user default icon
上传中...
上传图片
插入图片