Subscribe Bookmark RSS Feed

How to change the marker label from value to character

Highlighted
kitae_han

Community Member

Joined:

Sep 25, 2016

I want make a bar chart labeled with character in different column from the column (numerical value) used for making bar chart.

For example, the result of residual DNA amount can be reported as "< limit of quantification".

In case of this, I use limit of quantification value except "<" to make a chart and I want to mark that as "<" to provide the exact result.

There is a way using column label and Label by Row, but, it can be used only for one item per data table (more than ten items are in my data table).

Therefore, I am looking for the way that designating the different column for chart label using jmp script (I can't find yet).

If anyone knows the way, please let me know how to do it. Thanks.

Example table

BatchDNA1DNA2
16AB012
16AB02<1
16AB033
16AB043
16AB05<1
16AB06<1
16AB072
16AB084
16AB091
16AB102
16AB11<1

Example Chart

12814_DNA Chart.png

1 REPLY
ms

Super User

Joined:

Jun 23, 2011

One way is to use Value Labels, a column property. It is easy to do manually for a limited number of values, but can also be done with JSL.

For example:

dt = Current Data Table();

// Make list of value label "assignments"

vl = Repeat(

    i = 0;

    {i++ ; Eval Expr(Expr((:DNA2[i])) = Expr(Char(:DNA1[i]) || Char(:DNA2[i])))};,

    N Row(dt)

);

// Set value label property       

:DNA2 << Value Labels(vl);

// Make chart

dt << Chart(X(:Batch), Y(:DNA2), Label by Value, Show Labels, Bar Chart(1));

12829_Chart.png