영어로 설명하기가 어렵습니다. 현재 아래 그림과 같이 차트를 만들었습니다. 이 코드 C# 빠른 라인 차트
:public void CreateChart(DataTable chartTable ,string serieName)
{
var chartArea = new ChartArea();
chartArea.AxisX.LabelStyle.Format = "dd/MM/yyy";
chartArea.AxisX.MajorGrid.LineColor = Color.LightGray;
chartArea.AxisY.MajorGrid.LineColor = Color.LightGray;
chartArea.AxisX.LabelStyle.Font = new Font("Consolas", 6);
chartArea.AxisY.LabelStyle.Font = new Font("Consolas", 6);
chart1.ChartAreas.Add(chartArea);
var series = new Series();
series.Name = "TEMP_STACK_BOILER_1";
series.ChartType = SeriesChartType.FastLine;
series.XValueType = ChartValueType.DateTime;
series.YValueType = ChartValueType.Double;
chart1.Series.Add(series);
int lastrow = chartTable.Rows.Count - 4;
string[] xval = new string[lastrow];
int[] yval = new int[lastrow];
// bind the datapoints
chart1.ChartAreas[0].AxisY.Maximum = 1000;
chart1.ChartAreas[0].AxisY.Minimum = 0;
for (int i = 0; i < lastrow; i++)
{
xval[i] = chartTable.Rows[i][1].ToString() + "\r\n" +chartTable.Rows[i][0].ToString() ;
yval[i] = Convert.ToInt32(chartTable.Rows[i][serieName]);
}
chart1.Series[serieName].Points.DataBindXY(xval, yval);
chart1.Invalidate();
}
는하지만 나는 그것이라는 것을 모르는 그림 의 설명에 Yvalue을 표시합니다. 내가 구글에서 검색을 시도하지만
여전히 그것을 할 수 없습니다 : 여기
내가 원하는 차트입니다 (아래 그림 참조). 나쁜 영어로 정말 유감입니다.누구든지 나를 도울 수 있기를 바랍니다.
[이] 위치에있는 모양 (http://stackoverflow.com/questions/13839359/display-values-on-bars-of-a-bar-chart-in-asp-net을) –
정말 고마워요, 몽 주 –