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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

controlling the visibility of a chart series adorner in xaml based on each datapoint

Thread ID:





97483 Dec 1,2010 04:00 PM UTC Dec 6,2010 08:45 AM UTC WPF 3
Tags: Chart
ab ba
Asked On December 1, 2010 04:00 PM UTC

I'd like to know if something like this is possible

Visible="{Binding Path=DataPoint.Tag.MyBooleanField}"
Symbol="Diamond" SymbolInterior="Crimson"
SymbolHeight="30" SymbolWidth="30"/>

I've simplified it a bit. I am guessing in real life I might need to use a converter.

My main question is: is it possible to show/hide the ChartAdornmentInfo based on a value within each DataPoint itself (such as 'MyBooleanField'

ab ba
Replied On December 2, 2010 09:13 AM UTC

I noticed there is something called 'Annotation Shapes'... would it make any kind of difference to use those instead? are Annotation Shapes meant to be used when you need to control the appearance of each Data Point in the series?

ab ba
Replied On December 3, 2010 08:11 AM UTC

there is probably a built-in way to do this but as I couldn't figure it out I ended up just making a template and then adding my own converter into the Visibility property of my template like this:

(note the AdornmentLabelTemplate is what worked in the end... but I wanted to do the same with the SymbolTemplate but never got that to work)

ConnectorTemplate="{StaticResource ConnectorTemplate}"
LabelTemplate="{StaticResource AdornmentLabelTemplate}"
SymbolTemplate="{StaticResource AdornmentSymbolTemplate}"/>

[this worked]

Visibility="{Binding Converter={StaticResource AdornmentLabelTemplateVisibilityConverter}}">

[this didn't work]

Sujitha S [Syncfusion]
Replied On December 6, 2010 08:45 AM UTC

Hi Ab ba,

Thanks for your interest in Syncfusion product.

We have attached a simple sample to satisfy your requirement.

In the sample, I have used VisibilityConverter to set the visibility for the AdornmentLabelTemplate based on the DataPoint.

please find the attached sample and let me know, if it helps.

Sujitha S



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon