cancel
Showing results for 
Search instead for 
Did you mean: 

Web Chart - Change the Chart Title dynamically

Former Member
0 Kudos

I have a chart in a BW web report. I want to set the title to be something like:

MyChart Title - 24 Feb 2005

where the date would change depending upon when the report was run (ie I want this to be the date the report was updated).

The title that I want to change is the one that is actually generated and put on the image that is rendered, so that if they print the picture, they will still have the refresh date.

Does anyone know if this is possible, and if so, how do I achieve this?

Thanks in advance for any assistance.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Richard,

By default do not give any title to Chart in web App. designer. Give id to TD element which contains chart item and use javascrpit to find out the date and Concatenate the date with your title .

<script >

function getTitle() {

var date = new Date();

document.all.title.innerText = "MyChart Title -" + date ;

}

</script>

<body onload="getTitle()">

<td id ="title" > </td>

</Body>

Just look for correct syntax.

Hope it will be useful

Regards,

Madhukar

Former Member
0 Kudos

Hi thanks for your reply,

What I was actually hoping to be able to do was change the title of the chart on the image that is generated. This would mean that if someone uses the chart somewhere else, that the title would still be correct (eg if they save the image to a file, and use it in a presentation)

An example of what I would like to do would be to have the title include the date range that it was being run for eg. Sales for July 2004 - August 2004

The title on the image is (by necessity) generated on the server, however I thought that it might be possible to include something similar to text variables in the title, and have them be replaced on the server.

Thanks again for taking the time to answer.

Regards

Rich