Jump to content
Software FX Community

Changing The Color Of Individual Data Points


User (Legacy)
 Share

Recommended Posts

Hello!

I have some Delphi code that I wish to translate to ASP to colour the

datapoints on my bar chart. I cannot get it to work and would appreciate

some help! I have 48 data points per day, the colour of the data point

changes depending on what period of day the point relates to. The code

below was used with ChartFX 98, I am now trying out ChartFX IE which does

not seem to have the color property.

if dayofweek(mprofdate2(grmonth,day)) in [1..5] then // If the

current day is mon-fri

begin

ChartFX1.color[j]:=PROFCOLOR; //A predefined colour, in this case

red

if NightProfcolor<>-1 then if hh in [1..14] then

ChartFX1.color[j]:=NightProfcolor;

if MonToFriPeakProfcolor<>-1 then if hh in [33..38] then

ChartFX1.color[j]:=MonToFriPeakProfcolor;

if EveProfcolor<>-1 then if hh in [42..48] then

ChartFX1.color[j]:=EveProfcolor;

end

else

begin

if WeekendPROFCOLOR<>-1 then ChartFX1.color[j]:=WeekendPROFCOLOR

else ChartFX1.color[j]:=PROFCOLOR;

if NightProfcolor<>-1 then if hh in [1..14] then

ChartFX1.color[j]:=NightProfcolor;

end;

Cheers

Paul

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...