Forum Discussion

jeffreyl's avatar
jeffreyl
Cloud Apps
11-30-2022
Solved

Column chart - add title on line Using a line at the top of the columns to show maximum capacity

Column chart - I need to add a title above a line I have at the top of a column chart to clearly define this line show the maximum capacity. Seems like this could be done but not sure how to code it....
  • Sijo1995's avatar
    12-07-2022

    Hi jeffreyl ,

    Please try this script.

    Url-https://www.binextlevel.com/post/add-subtitle-to-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
    })

    Thanks

    Sijo

  • jeffreyl's avatar
    jeffreyl
    12-07-2022

    Thank you, Works Great!!!