Sometimes we may need to add some more information about the data displayed on the widget. i-button is an option to add this description, but sometimes user may not aware about the button. Here is an alternative method for adding information that will always appear on the widget.
Steps:
Create widget
Add below script to widget.
Update text to be displayed and set format of text
Save the script and refresh widget
widget.on('processresult',function(se,ev){
//Subtitle
ev.result.subtitle = {
text: 'This is a sample subtitle. This is a sample subtitle. This is a sample subtitle.',
align: 'left',
style: {
color: '#787878',
fontSize:'13px',
fontWeight:'bold'
}
}
ev.result.chart.marginTop = 75 // to add required space to display subtitle at the top
})
Hey! I can't seem to get this to work with a pivot table. Changing to a bar chart works just fine. Can you help?