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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Bar chart - Bars color

Status
Not open for further replies.

SKYplus

Programmer
Jul 18, 2001
9
MT

Hi,

According to article ID: c2008467 in the crystal decisions KB, bars in a bar type chart cannot be set to use the same color and shows how you can do it with the chart analyzer. However this has a huge drawback i.e. if the graph displays more bars than you set in the analyzer, the ones that are not set will have different colours! So the solution explained in the article is not practical.

Does anyone know of a more reliable solution for this? or can comment on this?
 
I ran across this problem myself (I use v7). As I recall, what I did was to create a chart and then look at it in the preview section. From the preview section, I selected the chart analyzer. At that point, I think I could see all of the bars. I then went through and changed them all. Unfortunately, this method doesn't guarentee that if more bars are added, they will be the correct color. But its one idea!
 
Hi, thanks for replying, I use v8. As I said before that is not very practical in my case since the number of bars change with the items in the database and items in the database grow by time. Therefore it is impossible to cater before for the color of each bar in this case...

Is possible to change the bars color at runtime using the active-x viewer control or the RDC component? if yes how?
 
I've met this problem before and found a solution.

I'm using CR8, so the chart Analyzer is where you do all your custom formatting.

This solution requires you to sue the Chart Expert to create an Advanced chart, and make it a line chart with your original series of data and a new formula: zero
whilereadingrecords; 0
//just to get a second series in the report
Then use the chart Analyzer to make your series of data a Bar in the line chart - then the bars will all have the same colour, no matter how many bars.
Do what you need to to make the zero line blank or transparent - it's there to force the second serties of numbers.

You can do it the other way around - a bar chart with the zero line formatted as a line, but this doesn't look as nice.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top