We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Show text at all Y-values in Box and Whisker Chart

Hi,

I want to display text at all Y-values in a Box and Whisker Chart as displayed in the attached file (as the text in red color, that values represents the different positions of whisker chart)

I was added the ponts to the chart as:
chartControl1.Points.Add(1, 4, 12, 20, 26, 36);

Any suggestions will be praised



Box and Whisker.zip

3 Replies

MW Melba Winshia Syncfusion Team November 21, 2007 02:33 PM UTC

Hi Jyothi,

Thank you for your interest in Syncfusion Products.

If your intention is to display text at the y values in a chart, it can be achieved by enabling the ChartStyleInfo.DisplayText property.

[c#]

void series1_PrepareStyle(object sender, ChartPrepareStyleInfoEventArgs args)
{
if (series != null)
{

args.Style.Text = string.Format("{0}", series.Points[args.Index].YValues[0]);

//Display text
args.Style.DisplayText = true;
args.Style.TextOrientation = ChartTextOrientation.Up;

}
}


Please refer the sample in the below link which illustrates the above:

http://websamples.syncfusion.com/samples/Chart.Web/5.2.0.25/38858/main.htm

Please try this and let me know if this helps.

Thanks,
Melba




JY JyothiKumar November 22, 2007 05:39 AM UTC

Hi,

thanks for ur reply,

args.Style.Text = string.Format("{0}", series.Points[args.Index].YValues[0]);
args.Style.DisplayText = true;

this will display only one Y-value at the first Y-value's location , but Box and Whisker chart will have more than one Y-values, so my requirement is to display all Y-vales at all Y-value locations as I showed in my initial post's attached file.



MW Melba Winshia Syncfusion Team November 24, 2007 07:22 AM UTC

Hi Jyothi,

Thank you for the update.

I am afraid that I was not able to reproduce the issue. All the y-values are displayed in all the Y-values locations of the chart. Also I have created a simple sample and it is availble in the below link:

http://websamples.syncfusion.com/samples/Chart.Web/5.2.0.25/69955/main.htm

Please have a look at the above sample and if still the issue exists, could you please try reproducing it in the above sample and send us the modified sample so that we could sort out the cause of the issue and provide you a solution?

Thanks,
Melba



Loader.
Live Chat Icon For mobile
Up arrow icon