// 2차원... 데이터..
private void MakeChart(DataTable dtResult)
{
Chart1.Reset();
Chart1.Gallery = ChartFX.WebForms.Gallery.Bar;
Chart1.AllSeries.Stacked = ChartFX.WebForms.Stacked.Normal;
Chart1.Width = 670;
Chart1.Height = 440;
for (int i = 0; i < dtResult.Rows.Count; i++)
{
for (int j = 1; j < 8; j++)
{
if (dtResult.Rows[i][j].ToString() == "")
{
Chart1.Data[i, j - 1] = 0;
}
else
{
Chart1.Data[i, j - 1] = Convert.ToDouble(dtResult.Rows[i][j]);
}
}
Chart1.Series[i].Text = dtResult.Rows[i][0].ToString();
}
for (int i = 1; i < 8; i++)
{
Chart1.AxisX.Labels[i-1] = dtResult.Columns[i].ColumnName;
}
}
///////////////////////////////////////////////////////////////
// 1차원... 데이터..
private void MakeChart(DataTable dtResult)
{
Chart1.Reset();
Chart1.Gallery = ChartFX.WebForms.Gallery.Bar;
Chart1.Width = 670;
Chart1.Height = 440;
for (int i = 0; i < dtResult.Rows.Count; i++)
{
Chart1.Data[i, i] = Convert.ToDouble(dtResult.Rows[i]["ACCIDENT_COUNT"].ToString());
Chart1.AxisX.Labels[i] = dtResult.Rows[i]["KOR_SHIP_ACTION"].ToString();
Chart1.Series[i].Text = dtResult.Rows[i]["KOR_SHIP_ACTION"].ToString();
Chart1.Series[i].Volume = 100;
}
}