We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

default Segmet in the ColumnSeries

is there a way to select a default Segmet  in the ColumnSeries
for exemple when the chart is Loaded the last segment is already selected

5 Replies

SS Suresh S Syncfusion Team April 4, 2014 01:34 PM UTC

Hi Ahmad,

Thank you for using syncfusion products,

We have analyzed the requirement and currently we don’t have a support for default segment selection at load time, however we have achieved this requirement in work around manner, please find the sample in the below location,

Please let us know if you have any further assistant.


Suresh S.

Attachment: ColumnChart_29d3d9a5.zip

AH ahmad0101 April 5, 2014 01:25 AM UTC

Thanks For your Supports
Its works fine

Howerever when i try to change the  SegmentSelectedIndex programmatically
i get a System.NullReferenceException

SS Suresh S Syncfusion Team April 7, 2014 10:27 AM UTC

Hi Ahmad,

Sorry about the inconvenience caused.

We have analyzed the reported issue with our sample, but we are unable to reproduce the issue. Could you please revert us by modifying the sample based on your application along with the replication procedure or is it possible for you to share you stack trace details with us?

This would be helpful for us to serve you.


Suresh S.

AH ahmad0101 April 7, 2014 10:31 AM UTC

Hi here is my code :
            <local:CustomSelectableSeries  x:Name="testChart"  SegmentSelectionBrush="Aqua" EnableAnimation="True" Palette="None" ItemsSource="{Binding CategoricalDatas}" XBindingPath="Category" YBindingPath="Value" Label="First" ShowTooltip="False" chart:ChartTooltip.EnableAnimation="True">

when i try
testChart.SegmentSelectedIndex = 2;

it gives me the exception

SS Suresh S Syncfusion Team April 7, 2014 12:56 PM UTC

Hi Ahmad,


Sorry for the inconvenience caused.

We have analyzed the stated issue with your code snippet. This issue can be fixed by accessing series from Chart as in below code snippet. Please let us know if you request further assistance on this.


Code snippet [C#]:

(this.columnChart.Series[0] as CustomSelectableSeries).SegmentSelectedIndex = 2;



Suresh S.

Live Chat Icon For mobile
Up arrow icon