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

Fun with Charts

Status
Not open for further replies.

TeyBrady

MIS
Mar 24, 2005
71
US

I recently had a customer ask for a couple different things on charts that crystal doesn't do (at least I don't think it can) but I found a way to do it and thought I would share.

The first request was a simple line chart. The tricky part was that the customer wanted the background behind the chart to show a red, yellow, and green range. The color range would allow report viewers would quickly know how they were doing. I eventually settled on creating a formula called red, yellow, and green and placing a constant value in each that was equal to its height. I then created an AREA chart and plotted the three color formulas and the value I wanted charted as the line. I had to change the colors of the three ranges of course. I used a pale red, yellow and green so they wouldn't be too intrusive. The last step was to change the series option for the top section to a line and that was all there was to it. I had a line plotted over a red, yellow, green background.

Later in the same project we were doing a bar chart for the same information and the customer wanted the color of the bars to change based off the values to red, yellow or green. So if something would have been in the red range it should have a red bar etc. This time the trick was to create a STACKED bar chart and have three different color formulas being plotted. If a bar was supposed to be red I would allow the red value to hold that value and set yellow and green to 0 and did the same for yellow and green when a bar should be yellow or green. All I had to do was change the bar colors for each section and I had my bars changing colors based off the values. The key is setting your formulas so they only have a value when it is there turn to be the bar.

I hope these ideas are helpful. Sometimes you have to trick things to get them to do what you want them to do.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top