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

2010_3_1326 ShowPointMarks=false doesn't work

1 Answer 32 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Yonghan
Top achievements
Rank 1
Yonghan asked on 27 Jan 2011, 04:09 AM
Hi,
I've just apply with hotfix(2010.3.1326).
The problem is ShowPointMarks always displayed enven ShowPointMarks is set false.
and point makrs position is seems strange.
see attached image.

Yonghan

1 Answer, 1 is accepted

Sort by
0
Giuseppe
Telerik team
answered on 27 Jan 2011, 01:44 PM
Hi Yonghan,

Indeed we must admit that this is a bug introduced in the latest internal build. We have forwarded it to our developers and it will be addressed for the next internal build (scheduled on Monday).

In the meantime, we can suggest you two possible workarounds if you would like to stick with the internal build binaries:

  • Besides setting SeriesDefinition.ShowPointMarks to false, set SeriesDefinition.ShowItemLabels / ShowItemToolTips  to false as well -- this will convert the line series to "fast mode" (i.e. it will not generate individual series items and consequently their point marks).
  • Alternatively you can set the ShowPointMarks declaration ta bit later in the Silverlight lifecycle and that will ensure it is executed properly:
public partial class MainPage : UserControl
{
    public MainPage()
    {
        InitializeComponent();
 
        SeriesMapping sm = new SeriesMapping();
        sm.SeriesDefinition = new LineSeriesDefinition();
        sm.ItemMappings.Add(new ItemMapping("YValue", DataPointMember.YValue));
 
        RadChart1.SeriesMappings.Add(sm);
 
        RadChart1.ItemsSource = GetData();
        RadChart1.SizeChanged += new SizeChangedEventHandler(RadChart1_SizeChanged);
    }
 
    private void RadChart1_SizeChanged(object sender, SizeChangedEventArgs e)
    {
        (RadChart1.SeriesMappings[0].SeriesDefinition as LineSeriesDefinition).ShowPointMarks = false;
    }
 
    private static List<ChartData> GetData()
    {
        var data = new List<ChartData>();
        data.Add(new ChartData() { YValue = 10 });
        data.Add(new ChartData() { YValue = 20 });
        data.Add(new ChartData() { YValue = 5 });
        data.Add(new ChartData() { YValue = 15 });
        return data;
    }
}
 
public class ChartData
{
    public double YValue
    {
        get;
        set;
    }
}

Sorry for the temporary inconvenience.


Regards,
Giuseppe
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Tags
Chart
Asked by
Yonghan
Top achievements
Rank 1
Answers by
Giuseppe
Telerik team
Share this question
or