Hi,
In the chart, I have to show the chart data table. Using Data table property I make it happen. Please see in attachment. Now, problem is, there are two series, which needs to be show n legends and on the chart but don't want to show those in chart table. (in my case, these are Median Score and Trend Line).
I use following code to make this chart:
Is there any way to make it happen.
JAMIL
In the chart, I have to show the chart data table. Using Data table property I make it happen. Please see in attachment. Now, problem is, there are two series, which needs to be show n legends and on the chart but don't want to show those in chart table. (in my case, these are Median Score and Trend Line).
I use following code to make this chart:
Chart1.PlotArea.XAxis.DataLabelsColumn =
"DateString"
;
Chart1.PlotArea.YAxis.AutoScale =
false
;
Chart1.PlotArea.YAxis.Step = 100;
Chart1.PlotArea.YAxis.MinValue =
double
.Parse(dsData.Tables[0].Rows[0][
"MinValue"
].ToString());
Chart1.PlotArea.YAxis.MaxValue =
double
.Parse(dsData.Tables[0].Rows[0][
"MaxValue"
].ToString());
Chart1.Series.Clear();
foreach
(DataColumn column
in
dsData.Tables[0].Columns)
{
if
(column.ColumnName.Contains(
"Series"
))
{
ChartSeries series =
new
ChartSeries(column.ColumnName, ChartSeriesType.Point);
series.DefaultLabelValue =
"#Y"
;
series.DataYColumn = column.ColumnName;
rcCreditSummary.Series.Add(series);
}
}
ChartSeries series1 =
new
ChartSeries(
"Median Score"
, ChartSeriesType.Line);
series1.DefaultLabelValue =
"#Y"
;
series1.DataYColumn =
"AvgScore"
;
series1.Visible =
true
;
series1.Appearance.LabelAppearance.Visible =
false
;
Chart1.Series.Add(series1);
ChartSeries trendLineSeries =
new
ChartSeries(
"Trend Line"
, ChartSeriesType.Line);
trendLineSeries.DefaultLabelValue =
"#Y"
;
trendLineSeries.DataYColumn =
"TrendLineScore"
;
trendLineSeries.Visible =
true
;
trendLineSeries.Appearance.LabelAppearance.Visible =
false
;
Chart1.Series.Add(trendLineSeries);
Chart1.DataSource = dsData.Tables[0];
Chart1.IntelligentLabelsEnabled =
false
;
Chart1.DataBind();
Is there any way to make it happen.
JAMIL