Graph title

  
Hi there, I have been struggling to find a way to simply change the title of a column chart. I can change the title for the x-axis and y-axis using XAxisData and YAxisData, but I can't see how one can simply change the main graph title. Kind regards, Cole

Hi Cole,

Like with all things chart, you can search the Highcharts documentation for a solution.

Kilian Hekhuis wrote:

Hi Cole,

Like with all things chart, you can search the Highcharts documentation for a solution.

Thanks Kilian for your response. 

Sorry, I'm new to this so I'm not sure how to integrate say only that snippet of code with the existing Ousystems column chart widget. I tried loading it into Advanced format, but to no avail. All I want to do is delete the default title: "Char title."

I also tried just avoiding the standard widget entirely and importing JS directly (. However, this doesn't even want to work for a piece of Highcharts demo code):


"Highcharts.chart('" + ContainerBar.Id + "', {
    chart: {
        type: 'column'
    },
    title: {
        text: 'Monthly Average Rainfall'
    },
    subtitle: {
        text: 'Source: WorldClimate.com'
    },
    xAxis: {
        categories: [
            'Jan',
            'Feb',
            'Mar',
            'Apr',
            'May',
            'Jun',
            'Jul',
            'Aug',
            'Sep',
            'Oct',
            'Nov',
            'Dec'
        ],
        crosshair: true
    },
    yAxis: {
        min: 0,
        title: {
            text: 'Rainfall (mm)'
        }
    },
   
    },
    plotOptions: {
        column: {
            pointPadding: 0.2,
            borderWidth: 0
        }
    },
    series: [{
        name: 'Tokyo',
        data: [49.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]

    }, {
        name: 'New York',
        data: [83.6, 78.8, 98.5, 93.4, 106.0, 84.5, 105.0, 104.3, 91.2, 83.5, 106.6, 92.3]

    }, {
        name: 'London',
        data: [48.9, 38.8, 39.3, 41.4, 47.0, 48.3, 59.0, 59.6, 52.4, 65.2, 59.3, 51.2]

    }, {
        name: 'Berlin',
        data: [42.4, 33.2, 34.5, 39.7, 52.6, 75.5, 57.4, 60.4, 47.6, 39.1, 46.8, 51.1]

    }]
});"

Cheers, 

Cole 


Solution

Hi Cole,

You should defintely not want to import your own Highcharts library, unless you really must for a good reason (e.g. using features not available in the Platform version). Using the AdvancedFormat  is I think the right way to go. You are saying you want to delete the title, earlier you said you wanted to change the title. However, by default the chart doesn't have a title, so I'm a bit at loss how your chart got a title, and why you can't get rid of it.

I added this to a test chart, to get a title:

AdvancedFormat_Init(DataPointFormats:,DataSeriesFormats:,XAxisJSON:,YAxisJSON:,HighchartsJSON:"title:{text:'my title'}")
Solution

Kilian Hekhuis wrote:

Hi Cole,

You should defintely not want to import your own Highcharts library, unless you really must for a good reason (e.g. using features not available in the Platform version). Using the AdvancedFormat  is I think the right way to go. You are saying you want to delete the title, earlier you said you wanted to change the title. However, by default the chart doesn't have a title, so I'm a bit at loss how your chart got a title, and why you can't get rid of it.

I added this to a test chart, to get a title:

AdvancedFormat_Init(DataPointFormats:,DataSeriesFormats:,XAxisJSON:,YAxisJSON:,HighchartsJSON:"title:{text:'my title'}")

Thank you so much for this Kilian. Yeah, I would have settled for changing it from the default title or adding my own (which is what your code does, so thanks). I have to import the highcharts library for another chart that is not in the platform (that's why I was considering it). 

Anyway, thank you for your responses. It works now. 

Cole 


Hi Cole,

Great to hear I could be of help.

As for "another chart that is not in the platform", using AdvancedFormat_Init() it is possible to also change the chart's type by using e.g. "chart:{type:'bubble'}" for a bubble chart.

Oh thanks, that will be useful in the future. 

I am using the salefunnel: 

https://www.highcharts.com/demo/funnel