tags:

views:

171

answers:

0

I'm using microsoft Chart control in my web form. I want points(0, 0) should be bold on the chart. My code is as follows:

 DataTable dt = collection.ToDataTable();
        //   Chart1.Series[0].Points.DataBind(collection, "Price", "OverallQuality", "Label=HotelName");

        for (int i = 0; i < dt.Rows.Count; i++)
        {

            Chart1.Series.Add("series" + i);
            Chart1.Series["series" + i].ChartType = SeriesChartType.Point;
         //   Chart1.Series["series" + i].Points.AddXY(double.Parse(dt.Rows[i]["Price"].ToString()), double.Parse(dt.Rows[i]["OverallQuality"].ToString()));
            Chart1.Series["series" + i].Points.AddXY(double.Parse(dt.Rows[i]["OverallQuality"].ToString()), double.Parse(dt.Rows[i]["Price"].ToString()));

            Chart1.Series["series" + i].MarkerSize = 10;
            Chart1.Series["series" + i].LegendText = dt.Rows[i]["HotelName"].ToString();
        }
     //   Chart1.ChartAreas[0].AxisX.Title = "Price";
     //   Chart1.ChartAreas[0].AxisY.Title = "Quality";
        Chart1.ChartAreas[0].AxisX.Title = "Quality";
           Chart1.ChartAreas[0].AxisY.Title = "Price";

        Chart1.ChartAreas[0].AxisX.Maximum = 10;
        Chart1.ChartAreas[0].AxisX.Minimum = -10;
        Chart1.ChartAreas[0].AxisX.Interval = 1;

        Chart1.ChartAreas[0].AxisY.Maximum = 10;
        Chart1.ChartAreas[0].AxisY.Minimum = -10;
        Chart1.ChartAreas[0].AxisY.Interval = 1;

        Chart1.ChartAreas[0].AxisX.MajorGrid.LineColor = System.Drawing.Color.LightGray;
        Chart1.ChartAreas[0].AxisY.MajorGrid.LineColor = System.Drawing.Color.LightGray;
    }