views:

60

answers:

0

Hi,

Can any one please assist me on how to display label values of potential(15,13) shown in the following image link MS Chart Image in the legend which is currently showing #VAL.

Actually not only the one point,can suggest on how to display the label values on each point in the legend.

To get the values of important,critical points i have used below code.But i am stuck in showing the middle point label values in legend.

ChrtOpenReq.DataSource = bindTable;

ChrtOpenReq.DataBind();

ChrtOpenReq.Series[ "Open"].YValueMembers = "Open";

ChrtOpenReq.Series[ "Close"].YValueMembers = "Closed";

ChrtOpenReq.Series[ "Open"].XValueMember = "Priority";

// Add Color column

LegendCellColumn firstColumn = new LegendCellColumn();

firstColumn.ColumnType = LegendCellColumnType.SeriesSymbol;

firstColumn.HeaderText = "Color";

firstColumn.HeaderBackColor = System.Drawing. Color.WhiteSmoke;

ChrtOpenReq.Legends[ "OCLegend"].CellColumns.Add(firstColumn);

// Add Legend Text column

LegendCellColumn secondColumn = new LegendCellColumn();

secondColumn.ColumnType = LegendCellColumnType.Text;

secondColumn.HeaderText = "Status";

secondColumn.Text = "#LEGENDTEXT";

secondColumn.HeaderBackColor = System.Drawing. Color.WhiteSmoke;

ChrtOpenReq.Legends[ "OCLegend"].CellColumns.Add(secondColumn);

// Add Total cell column

LegendCellColumn total = new LegendCellColumn();

total.Text = "#TOTAL";

total.HeaderText = "Total";

total.Name = "Total";

total.HeaderBackColor = System.Drawing. Color.WhiteSmoke;

ChrtOpenReq.Legends[ "OCLegend"].CellColumns.Add(total);