Telerik
Skip Navigation LinksHome / Community / Forums / WPF > Chart > Highlighting an item on a chart

Not answered Highlighting an item on a chart

Feed from this thread
  • Sunandini avatar

    Posted on May 10, 2009 (permalink)

    I have a WPF application with a Line chart.

    I have a bunch of things that I cannot figure out how to do...
    (1) When I user selects a particular value (in another control), which can be used to identify a particular data point in my chart, I want to be able to "highlight" that point on my chart. Is it possible to do that?
    (2) Is it possible to make the circle which represents each data item bigger?
    (3) When I add more data to the dataseries, the distance between two points on the X Axis keeps shrinking. Is it possible to keep that distance constant and scroll horizontally instead?

    Any help with this is greatly appreciated.

    Thanks,
    -Sunandini


    Reply

  • Telerik Admin admin's avatar

    Posted on May 13, 2009 (permalink)

    Hi Sunandini,

    Onto your questions:

    • This functionality is not supported by the control. We will forward your inquiry to our devteam for further consideration.
    • We assume you are talking about the point mark visual element present in series like Line, Spline, Area, etc. You can achieve the desired functionality by specifying a custom style for the point mark like this via the SeriesDefinition.PointMarkItemStyle property:

    XAML
    <Window x:Class="WpfApplication3.Window1" 
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
        xmlns:control="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Charting" 
        xmlns:chart="clr-namespace:Telerik.Windows.Controls.Charting;assembly=Telerik.Windows.Controls.Charting" 
        Title="Window1"
        <Grid x:Name="GridLayout" Background="DarkGray"
            <Grid.Resources> 
                <Style x:Key="CustomStyle" TargetType="chart:PointMark"
                    <Setter Property="Size" Value="15" /> 
                </Style> 
            </Grid.Resources> 
             
            <control:RadChart x:Name="RadChart1" /> 
     
        </Grid> 
    </Window> 
     

    C#
    DataSeries series = new DataSeries(); 
    series.Definition = new LineSeriesDefinition(); 
    series.Definition.PointMarkItemStyle = GridLayout.Resources["CustomStyle"as Style; 
     
    series.Add(new DataPoint(40)); 
    series.Add(new DataPoint(21)); 
    series.Add(new DataPoint(30)); 
    series.Add(new DataPoint(41)); 
    series.Add(new DataPoint(60)); 
    series.Add(new DataPoint(21)); 
     
    RadChart1.DefaultView.ChartArea.DataSeries.Add(series); 

    • Unfortunately the current version of the control does not provide scrolling support. We have logged this in our TODO list and we will try to implement it for one of the future releases later this year.


    Kind regards,
    Manuel
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.

    Reply

Back to Top

Skip Navigation LinksHome / Community / Forums / WPF > Chart > Highlighting an item on a chart
Related resourses for "Highlighting an item on a chart"

WPF Chart Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  ]

Powered by Sitefinity ASP.NET CMS

Contact Us | Site Feedback | Terms of Use | Privacy Policy
Copyright © 2002-2010 Telerik. All rights reserved.