Hi Prabhjeet,
Thanks for the screenshot. It is possible to display text both inside as well as in the top of the column by handling the ChartAreaPaintEvent Handler as given below:
Sample Code:
void chartControl1_ChartAreaPaint(object sender, PaintEventArgs e)
{
if (this.checkBox1.Checked)
{
float y2 = this.chartControl1.PrimaryYAxis.GetCoordinateFromValue(this.chartControl1.PrimaryYAxis.Range.Min);
for (int i = 0; i < this.chartControl1.Series[0].Points.Count; i++)
{
ChartStyleInfo style = this.chartControl1.Series[0].Styles[i];
string s = String.Format("{0:n0}", this.chartControl1.Series[0].Points[i].YValues[0] / this.totalYValue * 100).ToString() + "%";
SizeF sz = e.Graphics.MeasureString(s, style.GdipFont);
float StartX = this.chartControl1.PrimaryXAxis.GetCoordinateFromValue(this.chartControl1.Series[0].Points[i].X) - sz.Width / 2;
float StartY = this.chartControl1.PrimaryYAxis.GetCoordinateFromValue(this.chartControl1.Series[0].Points[i].YValues[0]);
float MiddleY = y2 - StartY;
e.Graphics.DrawString(s, style.GdipFont, new SolidBrush(Color.Black), new PointF(StartX, StartY + (MiddleY / 2) - sz.Height / 2));
}
}
I have attached sample that illustrates the same in this link below.
http://websamples.syncfusion.com/samples/Chart.Windows/F74729/Main.htmKindly let us know if this meets your requirements. Thanks for your patience.
Regards,
Manohari.R