Issue creating Data Marker on Line Series

Hi,

I have an issue with inserting the data marker property into my line series.

I create the line series in a for loop. I able to set all the properties of the line series except the data marker.

Is there any way that I could be able to insert data marker property into it with the current method I'm doing right now.

The code below is a sample code of the segment that used to create the line series.

for (int i = 0; i < columnsField.Count - 1; i++)
                    {

                       chart.Series.Add(new ColumnSeries()
                        {
                            ItemsSource = ticketHeaders,
                            XBindingPath = columnsField[0],
                            YBindingPath = columnsField[i + 1],
                            Label = header[i],
                            TooltipEnabled = true,
                            //DataMarker.ShowLabel = true,
                            EnableAnimation = true
                        });

                    }


3 Replies

DV Divya Venkatesan Syncfusion Team June 26, 2018 09:29 AM UTC

Hi Ho Wai Loon, 
 
Thanks for using Syncfusion products. 
 
You can enable the datamarker for each series as shown in the below code snippet. 
 
Code snippet[C#]: 
for (int i = 0; i < columnsField.Count - 1; i++) 
{ 
 
    chart.Series.Add(new ColumnSeries() 
    { 
        ItemsSource = ticketHeaders, 
        XBindingPath = columnsField[0], 
        YBindingPath = columnsField[i + 1], 
        Label = header[i], 
        TooltipEnabled = true, 
        EnableAnimation = true 
    }); 
    chart.Series[i].DataMarker.ShowLabel = true; 
} 
 
Please refer below user documentation for more details about DataMarker.  
 
 
Please let us know if you need any further assistance. 
 
Regards, 
Divya Venkatesan 
 



HW Ho Wai Loon June 27, 2018 03:48 AM UTC

Hi Divya,

Thank you so much for the help. 






MK Muneesh Kumar G Syncfusion Team June 28, 2018 07:25 AM UTC

Hi Ho Wai Loon,  
  
Thanks for the update. 
  
Please let us know if you need any further assistance. 
  
Thanks, 
Muneesh Kumar G. 


Loader.
Up arrow icon