Forum Discussion

ElementUX's avatar
ElementUX
Cloud Apps
04-27-2022
Solved

Hover label value font colors

Is it possible to change the font color for bar chart hover  labels?  Ideally this would be a global setting, but if I have to run code per widget, ill do what it takes. Thanks!

 

  • ElementUX ,

    Here is a script to make same color for tooltip.

     

    widget.on('beforedatapointtooltip', function(se, ev) {
    	$.each(ev.context.points, function(index, value){
    		value.valueColor = 'red' //specify color here
    	})
    })

    Its possible to apply the color globally by creating a plugin with this script.

    -Hari

3 Replies

Replies have been turned off for this discussion
  • harikm007's avatar
    harikm007
    Data Warehouse

    ElementUX ,

    Here is a script to make same color for tooltip.

     

    widget.on('beforedatapointtooltip', function(se, ev) {
    	$.each(ev.context.points, function(index, value){
    		value.valueColor = 'red' //specify color here
    	})
    })

    Its possible to apply the color globally by creating a plugin with this script.

    -Hari

  • Thanks.  Worked as intended.  Ill do it widget by widget for now. 

  • Wanted to add the code works for the entire tooltip - dual values maintain the same color 🙂