Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
435
jquery template sum or subtract operator
posted

as for rangeToolTipTemplate option, I want to do a sum or subtract calculation between endvalue and startvalue variables. 

For example, endvalue - startvalue = finalresult  like ${item.startValue - item.endValue} 

<script id="rangeToolTipTemplate" type="text/x-jquery-tmpl">
<div class='ui-lineargauge-range-tooltip' >
<font color='${itemBrush}'>
${item.name} :  ${item.startValue - item.endValue}
</font>
</div>
</script>

  • 20255
    Suggested Answer
    Offline posted

    Another possible solution would be to override fireTooltip inernal function of the gauge as it is shown in the jsfiddle below:

    http://jsfiddle.net/jj3gdyLL/28/

    If you want you can log a product idea about tooltip events in the gauge at http://ideas.infragistics.com, the Product Ideas site allows you to suggest new product features, new functionalities in existing products and controls, and even request new controls and products altogether.

  • 20255
    Offline posted

    Hello Chi,

    Thank you for your patience on this!

    The templating engine does not support JavaScript invocations within the template. This was a limitation that we introduced in favor of performance. This can be worked around by modifying the data with your JS logic prior to providing the data to the templating engine.

    Let me know if I may be of further assistance.

  • 20255
    Offline posted

    Hello Chi Ming Pun,

    Thank you for your question!

    I wanted to let you know that I am currently investigating this issue and I will let you know about my findings as soon as possible.