This is a migrated thread and some comments may be shown as answers.

create a horizontal line

3 Answers 539 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Rodrigo
Top achievements
Rank 1
Rodrigo asked on 29 Feb 2012, 08:17 PM
hello

I put a red line atravies lines and also the name of the columns with a name and not a number as can be done from the source code, is a report.

attached image

3 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 01 Mar 2012, 10:19 AM
Hello,

You can use the DataLabelsColumn Property to set the X-axis labels to a dataColumn from the data source. If you are building the series dynamically then check the following snippet:

//have to set this to false in order to be able to build your own label collection
chart3.PlotArea.XAxis.AutoScale = false;
chart3.PlotArea.XAxis.Items.Clear();
//where you are building your series
foreach(dataRow in myDataSourcee)
{
    Series[i].Add(new Item);
    ...
    myChart.PlotArea.XAxis.Items.Add(new Charting.ChartAxisItem("Label1"));               
}

You can also review the How Do I add Axis Labels Programmatically help article.

If you goal is to have both the number of the item and a text label separated with a horizontal line, then this is not possible.

Kind regards,
Steve
the Telerik team
NEW in Q1'12: Telerik Report Designer (Beta) for ad-hoc report creation. Download as part of Telerik Reporting Q1 2012. For questions and feedback, use the new Telerik Report Designer Forum.
0
Rodrigo
Top achievements
Rank 1
answered on 01 Mar 2012, 11:35 AM
thanks for this and for the red horizontal line?
0
Steve
Telerik team
answered on 01 Mar 2012, 12:46 PM
Hello Rodrigo,

We already covered this in our previous post: "If you goal is to have both the number of the item and a text label separated with a horizontal line, then this is not possible."

Regards,
Steve
the Telerik team
NEW in Q1'12: Telerik Report Designer (Beta) for ad-hoc report creation. Download as part of Telerik Reporting Q1 2012. For questions and feedback, use the new Telerik Report Designer Forum.
Tags
General Discussions
Asked by
Rodrigo
Top achievements
Rank 1
Answers by
Steve
Telerik team
Rodrigo
Top achievements
Rank 1
Share this question
or