amCharts support forum

You are not logged in.

Announcement

FORUM CLOSED! This forum is closed. We moved to a new place at Zendesk. Update your bookmarks.

Flash Charts: Flash Charts Bundle


#1 2012-07-05 16:36:57

lecat
Member

add.title and remove title

hello

I have two graphs
I would like when i put on handleClick 1 add a title1 " Euros" and remove title 2,
and when iput on handleClick2  I add a tittle 2 " kW.h" and reove title1

function handleClick (data) {
                  for (var i = 0; i < chart.graphs.length; i++) {
                    if (chart.graphs[i].valueField == data.dataItem.valueField) {
                      chart.showGraph(chart.graphs[i]);    
                    }
                    else {
                      chart.hideGraph(chart.graphs[i]);
                    }
                  }
                }
thank you a lot of

Offline

 

#2 2012-07-06 15:05:33

martynasma
Administrator

Re: add.title and remove title

You can update chart title this way:

Code:

chart.titles[0].text = 'New title text';
chart.validateNow();

Offline

 

© amCharts | Forum engine: PunBB