Click here to Skip to main content
15,892,927 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi there

i have a dynamic chart(Changed in run time),
and the chart is Refreshing Every 30 Seconds (post to a WebService).
Want To Represent the Value in the LegendItems in Diffrent Colors
Depending on "Value"
for Example:

key -- value
A - 0
B - 1
C - 1
D - 0
E - 1

now in the chart i get Diffrent Colors For Each Key and it's fine.
But I Want To Notifay that if the value is '0'
than the ()A,D The Font Color Will be RED in the Legend




Thanks In advance
roni
Posted

I'm not sure that I understand your question, but if i do, wouldn't one solution be to create a collection of system colors and set the font color to ColorArry(N)

Or, if you are sure that you are going to only use 0 and 1, a simple If clause will give you what you need.
 
Share this answer
 
hi okaman
thanks for Your Quick Answer.

sory ,that i'm not so clear

i try to explain again my problem,
in my page i have chart that changed all the time,
and the chart colors ars fine (of course i can cotroled the colors).

my problem is to controling the legend .
when some of the a,b,c,d keys is 0 then i need to mark somehow the legend.
in the legend i want to insert a grid like this:

A | 0 |red rectangle(maybe icon or the font color = red)
B | 1 |
C | 1 |
D | 0 |red rectangle (maybe icon or the font color = red)

i will be Grateful
if u have some code for this question
thanks again
roni
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900