나는 랠리 차트와 버튼이있는 랠리 앱을 작성 중입니다. 차트에 액세스하여 버튼 클릭으로 설정을 수정해야합니다. 단추는 랠리 차트와 동일한 앱 컨테이너에 있습니다.기본 앱에 그려진 요소를 참조하십시오.
나는 Ext. 이. 이러한 액세스 지정자가 작동하지 않습니다. 이걸 좀 도와 주시겠습니까?
샘플 코드 :
Ext.define('CustomApp', {
extend: 'Rally.app.App',
componentCls: 'app',
id: 'appid',
launch: function() {
var datepickerfrom = Ext.create('Ext.Container', {
items: [{
xtype: 'rallytextfield',
fieldLabel: 'Enter Start Date for chart (mm/dd/yyyy): ',
labelWidth: 150
}],
renderTo: Ext.getBody().dom,
id: 'd1'
});
this.add(datepickerfrom);
this.add(
{
xtype: 'rallychart',
height: 400,
width: 800,
id: 'chart1',
itemId: 'chart1',
chartConfig: chartConfig,
renderTo: Ext.getBody().dom
}
);
button2 = {
xtype: 'rallybutton',
text: 'Plot Graph',
handler: function() {
console.clear();
console.log("Clicking button");
// I NEED to ACCESS the CHART HERE or EVEN the TEXTFIELD DATA HERE
},
callback: function(){
}
};
this.add(button2);
ID로 추가 할 수도 있습니다. 가능하지 않습니까? 그래야만 고유해야합니다. –