hi all,
I have created a dynamic box plot chart and it was positioned at the center of the page. I would like to shift the chart 5px to the left.
This is the output of my chart currently:
http://i.stack.imgur.com/fbUPW.jpg</a>[
^]
I want to shift the chart slightly to the left, like 5px to the left. Does anyone has any suggestion on how this can be achieved?
I have tried
Chart1.Style["right"] = 5.ToString() + "px"; but the chart still stay at the same position.
This is my codes to create the chart:
Chart Chart1 = new Chart();
Chart1 .DataSource = dt;
System.Web.UI.HtmlControls.HtmlGenericControl Chart1_DIV = new System.Web.UI.HtmlControls.HtmlGenericControl("DIV");
Chart1_DIV.ID = "LVL1RISKCHART_DIV";
Chart1_DIV.Style.Add(HtmlTextWriterStyle.TextAlign, "center");
Chart1_DIV.Style.Add(HtmlTextWriterStyle.Width, "100%");
Chart1.Series.Add(new Series());
Chart1.Series[0].ChartType = SeriesChartType.BoxPlot;
List<object> List1 = dt.AsEnumerable().ToList<object>();
foreach (DataRow row in dt.Rows)
{
Chart1.Series[0].Points.AddXY(row["DESC"], new object[] { row["MIN"], row["MAX"], row["25TH_PERCENTILE"], row["75TH_PERCENTILE"], row["50TH_PERCENTILE"], row["AVG"] });
ChartArea ca = new ChartArea();
ca.AxisX = new Axis();
ca.AxisY = new Axis();
Chart1.ChartAreas.Add(ca);
Chart1.DataBind();
Chart1.Visible = true;
Any help is greatly appreciated, thanks.