Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Chart Control
  New Posts New Posts RSS Feed - Suggestion: Chart point color based on value
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Suggestion: Chart point color based on value

 Post Reply Post Reply
Author
Message
joffrey View Drop Down
Newbie
Newbie
Avatar

Joined: 28 February 2011
Location: Montreal, QC, C
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote joffrey Quote  Post ReplyReply Direct Link To This Post Topic: Suggestion: Chart point color based on value
    Posted: 12 May 2011 at 12:05am
Good day!
 
I am trying to figure an easy way to implement a UI feature in bar charts that would paint the bar not in one color but with a varying color depending on its value.  Or maybe this couls be an easy suggestion?!?
 
For example: assuming our bars would go from 0 to 100 in value. Well, in this example, a bar of value 10 would start red and finish with a lighter red.  A bar of value 50 would start red and finish yellow.  A bar of value 100 would start red and finish green.  Of cource, steps would be defineable.
 
This would provide immediate visible feedback for example on failure or success of each points or elements in the chart.
 
Here is a demo of what I am saying:
 
Sample chart
 
Comments and suggestions are welcomed!
 
Thanks in advance
 
Joffrey Brouillet
 
Joffrey B.
Codejock MFC 15.0.2
On Win7 x64
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 13 May 2011 at 12:03am
Hi,

You can manually call pPoint->SetColor to specify colors you need.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.