Chart: get a field after long touch event

Hi have a chart,
generated from the following xml:

	<item id="ANI970708ASPE">
		<description>Mensajes erroneos en Entrada. Comprobar el motivo, si es corregible se retraduce el mensaje, si el mensaje está enviado mal por el origen, avisar al origen.</description>

then I created the chart:

	view: 'chart', 
	type: 'bar', 
	value: '#number#', 
	label: '#type#', 
	barWidth: 50, 
	radius: 0, 
	alpha: 1, 
	gradient: false, 
	border: 0,
	xAxis: { title: ' ', template: '#number#', lines: false},
	yAxis: { title: '', lines: false, template: ' '}, 
	id: 'ui_chart', 
	datatype: 'xml', 

In this way I show correctly the chart and when I long touch a bar I would like to show the field associated at the item. So I did the following:

	$$('ui_chart').attachEvent("onLongTouch", function(id){

but the id parameter does not contain the informations about the description, how can i get it?



onLongTouch takes an event object as a parameter. Therefore, you can use the following approach:

$$("yourChart").attachEvent("onLongTouch",function(obj){ var target =; var id = target.getAttribute("dhx_area_id"); if(id){ showDescription(id); } });

target.getAttribute(“dhx_area_id”) returns “dhx_area_id” attribute of the touched html element. A chart html item has such an attribute with item id as its value.