Jump to content

Histogram: Adjust Number Formatting Workaround


Recommended Posts

  • Administrators

Background

In this use case, we start with a signal that indicates the product code as a 9-digit number.

image.png

I would like to aggregate the data by product code and display the results in a histogram. The current method do this involves using the .toCondition() operator on the product code signal and then aggregating the results in the Histogram tool using the value property of the product code condition. However, when this is done, the product code bin labels are displayed in the histogram using scientific notation:

image.png

However, I'd like to see the full product code; the value in scientific notation loses its meaning.  This feature request is logged as CRAB-22684.

This post documents the current work around.

Analysis Steps

1. In Formula, convert the product code signal to a string signal and add an underscore ("_") to the end.

image.png

 

2. Use the .toCondition() operator to create a new condition with a capsule for every value in the string product code signal.

image.png

 

3. Finally, aggregate the condition created in Step 2 by the value property in the Histogram tool.

image.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...