Ejemplo n.º 1
0
  /**
   * ************************************************************** put text in axis coordinates
   * **************************************************************
   */
  public int text(float[] x, float[] y, String[] texts, int color, HALIGN ha, VALIGN va) {
    Seria s = new Seria(x, y);
    s.mWidth = 0; // we don't want stroke here
    if (texts.length != s.sz()) {
      throw new InvalidParameterException("x and y must be with the same length");
    }
    s.mColor = color;
    s.texts = texts;
    s.hAlign = ha;
    s.vAlign = va;

    mData.add(s);
    onDataChanged();
    return mData.size() - 1;
  }
Ejemplo n.º 2
0
  /**
   * ************************************************************** add image seria
   * **************************************************************
   */
  public int bitmapScatter(float[] x, float[] y, Bitmap[] bm, String label, HALIGN ha, VALIGN va) {
    Seria s = new Seria(x, y);
    s.mLabel = label;
    s.mWidth = 0; // we don't want stroke here
    if (bm.length != s.sz()) {
      throw new InvalidParameterException("x and y must be with the same length");
    }
    s.bms = bm;
    s.hAlign = ha;
    s.vAlign = va;

    mData.add(s);
    onDataChanged();
    return mData.size() - 1;
  }