Trouble showing the legend

Hi Syncfusion team,

i have some chart in a app to show data, everything works fine except the Legend.

i attached the code in a txt file.

Thank you in advance!

Attachment: exampleChartCode_920367f.zip

3 Replies

DD Dharanidharan Dharmasivam Syncfusion Team August 20, 2018 11:43 AM UTC

Hi Miguel, 
 
Greetings from Syncfusion. 
 
On analyzing the provided code snippet, we found that you haven’t provide name to the series, so the legends for the series were not rendered. By default series name will be displayed as legend. So if you specify the name to the series, then the legends will be rendering properly.  
 
We have prepared a sample with respect the provided code snippet and by adding the name to the series. Find the code snippet below to achieve this requirement. 
 
JS: 
 
   var chart = new ej.charts.Chart({ 
          series: [{ 
                           //Specify the series name which will be displayed in the legend 
                           name: 'Horas' 
                      }, 
                      { 
                           name: 'Ots' 
                      }], 
     }); 
 
 
 
 
Screenshot: 
 
 
Sample for reference can be find from below link. 
 
For more information in legend, kindly find the help document. 
 
Thanks, 
Dharani. 



MV Miguel Varela Rodriguez August 20, 2018 01:24 PM UTC

Thank you :)


DD Dharanidharan Dharmasivam Syncfusion Team August 21, 2018 05:02 AM UTC

Hi Miguel, 

Most welcome. Kindly get in touch with us, if you would require any further assistance. 

Thanks, 
Dharani. 


Loader.
Up arrow icon