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

Hide some PointMarks

1 Answer 32 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Dave
Top achievements
Rank 1
Dave asked on 18 Nov 2010, 10:44 PM
I have a line graph with 50 points on it but I only want to display a 'point mark' for some items.  I can get all the points to show or no points to show, but I have not found a way to get a selected number to show.  I have tried setting the .visible property of each individual ChartSeriesItem.PointAppearance that as I add to the series, no luck...  I also tried setting the ChartSeriesItem.PointAppearance.Dimensions as well as the ChartSeriesItem.Appearance.PointDimentions but there doesn't seem to be any way to make some points different than others on the same line.  Am I missing something?

1 Answer, 1 is accepted

Sort by
0
Evgenia
Telerik team
answered on 23 Nov 2010, 11:48 AM
Hi Dave,

As there is no way to loop through Line's PointMarks and turn off visibility of some of them I would suggest  this workaround:
Turn on visibility of all PointMarks and then by indexing them you can control the dimensions of the indexed PointMark. You mentioned this in your post but you should turn off AutoSize property of the current PointMark to be able to change it's size. Here is how you can make the first PointMark invisible for example:
RadChart1.Series[0].Appearance.PointMark.Visible = true;
       RadChart1.Series[0].Appearance.PointMark.FillStyle.FillType = Telerik.Charting.Styles.FillType.Solid;
       RadChart1.Series[0].Appearance.PointMark.FillStyle.MainColor = System.Drawing.Color.Blue;
       RadChart1.Series[0].Items[0].PointAppearance.Dimensions.AutoSize = false;
       RadChart1.Series[0].Items[0].PointAppearance.Dimensions.Height = 0;
       RadChart1.Series[0].Items[0].PointAppearance.Dimensions.Width = 0;
Also have in mind that all PointMarks are invisible and transparent by default.That's why I set values to FillStyle.MainColor and Visible properties.

All the best,
Evgenia
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
Chart (Obsolete)
Asked by
Dave
Top achievements
Rank 1
Answers by
Evgenia
Telerik team
Share this question
or