The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 change color of data
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

imoada

31 Posts

Posted - 09/30/2014 :  12:16:41 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Originpro 9.1.0 SR3
Win7 Ultimate SP1

Hello all

Does anyone know how to make font color of data in worksheet change automatically when data change. For example, when data in a cell in a worksheet change from number 5 to number 3 (or other number), the font color of this cell change from black (default) to green (or other color). If the data in this cell get back to 5, font color of this cell return to black too.

Thanks for any tip.

greg

USA
1378 Posts

Posted - 10/02/2014 :  3:33:11 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
In principle you could do something along these lines:

Add a column and use Set Column Values to enter a Before Formula Script...
// Begin script
dataset dsV;
range raD = col(2); // or whatever column you want to 'watch'
vfind ix:=raD value:=3 ox:=dsV;
loop(idx,1,dsV.GetSize())
{
row = dsV[idx];
wcellcolor irng:=raD[row] color:=color(green) type:=1;
}
// End script

I suspect that for what you want to do, the script could get pretty complicated.
Go to Top of Page

imoada

31 Posts

Posted - 10/03/2014 :  02:24:09 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
hello, greg

Thanks for your reply.

Yes, I think we need a more complicated program to solve this hard question. Maybe need to modify Origin deeply. But this desire is not worh the effort because this function is not widely useful. Nevertheless, thank greg again.
Go to Top of Page

cpyang

USA
1406 Posts

Posted - 10/09/2014 :  11:38:04 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
If you just want to visualize the data using color, then just convert the worksheet data to a matrix and view in Image mode.

1. Worksheet menu to choose Direct
2. A new matrix will be created with the data, and you now can go to View menu to choose Image Mode.
3. You can further show the image view in color by using a palette by using Matrix->Apply Palette to Color Map

CP
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000