Getting markers on a line graph

Thread is closed for posting
2 posts, 0 answers
  1. Simon Allport
    Simon Allport avatar
    32 posts
    Member since:
    Aug 2009

    Posted 01 Mar 2011 Link to this post

    Hi,
    I have a line graph and at each point on the line graph i would like marker to be displayed next to the value. Not only that but is it also possible to have a custom marker?


    Thanks

    Simon Allport
      <telerik:RadChart ID="rcDesignCapabilities1" runat="server" DefaultType="Line" 
                AutoLayout="True" AutoTextWrap="True" SeriesOrientation="Horizontal">
            <Appearance>
                <FillStyle MainColor="White">
                </FillStyle>
                <Border Visible="False" Color="white" />
            </Appearance>
            <Series>
    <telerik:ChartSeries Name="Series 1" Type="Line">
      
      
        <Appearance>
            <FillStyle MainColor="150, 150, 150" SecondColor="194, 194, 194">
            </FillStyle>
            <Border Color="white" />
        </Appearance>
                </telerik:ChartSeries>
    <telerik:ChartSeries Name="Series 2" Type="Line">
        <Appearance>
            <FillStyle MainColor="white" SecondColor="241, 241, 241">
            </FillStyle>
            <Border Color="white" />
        </Appearance>
                </telerik:ChartSeries>
    </Series>
              
    <Legend Visible="False">
    <Appearance Dimensions-Margins="18%, 1%, 1px, 1px" Visible="False">
      
    <Border Color="white"></Border>
    </Appearance>
    </Legend>
      
            <PlotArea>
                  
                <XAxis VisibleValues="Positive" IsZeroBased="False" AutoScale="False" 
                    AutoShrink="False" MaxItemsCount="7" MaxValue="5" MinValue="1" Step="1">
                    <Appearance Color="Silver" MajorTick-Color="Silver">
                     
    <MajorGridLines Color="Silver"></MajorGridLines>
      
                    </Appearance>
                    <AxisLabel>
                        <Appearance RotationAngle="270">
                        </Appearance>
                    </AxisLabel>
                    <Items>
                        <telerik:ChartAxisItem Value="1">
                        </telerik:ChartAxisItem>
                        <telerik:ChartAxisItem Value="2">
                        </telerik:ChartAxisItem>
                        <telerik:ChartAxisItem Value="3">
                        </telerik:ChartAxisItem>
                        <telerik:ChartAxisItem Value="4">
                        </telerik:ChartAxisItem>
                        <telerik:ChartAxisItem Value="5">
                        </telerik:ChartAxisItem>
                    </Items>
                </XAxis>
                <YAxis MaxItemsCount="5" AxisMode="Extended" IsLogarithmic="True" 
                    IsZeroBased="False" LogarithmBase="5" Visible="True" 
                    VisibleValues="Positive">
                     
    <Appearance Color="Silver" MajorTick-Color="Silver" MinorTick-Color="Silver">
    <MajorGridLines Color="Silver"></MajorGridLines>
        <MinorGridLines Color="224, 224, 224" />
    </Appearance>
      
                    <AxisLabel>
                        <Appearance RotationAngle="0">
                        </Appearance>
                        <Marker Visible="True">
                        </Marker>
                    </AxisLabel>
                </YAxis>
                  
             
    <YAxis2>
    <AxisLabel>
    <Appearance RotationAngle="0"></Appearance>
      
    </AxisLabel>
    </YAxis2>
      
    <Appearance Dimensions-Margins="18%, 22%, 12%, 10%">
    <FillStyle MainColor="White" FillType="Solid" SecondColor="White"></FillStyle>
      
    <Border Color="white" Visible="False"></Border>
    </Appearance>
                  
             
            </PlotArea>
              
    <ChartTitle Visible="False">
    <Appearance Position-AlignedPosition="Top" Visible="False">
    </Appearance>
      
    <TextBlock>
    <Appearance TextProperties-Color="Gray" Border-Visible="False">
    <Border Visible="False"></Border>
        </Appearance>
    </TextBlock>
    </ChartTitle>
              
    </telerik:RadChart>
    public DataTable DesignCapabilities_1(DataTable ReportTable)
            {
                DataTable cap1dt = new DataTable();
                cap1dt.Columns.Add("ID");
                cap1dt.Columns.Add("Name");
                cap1dt.Columns.Add("Type");
                cap1dt.Columns.Add("Value");
      
      
      
                foreach (DataRow dr in ReportTable.Rows)
                {
      
      
                    object[] row1 = new object[4];
                    row1[0] = "2";
                    row1[1] = "Sample Average";
                    row1[2] = "Technical Design";
                    row1[3] = Decimal.Round(Convert.ToDecimal(dr["AvgTechnicalDesignCapabilityScore"].ToString()),2);
      
                    object[] row2 = new object[4];
                    row1[0] = "2";
                    row2[1] = "Your Company";
                    row2[2] = "Technical Design";
                    row2[3] = Decimal.Round(Convert.ToDecimal(dr["TechnicalDesignCapabilityScore"].ToString()),2);
      
      
                    object[] row3 = new object[4];
                    row3[0] = "2";
                    row3[1] = "Sample Average";
                    row3[2] = "User Focused";
                    row3[3] = Decimal.Round(Convert.ToDecimal(dr["sumUserDesignCapabilityScore"].ToString()),2);
      
                    object[] row4 = new object[4];
                    row4[0] = "2";
                    row4[1] = "Your Company";
                    row4[2] = "User Focused";
                    row4[3] = Decimal.Round(Convert.ToDecimal(dr["UserDesignCapabilityScore"].ToString()),2);
      
                    object[] row5 = new object[4];
                    row5[0] = "2";
                    row5[1] = "Sample Average";
                    row5[2] = "Promotional";
                    row5[3] = Decimal.Round(Convert.ToDecimal(dr["AvgPromotionalIdentityCapabilityScore"].ToString()),2);
      
      
                    object[] row6 = new object[4];
                    row6[0] = "2";
                    row6[1] = "Your Company";
                    row6[2] = "Promotional";
                    row6[3] = Decimal.Round(Convert.ToDecimal(dr["PromotionalIdentityCapabilityScore"].ToString()),2);
      
      
      
                    object[] row7 = new object[4];
                    row7[0] = "2";
                    row7[1] = "Sample Average";
                    row7[2] = "Strategic";
                    row7[3] = Decimal.Round(Convert.ToDecimal(dr["AvgStrategicCapabilityScore"].ToString()),2);
      
                    object[] row8 = new object[4];
                    row8[0] = "2";
                    row8[1] = "Your Company";
                    row8[2] = "Strategic";
                    row8[3] = Decimal.Round(Convert.ToDecimal(dr["StrategicCapabilityScore"].ToString()), 2);
      
      
                    cap1dt.Rows.Add(row1);
                    cap1dt.Rows.Add(row2);
                    cap1dt.Rows.Add(row3);
                    cap1dt.Rows.Add(row4);
                    cap1dt.Rows.Add(row5);
                    cap1dt.Rows.Add(row6);
                    cap1dt.Rows.Add(row7);
                    cap1dt.Rows.Add(row8);
      
                }
      
                return cap1dt;
      
            }
    DesignCompassBusiness.report rep = new DesignCompassBusiness.report();
                
              radchart1.DataSource = rep.DesignCapabilities_1(dt);
              radchart1.DataGroupColumn = "Name";
              radchart1.PlotArea.XAxis.DataLabelsColumn = "Type";
              radchart1.PlotArea.YAxis.MaxValue = 0;
              radchart1.DataBind();
  2. Vladimir Milev
    Admin
    Vladimir Milev avatar
    1061 posts

    Posted 04 Mar 2011 Link to this post

    Hi Simon Allport,

    Here are some resources which explain how to have custom point markers:
    http://www.telerik.com/help/silverlight/radchart-styling-and-appearance-styling-point-marks.html
    http://demos.telerik.com/silverlight/#Chart/CustomPointMarks

    Greetings,
    Vladimir Milev
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top