示例#1
0
  /**
   * Adds colors to the ColorTemplate. Each of the colors will create a new DataSet color array in
   * the template with just one color. This is especially useful when you want each of your DataSets
   * only to be represented by one color and not multiple.
   *
   * @param colors
   * @param c
   */
  public void addColorsForDataSets(ArrayList<Integer> colors) {
    for (int i = 0; i < colors.size(); i++) {

      ArrayList<Integer> clrs = new ArrayList<Integer>();
      clrs.add(colors.get(i));
      addDataSetColors(clrs);
    }
  }
示例#2
0
 /**
  * Adds colors to the ColorTemplate. Each of the colors will create a new dataset color array in
  * the template with just one color. This is especially useful when you want each of your DataSets
  * only to be represented by one color and not multiple.
  *
  * @param colors
  * @param c
  */
 public void addColorsForDataSets(int[] colors, Context c) {
   for (int i = 0; i < colors.length; i++) {
     addDataSetColors(new int[] {colors[i]}, c);
   }
 }