Add caption to highcharts dinamically

I need to add something like this footer under the charts:


chart: {
    type: 'column',
    events: {
        load: function () {
            var label = this.renderer.label("This text will adjust to chart resizing " +
                "and redraws and will be visible on exported images.")
                width: '400px',
                fontSize: '9px'
                'r': 2,
                'padding': 5

            label.align(Highcharts.extend(label.getBBox(), {
                align: 'center',
                x: 20, // offset
                verticalAlign: 'bottom',
                y: 0 // offset
            }), null, 'spacingBox');

    marginBottom: 120

But i need to do it dynamically, so everytime a chart is created a caption for that chart is set. Is there a way to achieve that? Like create a special field for that.

Read more here: Add caption to highcharts dinamically

Leave a Reply

Your email address will not be published. Required fields are marked *