I looked at this issue a bit more. The problem is the chartModel base class
defines only six colors. You can  override:

public List<Color> getSeriesColors()

// The default implementation is as follows:
  public List<Color> getSeriesColors()
  {
    return _defaultColors;
  }

  private static final List<Color> _defaultColors = new ArrayList<Color>();

  static
  {
    _defaultColors.addAll(
      Arrays.asList(new Color[]{new Color(231,109,72,0),new
Color(110,166,243,0),new Color(157,206,110,0),new Color(252,196,111,0),new
Color(114,126,142,0),new Color(109,44,145,0)}));
  }

However I agree that the current implementation is not correct. If it cannot
find the colors it should throw an exception on the server or it should wrap
around and reuse the colors. So if you enter a JIRA ticket for it, I can
provide the patch for it.

Regards,
Venkata
On 8/29/07, venkata guddanti <[EMAIL PROTECTED]> wrote:
>
> Can you please log a JIRA ticket? I will investigate and provide a patch.
>
> Regards,
> Venkata
>
> On 8/29/07, Florian Reiser < [EMAIL PROTECTED]> wrote:
> >
> > Hello,
> >
> > I want to draw a pie chart with a total of 15 data items in a series.
> > When I render the page the chart is not shown.
> >
> > So I limited the number of data items in the chart and found out, that
> > the chart shows only with a maximum number of 5 data items.
> >
> > So the following works:
> >
> > public List<List<Double>> getYValues() {
> >   List<Double> item = Arrays.asList(new Double[] {1.0, 2.0, 3.0, 4.0,
> > 5.0, 6.0});
> >   Vector<List<Double>> yValues = new Vector<List<Double>>();
> >   yValues.add(item);
> >   return yValues;
> > }
> >
> > But this doesn't work:
> >
> > the chart shows only with a maximum number of 5 data items.
> >
> > So the following works:
> >
> > public List<List<Double>> getYValues() {
> >   List<Double> item = Arrays.asList(new Double[] {1.0, 2.0, 3.0, 4.0,
> > 5.0, 6.0, 7.0});
> >   Vector<List<Double>> yValues = new Vector<List<Double>>();
> >   yValues.add(item);
> >   return yValues;
> > }
> >
> > What can I do to draw all of my items?
> >
> > With kind regards
> > Florian Reiser
> > --
> > GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
> > Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail
> >
>
>

Reply via email to