Point Shapes in Line Chart

Thread is closed for posting
8 posts, 0 answers
  1. Pete
    Pete avatar
    31 posts
    Member since:
    May 2008

    Posted 07 May 2008 Link to this post

    Hi, is it possible to change the shape of the points in a line chart, so that for example we could have a star instead of a circle, if so how is this achieved ?

    Thanks a lot,

    Pete.
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 07 May 2008 Link to this post

    Hi Pete,

    Go through the following forum links.

    Styling Chart Elements
    Custom Appearance Properties

    Shinu.
  3. Pete
    Pete avatar
    31 posts
    Member since:
    May 2008

    Posted 13 May 2008 Link to this post

    Hi, these forums don't show me how to change an individual point depending on a value, is this possible

    ie ,

    if (double.Parse(results.Rows[i]["ObservationValue"].ToString()) > 2)

    {

    RRChartSeries1.Items[i].ActiveRegion.Tooltip =

    "Too HIGH";
    RRChartSeries1.Items[i].Appearance.FillStyle.MainColor = System.Drawing.
    Color.Red;

    }

    and I want to set a different point shape depending on this value being true ?

  4. Giuseppe
    Admin
    Giuseppe avatar
    2363 posts

    Posted 14 May 2008 Link to this post

    Hello Pete,

    Unfortunately you cannot set different point marks for the line series items depending on their value -- you can choose a point mark figure for the whole series from the predefined values (Cross, Diamond, Circle, Rectangle, Star3, Star4, Star5, Star6) and set it like this:

    <rad:RadChart ID="RadChart1" runat="server"
        <Series> 
            <rad:ChartSeries DataYColumn="Value" Type="Line"
                <Appearance> 
                    <PointMark Figure="Cross" Visible="True"
                        <FillStyle FillType="Solid" MainColor="Yellow"
                        </FillStyle> 
                    </PointMark> 
                </Appearance> 
            </rad:ChartSeries> 
        </Series> 
        <PlotArea> 
            <YAxis AxisMode="extended"
            </YAxis> 
        </PlotArea> 
    </rad:RadChart> 



    Regards,
    Manuel
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  5. Pete
    Pete avatar
    31 posts
    Member since:
    May 2008

    Posted 14 May 2008 Link to this post

    Thanks for the fast reply. I will find another way of doing this.
  6. Chris
    Chris avatar
    11 posts
    Member since:
    Dec 2004

    Posted 08 Mar 2009 Link to this post

    How i can activate the predefined point shapes using vb.net code? In the manual i cannot find any informations ...

    thanks chris
  7. Chris
    Chris avatar
    11 posts
    Member since:
    Dec 2004

    Posted 08 Mar 2009 Link to this post


  8. Giuseppe
    Admin
    Giuseppe avatar
    2363 posts

    Posted 10 Mar 2009 Link to this post

    Hello Chris,

    Here is a sample VB.NET code snippet to get you started:

        Protected Sub Page_Load(ByVal sender As ObjectByVal e As System.EventArgs) Handles Me.Load 
     
            Dim series As New ChartSeries() 
     
            series.Type = ChartSeriesType.Line 
     
            series.AddItem(5) 
            series.AddItem(11) 
            series.AddItem(15) 
            series.AddItem(11) 
     
            series.Appearance.PointMark.Figure = Telerik.Charting.Styles.DefaultFigures.Diamond 
            series.Appearance.PointMark.Visible = True 
            series.Appearance.PointMark.FillStyle.MainColor = Drawing.Color.Red 
            series.Appearance.PointMark.FillStyle.FillType = Styles.FillType.Solid 
     
            RadChart1.Series.Add(series) 
        End Sub 


    Hope this helps.


    Sincerely yours,
    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.
Back to Top