I am having two questions.
1. I am developing line charts. I have two chart series items. One of the chart series style is Line another one is Dashed line. I want the legend appearance exactly like how the series item is appeared in the chart. (like ----------- and - - - - - - )
2. Chart series labeltext values are overlapping. I want to keep the labeltext value at the end of series item. I have marked in the attached image.
6 Answers, 1 is accepted
For my second query, i applied below code. it is working fine as expected. but both the series having similar values, it is overlapping.
csi.Label.Appearance.Position.AlignedPosition = Telerik.Charting.Styles.
csi.Label.Appearance.LabelLocation = Telerik.Charting.Styles.
You can try to use the IntelligentLabels feature of RadChart.
the Telerik team
I applied that IntelligentLabel property. It is working fine.
Still i could not find solution for my first question.
You can handle the BeforeLayout or PrePaint events of RadChart and customize the Marker.Appearance.Figure of the legend items to any of the predefined figures (unfortunately there is no predefined dashed line figure):
What I can suggest you is to set the Figure of the LegendItem Marker to Rectangle and set custom Height and Width for it so that it looks like a Line:
the Telerik team
I currently have a graph that is displaying a number of series from different publishers and different data sources. I am formatting each publisher to be a different line style (solid, dot, dash-dot), while each line is a different color. I can format the legend markers to look like solid lines with the rectangle, but am not able to show the dashed or dash-dot styles. The only way I can currently think to solve this is to upload a picture for each line style and color and add that to the image fill style (which would be a lot of work on the front and not maintainable when I need to change the color scheme).
I am afraid that the feature you require hasn't been implemented yet. Since the majority of our development efforts moved to our newer charting solution (RadHtmlChart) I would recommend submitting a new feature request for the newer control as it is more likely to be implemented in the foreseeable future.