Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combine pie chart slices

Status
Not open for further replies.

shakespeare5677

Programmer
Jul 18, 2005
284
US
CR10, MySql, XP Home:

I am building a pie chart that looks something like:
4 1 1
6 2
6 2
2 3
2 4
4 4 4
where every digit represents a slice and every number represents a color index (ie: 6 6 means two slices of color 6).

This is accomplished by using a command, a pie chart and custom color formatting within the chart (to assign the colors based on their color index). As you can see, the colors are not necessarily in order and they do repeat.

What I need to do is to combine adjacent slices of the same color (combining the slices of color index 4 should produce two slices: one large combined slice between 3 and 2, and one original slice between 6 and 1). Does anyone have any ideas how this could be accomplished?

Thanks in advance.

-Max
 
What is the basis for assigning the color index? It looks like there are two variables contributing to this, one maybe relating to group order and one to some other field value. You should probably create a formula that clusters these into separate groups and then use that as the "on change of" field in the pie chart.

-LB
 
LB, thanks for responding. The color is assigned based on one of the fields (now calculated by the command). Originally it was a formula but I could not get that to show up in the color formatting window (whileprinting or whilereading). The only formulas that do show are the series and the value formulas used in making the chart. This is the reason why I abandoned the "on change of" idea. Am I doing something wrong? Thanks again.

-Max
 
I'm not sure I can help even with more information, but I think for anyone to help you would have to provide the contents of the command so that we could see the basis for the color assignment versus the field that is used for the series. It would help if you also gave an explanation of the logic used.

-LB
 
LB, thank you for the help. I have just been told that on top of combining the slices, the chart should also calculate the number of slices combined. Since the charts cannot be built on whileprinting formulas, and the exception of crosstab does not allow one to adjust chart series colors, I am now looking into working with a subreport.

The main report will have a preliminary run through each item, determine which group and which order the item belongs to and then pass the proper sql parameters to the subreport's command which will then allow the subreport to finish the job (having already combined slices, assigned colors and counted the number of combined slices in the command itself).

Thanks again for the help.

-Max
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top