Skip to content

Infragistics Community Forum / Web / Ultimate UI for ASP.NET Web Forms / Why do pie or column chart colors duplicate ?

Why do pie or column chart colors duplicate ?

New Discussion
elliot
elliot asked on May 23, 2008 9:00 AM

I have an issue occuring on both pie and column charts. In both cases, i have both column and pie charts with 6 data rows (e.g. 6 pie slices and 6 columns respectively, each row representing a different division within a company. I want each division to have a different pie slice or column bar color. I don't really care which colors each division is represented by, as long as they have unique colors…however when the charts render, they are duplicating colors…for example, if i have a dataset as follows:

 Division         Value

Div 1             100
Div 2             225
Div 3             300
Div 4             350
Div 5             365
Div 6             375

5 of the divisions will have distinct colors (e.g. green, blue, orange, red, yellow)…however one of the divisions will overlap colors…so the result is that two divisions end up with green…and i can't tell them visually apart on the pie or column charts…it's always green that repeats. How can i control this default behavior and have all 6 colors render uniquely. thank you.

Sign In to post a reply

Replies

  • 0
    Teodor Taushanov
    Teodor Taushanov answered on May 21, 2008 9:00 AM
    • 0
      elliot
      elliot answered on May 21, 2008 5:44 PM

      is there any way to get the webchart control to dynamically choose the colors and not duplicate them (up to some reasonable number) ? or do i need to manually set them…i have a number of charts that regularly go up to 5 or 6 pie slices or bar columns….as i mentioned in my original post, 1 color keeps repeating…is there no default behavior that avoids color duplication ? if need be, i will manually set colors as in your example, however in any given chart, i don't know how many colors will be needed (depends on the dynamic data coming into the chart), so i'd prefer to leverage some sort of built-in feature if possible. thank you.

      • 0
        Teodor Taushanov
        Teodor Taushanov answered on May 23, 2008 9:00 AM

        You can try using some of the other color model styles. For example:

        this

        .ultraChart1.ColorModel.ModelStyle = ColorModels.PureRandom;

  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
elliot
Favorites
0
Replies
3
Created On
May 23, 2008
Last Post
17 years, 9 months ago

Suggested Discussions

Created by

Created on

May 23, 2008 9:00 AM

Last activity on

May 23, 2008 9:00 AM