Hey, there. I'm working on a report which incorporates charts, and binding the data to the charts with the following method:
private void ByDateChart_NeedDataSource(object sender, System.EventArgs e)
{
Telerik.Reporting.Processing.Chart chart = sender as Telerik.Reporting.Processing.Chart;
DataRowView dataItem = (DataRowView)chart.DataItem;
sqlDataAdapter1.Fill(dataSet);
DataView view = dataSet.Tables[0].DefaultView;
chart.DataSource = view;
ByDateChart.PlotArea.XAxis.MaxItemsCount = view.Count;
ByDateChart.PlotArea.XAxis.MaxValue = view.Count;
ByDateChart.PlotArea.XAxis.MinValue = 0;
ByDateChart.PlotArea.XAxis.AutoScale = false;
ByDateChart.PlotArea.XAxis.AutoShrink = false;
ByDateChart.PlotArea.XAxis.Clear();
bool stepLabels = view.Count > 20;
int stepSize = view.Count /20;
int index = 0;
foreach (DataRowView rowView in view)
{
if (stepLabels && (index % stepSize != 0))
{
ByDateChart.PlotArea.XAxis.AddItem(" ");
}
else
{
ByDateChart.PlotArea.XAxis.AddItem(((DateTime)(rowView["DateStamp"])).ToShortDateString());
}
index++;
}
}
My problem is that I want to get rid of the numeric label shown at the top of each bar item (it's a bar chart), but I can't seem to. Is there something obvious I'm just missing here?
private void ByDateChart_NeedDataSource(object sender, System.EventArgs e)
{
Telerik.Reporting.Processing.Chart chart = sender as Telerik.Reporting.Processing.Chart;
DataRowView dataItem = (DataRowView)chart.DataItem;
sqlDataAdapter1.Fill(dataSet);
DataView view = dataSet.Tables[0].DefaultView;
chart.DataSource = view;
ByDateChart.PlotArea.XAxis.MaxItemsCount = view.Count;
ByDateChart.PlotArea.XAxis.MaxValue = view.Count;
ByDateChart.PlotArea.XAxis.MinValue = 0;
ByDateChart.PlotArea.XAxis.AutoScale = false;
ByDateChart.PlotArea.XAxis.AutoShrink = false;
ByDateChart.PlotArea.XAxis.Clear();
bool stepLabels = view.Count > 20;
int stepSize = view.Count /20;
int index = 0;
foreach (DataRowView rowView in view)
{
if (stepLabels && (index % stepSize != 0))
{
ByDateChart.PlotArea.XAxis.AddItem(" ");
}
else
{
ByDateChart.PlotArea.XAxis.AddItem(((DateTime)(rowView["DateStamp"])).ToShortDateString());
}
index++;
}
}
My problem is that I want to get rid of the numeric label shown at the top of each bar item (it's a bar chart), but I can't seem to. Is there something obvious I'm just missing here?