2016-12-19 1 views
0

난 그냥 androidplot 1.4로 업데이트하고 구식 0.6에서 온 : O를 내가 어려운 내 코드를 마이그레이션 찾을 ....이 라인에 대한 올바른 기능?androidplot 0.6에서 1.4로 마이그레이션하는 방법은 무엇입니까?

plot = (XYPlot) view.findViewById(R.id.mySimpleXYPlot); 

plot.getGraphWidget().setDomainValueFormat(new PlotDomainFormat(....... 
plot.setGridPadding(0, 0, 0, 0); 
plot.getGraphWidget().setDomainLabelOrientation(-45); 
plot.getGraphWidget().getDomainLabelPaint().setTextSize(20); 
plot.getLegendWidget().setVisible(false); 

if (act.minXY.x == 0f) { 
    act.minXY = new PointF(plot.getCalculatedMaxX().floatValue() - 30, plot.getCalculatedMinY().floatValue()); 
    act.maxXY = new PointF(plot.getCalculatedMaxX().floatValue(), plot.getCalculatedMaxY().floatValue()); 
} 

감사는 무엇인가! ! bye phil

답변

1

당신이 여기에 들어가는 주된 차이점은 플롯 가장자리의 레이블에 대한 지원이 추가 된 것처럼 보입니다. 하나의 도메인 레이블 인 페인트 또는 방향 대신 이제 그래프의 위쪽 가장자리와 아래쪽 가장자리에 모두 하나씩 있습니다. 당신은 단지 BOTTOM 가장자리에 위의 설정을 적용해야한다, 그래서 상단과 오른쪽 가장자리 레이블 숨겨진 기본적으로

:

plot.getGraphWidget().getDomainLabelPaint().setTextSize(20); 

가된다 :

plot.getGraph().getLineLabelStyle(XYGraphWidget.Edge.BOTTOM).getPaint() 
    .setTextSize(20); 

그리고

plot.getGraphWidget().setDomainLabelOrientation(-45); 

되다 :

plot.getGraph().getLineLabelStyle(XYGraphWidget.Edge.BOTTOM) 
    .setRotation(-45); 

XYPlot documentation의 도메인 & 범위 레이블 섹션을 확인하십시오.

+0

thanx! 이 작품 ..... – just4phil