Todd Hile-Hoffer
Top achievements
Rank 2
Todd Hile-Hoffer
asked on 14 Sep 2009, 05:45 PM
I have a radchart with a default type of spline. The issue is that user can't tell the beginning and end of the line. I have tried all the different end caps but because they are the same color they just are not obvious.
I couldn't figure out how to use the custom endCap or StartCap and I am looking for a solution or alternative such as plotting two points.
3 Answers, 1 is accepted
0
Hi Todd Hile-Hoffer,
Unfortunately, the caps cannot be customized at the moment. A possible workaround would be to use the pointmarks, showing only the first and the last one. Here is an example:
All the best,
Ves
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Unfortunately, the caps cannot be customized at the moment. A possible workaround would be to use the pointmarks, showing only the first and the last one. Here is an example:
<telerik:RadChart ID="RadChart1" runat="server"> |
<Series> |
<telerik:ChartSeries Name="Series 1" Type="Spline" YAxisType="Primary"> |
<Appearance> |
<PointMark Visible="true"> |
</PointMark> |
</Appearance> |
<Items> |
<telerik:ChartSeriesItem Name="Item 1" YValue="3"> |
<PointAppearance Figure="Cross" Visible="True"> |
<FillStyle FillType="Solid" MainColor="Red" SecondColor="Red"> |
</FillStyle> |
</PointAppearance> |
</telerik:ChartSeriesItem> |
<telerik:ChartSeriesItem Name="Item 2" YValue="3"> |
</telerik:ChartSeriesItem> |
<telerik:ChartSeriesItem Name="Item 3" YValue="4"> |
</telerik:ChartSeriesItem> |
<telerik:ChartSeriesItem Name="Item 4" YValue="2"> |
<PointAppearance Figure="Figure1" Visible="True"> |
<FillStyle FillType="Solid" MainColor="Green"> |
</FillStyle> |
</PointAppearance> |
</telerik:ChartSeriesItem> |
</Items> |
</telerik:ChartSeries> |
</Series> |
<CustomFigures> |
<telerik:CustomFigure Description="20,20,273,211:19,19,False,0,0,0,0,0:293,20,False,0,0,0,0,0:159,127,False,0,0,0,0,0:20,231,False,0,0,0,0,0:" |
Name="Figure1" /> |
</CustomFigures> |
</telerik:RadChart> |
All the best,
Ves
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Todd Hile-Hoffer
Top achievements
Rank 2
answered on 17 Sep 2009, 02:30 PM
Thanks for the help, btw. I tried to add the following code but no point appeared. Am I missing something?
SessionItems.endTime = (DateTime)this.RadDateTimePicker1.DbSelectedDate; |
DataTable dt = Data.HistoricalLeakWarn_3M(SessionItems.endTime); |
this.RadChart3M.DataSource = dt; |
this.RadChart3M.DataBind(); |
Telerik.Charting.ChartSeriesItem startPoint = new Telerik.Charting.ChartSeriesItem(); |
startPoint.XValue = double.Parse(dt.Rows[0][0].ToString()); |
startPoint.YValue = double.Parse(dt.Rows[0][1].ToString()); |
startPoint.PointAppearance.Figure = "Cross"; |
startPoint.PointAppearance.Visible = true; |
startPoint.PointAppearance.FillStyle.FillType = Telerik.Charting.Styles.FillType.Solid; |
startPoint.PointAppearance.FillStyle.MainColor = System.Drawing.Color.Green; |
startPoint.PointAppearance.FillStyle.SecondColor = System.Drawing.Color.Green; |
this.RadChart3M.Series[0].Items.Add(startPoint); |
0
Hi Todd,
After the call to DataBind method the chart series and items are created, so you would not need to create new ones - just retrieve the existing series and items and modify them:
Hope this helps.
All the best,
Ves
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
After the call to DataBind method the chart series and items are created, so you would not need to create new ones - just retrieve the existing series and items and modify them:
RadChart1.DataBind(); |
ChartSeries series = RadChart1.Series[0]; |
series.Appearance.PointMark.Visible = true; |
series.Type = ChartSeriesType.Spline; |
ChartSeriesItem startPoint = series[0]; |
startPoint.PointAppearance.Figure = "Cross"; |
startPoint.PointAppearance.Visible = true; |
startPoint.PointAppearance.FillStyle.FillType = Telerik.Charting.Styles.FillType.Solid; |
startPoint.PointAppearance.FillStyle.MainColor = System.Drawing.Color.Green; |
startPoint.PointAppearance.FillStyle.SecondColor = System.Drawing.Color.Green; |
Hope this helps.
All the best,
Ves
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.