It's very difficult for me to explain in English. Currently, I have created chart as the below picture.
with this code:
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();
}
But I want to display Yvalue as the description in the picture I don't know what is it called. (please see the below picture )
Here is the Chart which I want:
I tried to search on google but still can't do it. I'm really sorry for my bad English .
Hope anyone can help me.