0

私のチャートは正常に表示されますが、横にスクロールするとすぐにランダムな時間が表示され、日付が台無しになります

日付だけを表示したいのですが、入力したことのない時間をレンダラーがどのように表示するのかわかりません。

また、左 (x 軸) と下 (負の y) へのスクロールを防ぐ方法を知りたいのですが、x の値は数値ではなく日付であるため、SetPanLimits を使用できなくなりました。

どんな助けでも大歓迎です!

4

1 に答える 1

1

これが非常に古いことは知っていますが、次のユーザーにとっては、解決策が役立つかもしれません.

使用する日付形式を指定できます

/**
 * Creates a time chart intent that can be used to start the graphical view
 * activity.
 * 
 * @param context the context
 * @param dataset the multiple series dataset (cannot be null)
 * @param renderer the multiple series renderer (cannot be null)
 * @param format the date format pattern to be used for displaying the X axis
 *          date labels. If null, a default appropriate format will be used.
 * @return a time chart intent
 * @throws IllegalArgumentException if dataset is null or renderer is null or
 *           if the dataset and the renderer don't include the same number of
 *           series
 */
  public static final Intent getTimeChartIntent(Context context, XYMultipleSeriesDataset dataset,
  XYMultipleSeriesRenderer renderer, String format) {
        return getTimeChartIntent(context, dataset, renderer, format, "");
  }

日と月のみを表示するには、次のようなものを使用します。

Intent intent = ChartFactory.getTimeChartIntent(context, dataset, mRenderer, "dd-MMM");
于 2012-05-02T20:01:56.470 に答える