Value

Overview

The value object represents the numeric item of the specific drop zone used in a given datapoint.

  • From version: 2020.20

Properties

chip

chip: Chip

"The measure chip" that was used to drive the value.

Console.log("current value for " + datapoint.numerics.value.chip.caption + " measure is " + datapoint.numerics.value.rawValue);

formattedValue

formattedValue: string

The cell's formatted text value in the query result. Use this to drive decorative representations of the value. Alternatively the formatted result may reflect its derived value. For example, the "color" dropzone's formatted value will be represented as a hex code.

Const datapoint =cvApi2.resultSet.data.getCurrentTrellisData().datapoints[0];
Console.log("current color for datapoint is " + datapoint.numerics.color[0].formattedValue);

rawValue

rawValue: string | number

The cells raw numeric value in the query result. As this represents the actual value from the query, it is most often used to drive and draw the visualization.

Const datapoint =cvApi2.resultSet.data.getCurrentTrellisData().datapoints[0];
Console.log("current value for " + datapoint.numerics.value.chip.caption + " measure is " + datapoint.numerics.value.rawValue);

isEmpty

isEmpty: boolean

Returns true If the datapoint has no value for the current measure in the dropzone. It is useful when you want to filter empty or irrelevant data.

const isDatapointValueEmpty = cvApi2.resultSet.data.getCurrentTrellisData().datapoints[0].numerics.value.isEmpty;