Showing legend in charts with series

Hello,
I have a problem in showing a legend into a charts with series. I have 2 series so I need to show 2 Markers but when create the legend object, it creates as many markers as the number of values. What I’m doing wrong, I can’t find anything on the documentation…

My code is the following:

{ 
											  header: DATA_LANG.chartPanel, 
											  headerAlt: DATA_LANG.chartPanelClosed,
											  body: { 
											  view: 'chart', 
											  type: 'spline',  
											  padding:{
		  											bottom: 60,
                  									left:0,
                  									right:0
												}, 
											  xAxis: { title: '<h2>'+DATA_LANG.chartXTitle+'</h2>', template: '#DIA#', lines: false},
											  yAxis: { title: '<h2>'+DATA_LANG.chartYTitle+'</h2>' , lines: false, template: ' '}, 
											  id: 'ewmon_chart_main_oks',
											  series:[
											  	{ 
													value:outgoingString(),
													label:outgoingString(),
													item:{
														borderColor: "#003399",
														color: "#ffffff"
													},
													line:{
														color:"#003399",
														width:4
													},
												},
												{ 
													value:incomingString(),
													label:incomingString(),
													item:{
														borderColor: "#66cc33",
														color: "#ffffff"
													},
													line:{
														color:"#66cc33",
														width:4
													},
												}],
												legend:{
														width: 75,
														align:"right",
														valign:top,
														layout:'y',
														marker:{
															type:"square",
															width:15
														},
														template:"???"
													},	   
                                              datatype: 'json'
											  }

Thanks in advance for your help

Hello,

you need to define “values” array in legend configuration. Please check the sample

dhtmlxTouch/samples/technical/chart/02_types.html (see configuration for line and bar charts)