Example #1
0
 /**
  * ************************************************************** plot
  * **************************************************************
  */
 public int plot(float[] x, float[] y, String label, int color, int width, PathEffect effect) {
   Seria s = new Seria(x, y);
   s.mLabel = label;
   s.mColor = color;
   s.mWidth = width;
   s.mEffect = effect;
   mData.add(s);
   onDataChanged();
   return mData.size() - 1;
 }
Example #2
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;
  }