cancel
Showing results for 
Search instead for 
Did you mean: 
intapiuser
Community Team Member
Community Team Member
Introduction
Value labels at the floating figures above a series in a bar chart, column chart, or line chart.  
Purpose/Benefits
Changing value labels can be useful to make a measure stand out more.
Example
Steps
1.  Open the Edit Script window in the widget editor.  
2.  Paste the below code.
3.  Change "YourMeasure" to the measure name you would like to change.  (note: be sure to keep the quotes)
4.  Click Save
5  Refresh the dashboard page and click Apply.
/******* user configuration **********/ 
var seriesName = "YourMeasure"; 
/*************************************/ 
widget.on('processresult', function(sender, ev){ 

var data = _.find(ev.result.series, function (ser) {return ser.name == seriesName}).data 
_.each(data, function(value){ 
//enable dataLabels, change its font, make it bold and rotate by 270 
value.dataLabels = {enabled:true, style:{'fontSize':'35px', 'fontWeight':'bold'}, rotation: 270} 
}) 
})
Comments
Jake_Raz
9 - Travel Pro
9 - Travel Pro

Is it possible to add a background color or highlight to the value labels? I'm trying to apply this to the value labels on an area chart, and my problem is that the labels sometimes overlap with the dark colors of the area chart. I can't just make the value label's font color white, because then the parts of the labels that aren't overlapping the area chart would be invisible against the white background. I can try and set it to a middle grey color, but then they won't stand out very well against either the area chart's colors or the background.

Ideally I could just set some sort of background color or highlight to the value label, this way the values are always visible no matter what's behind them. I tried adding "backgroundColor" and "borderColor" to the style tag, but that didn't seem to work. 

JamieR
7 - Data Storage
7 - Data Storage

Are there any plans for making this very basic feature available without using a script? Excel and Tableau both make this much easier. Even this comment box has a button for changing the size of my text!

Version history
Last update:
‎03-02-2023 09:05 AM
Updated by:
Contributors
Community Toolbox

Recommended quick links to assist you in optimizing your community experience:

Developers Group:

Product Feedback Forum:

Need additional support?:

Submit a Support Request

The Legal Stuff

Have a question about the Sisense Community?

Email [email protected]

Share this page: