DMRenderer

The DMRenderer element provides functionality for a developer to build a renderer for data measure using a groovy expression.


<DM bucketization="DAILY">
<Name>RequestQuantity</Name>
<DisplayName>Request Quantity</DisplayName>
<DMRenderer><![CDATA[
return \"<a href=\"#\" onclick=\"openSomeJsPanel()\">${displayValue}</a>\"
]]>
</DMRenderer>
<SqlDefRef>
<GroupName>PTA.TlvSqls</GroupName>
<SqlName>DummySql</SqlName>
</SqlDefRef>
<SqlQuantityField levelType="Undefined">
<FieldName>quantity</FieldName>
</SqlQuantityField>
<SqlDateField levelType="Undefined">
<FieldName>the_date</FieldName>
</SqlDateField>
</DM>


In the above example, we are generating a hypelink for a data measure.

The following variables are bound to the groovy shell and can be used from your expression. See the javadocs for the package com.onenetwork.platform.data.tlv for the details of this API.

  • timeline—represents the current Timeline object;

  • dmName—represents the data measure name;

  • displayName—represents the data measure display name;