cancel
Showing results for
Did you mean:

Solved!
Go to solution

## Formatting curve colors on report

Hello!

From the plot below, I need to change the color of the parts of the curve that goes to 0 (so basically all the vertical segments). I don't know if it is possible directly from the report window or maybe throyugh a script. The priority is to delete them in order to show only the values <> 0, and the vertical segments introduce difficulty in reading the graph. Could you please help me? Thanks in advance!

Message 1 of 5
(742 Views)

## Re: Formatting curve colors on report

Hey.

The data points which are equal to zero are valid and will be shown.

If you want to "switch off" these, you can set them to "invalid" (via script, all values =0 to change in "NoValue").

Then - I guess - the result should fit your expectations.

Don't forget to switch off the "interpolation of the curve between NoValues".

Greetings,

Vassili

Message 2 of 5
(694 Views)

## Re: Formatting curve colors on report

Hello! Could you please help me by writing some strings to replace all the 0 values of the channel into "NoValue"? I'm not able to do it... thanks!

Message 3 of 5
(683 Views)
Solution
Accepted by topic author Piacioo

## Re: Formatting curve colors on report

An easy way looks e.g. like this:

``````ChnEventResultList = ChnEventFind("A=0", Array("A"), Array(Data.GetChannel("[1]/MyDataChn")))
Call ChnEventCreateStatusChn("/WOZero", ChnEventResultList, "[1]/MyDataChn", 1, NOVALUE)
Call ChnMul("[1]/WOZero","[1]/MyDataChn", "/MyResultChn")
``````

The first line is the code to a Diadem function "Event Search".

The formula is A=0, and the A is linked to your data channel (I used the name "MyDataChn" and assumed, it's in the 1st group).

The resulting channel is just a state (named "WOZero"), where the zeros are replaced by NV and others by 1.

Finally, multiplying this state channel with your data provides a new data channel, where zero values are replaced by NV.

I use to keep the original data unchanged, and create such new channels instead of "deleting" any information at all...

Greetings

Message 4 of 5
(677 Views)

## Re: Formatting curve colors on report

Fantastic, it works! Thanks a lot, unfortunately I only received an ultra-basic training, I'm trying to learn by myself but no-paper material found, so...

Anyway, thanks again!

Message 5 of 5
(670 Views)