質問

TeeChartのドーナツグラフの中央にテキスト注釈をAndroid用に配置しようとしています。ただし、位置は動かないようです。私は以下を持っています:

   tc = new TChart(context);
   dn = new Donut(tc.getChart());

   dn.add(goal,Color.white);
   dn.add(data);

   // percentage size of middle hole
   dn.setDonutPercent(60);

   tc.addSeries(dn);
   view.addView(tc);
   Annotation a = new Annotation(tc.getChart());
   a.setText("12.34" + "%");
   a.setLeft(100);
   a.setTop(100);
.

あらゆる助けがあります。

役に立ちましたか?

解決

Annotationの位置を設定する前にこれを追加してください:

a.getShape().setCustomPosition(true);
.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top