2015-02-02 3 views
0

AmCharts를 사용하여 차트를 만들려고하고 있는데 제목을 동적으로 설정해야합니다.AmChart - addTitle not defined

http://docs.amcharts.com/3/javascriptcharts/AmChart

addTitle(text, size, color, alpha, bold) 
text - text of a title size - font size color - title color alpha - title opacity bold - boolean value indicating if title should be bold. 
Adds title to the top of the chart. Pie, Radar positions are updated so that they won't overlap. Plot area of Serial/XY chart is also updated unless autoMargins property is set to false. You can add any number of titles - each of them will be placed in a new line. To remove titles, simply clear titles array: chart.titles = []; and call chart.validateNow() method. 

제가 그러한 방법을 볼 수있는 다음 문서에 따르면, 각각의 그래프는 addTitle() 메소드를 가져야한다. 내 chartDefinition에 포함했습니다 내 차트 개체를 검토 할 때는

var chart = AmCharts.makeChart($chartDiv[0], chartDefinition); 

, 나는 제목의 배열을 볼 수 있습니다 내가 사업부와 차트 정의 객체를 전달, AmCharts.makeChart()를 사용하여 차트를 만드는거야 , addTitle() 메소드는 정의되어 있지 않습니다.

답변

0

나는 atm에 대한 의견을 제시 할 권리가 있으므로 대답으로 게시하고 있습니다.

JSFiddle을 작성하여 문제점을 재현하려고 시도했습니다. 보시다시피 모든 것이 잘 작동하고 있습니다. (심지어 하나의 매개 변수가 addTitle에 있음에도 불구하고)
문제가 여전히 발생하는 경우 코드를 게시 할 수 있습니까?