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

DataPoint Visibility

3 Answers 61 Views
Chart
This is a migrated thread and some comments may be shown as answers.
alizator
Top achievements
Rank 1
alizator asked on 17 Feb 2012, 01:29 PM
Hello,

Is there a posibility to hide a datapoint based on some predefined rules? Like don't display values below "X" value?

For a particulary scenario where the value is empty there is the posibility to choose from EmptyPointBehavior.Zero, EmptyPointBehavior.Gap, EmptyPointBehavior.Zero. But for BarSeriesDefinition the gap behaviour is the same like the Drop behaviour. A good example is the the Drop behaviour for LineSeriesDefinition where an empty value is not replaced with blanks spaces.

Thank You!

3 Answers, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 22 Feb 2012, 09:12 AM
Hello,

One possible option in this case would be to manipulate the underlying datasource directly - either set null values, or remove the entries. The reason for this is twofold. On one hand, manipulating the visual elements will not bring the desired results. And second, since the chart is correlated to the underlying data, it is best to preserve this correlation. Thus, you can use a separate datalayer, to hold all "valid" values, and bind the chart to it.
I hope that this is a feasible approach for you.

Greetings,
Yavor
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
alizator
Top achievements
Rank 1
answered on 22 Feb 2012, 09:35 AM
Hello,

Ok I modified my data and all my values that are below "X" value will be equal to NULL. Is there a posibility that the DROP behaviour in BarSeriesDefinition case to acctually drop the series items and not to have a behaviour like in the GAP case?

Thanks
0
Yavor
Telerik team
answered on 22 Feb 2012, 01:56 PM
Hi,

This behavior, at present, is also dependent on the type of series, as demonstrated here:

http://demos.telerik.com/silverlight/#Chart/EmptyValues

This behaviour would not be in line with your requirements when using a bar chart. In this case, you could remove the entries from the underlying datasource.

Greetings,
Yavor
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
Chart
Asked by
alizator
Top achievements
Rank 1
Answers by
Yavor
Telerik team
alizator
Top achievements
Rank 1
Share this question
or