This is a migrated thread and some comments may be shown as answers.

Hiding a specific DataPoint u

1 Answer 44 Views
Chart
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Bardi
Top achievements
Rank 1
Bardi asked on 29 Dec 2013, 06:58 AM
Hi there,

I was wondering whether it was possible to hide specific DataPoints on an (AreaSeries) chart? In my particular case, I do not want my chart's first DataPoint's ellipsis to appear on it.

This is the code for the ellipsis that appears for each DataPoint:

<chart:AreaSeries.PointTemplate>
    <DataTemplate>
            <Ellipse Width="16" Height="16" Stroke="{StaticResource ResourceKey=PhoneBorderBrush}" StrokeThickness="3" Fill="{Binding DataItem.Colour}" Visibility="{Binding DataItem.Visibility}"/>
    </DataTemplate>
</chart:AreaSeries.PointTemplate>

The value of DataItem.Visibility is set to "Collapsed" for the first data point and "Visible" for all the others. However, it appears even if the value of just one point's visibility is set to "Collapsed", all others will be hidden too. On the other hand, the binded "Fill" colour set for each data point is represented correctly i.e. if one has a different Fill colour value to all others, this doesn't result in the colour of all to be set to the same colour.

Any guidance here would be much appreciated.

Bardi

1 Answer, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 02 Jan 2014, 12:57 PM
Hi Bardi,

Thank you for your question.

The size of all data points is determined by the first data point and this is why if it is collapsed you don't see the others. If you need to hide the first point, you can set its Opacity to 0 instead. This way the size will be correctly calculated and the first point will not be visible.

Let me know if you need further assistance.

Regards,
Todor
Telerik
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
Tags
Chart
Asked by
Bardi
Top achievements
Rank 1
Answers by
Todor
Telerik team
Share this question
or