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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Plotting marks vs Student names in Column chart

Thread ID:





70073 Nov 26,2007 12:17 PM UTC Nov 28,2007 08:08 AM UTC WinForms 1
Tags: Chart
Asked On November 26, 2007 12:17 PM UTC

i have a list of students and their marks in one subject like Christ-60, Andrey-55 and James-55.
i want to plot a graph on this with names on X-Axis and their Marks on Y-axis.

Please help me in creating this graph.
I am in deep need of this kind of graph.

regards vamsi

Sri Subhashini M [Syncfusion]
Replied On November 28, 2007 08:08 AM UTC

Hi Vamsi,

Thank you for using Syncfusion product.

We can plot the graph with student names on X axes by creating Labels for the ChartPoints. We can display the mark range on Y axes by setting Range values. Kindly review the code snippet.

// Displaying names in X axes
this.chartControl1.PrimaryXAxis.TickLabelsDrawingMode = ChartAxisTickLabelDrawingMode.UserMode;
this.chartControl1.PrimaryXAxis.Labels.Add(new ChartAxisLabel("Christ", Color.Crimson, new Font("Times New Roman", 13), 0, "", ChartValueType.Custom));
this.chartControl1.PrimaryXAxis.Labels.Add(new ChartAxisLabel("Andrey", Color.Crimson, new Font("Times New Roman", 13), 1, "", ChartValueType.Custom));
this.chartControl1.PrimaryXAxis.Labels.Add(new ChartAxisLabel("James", Color.Crimson, new Font("Times New Roman", 13), 2, "", ChartValueType.Custom));

this.chartControl1.PrimaryYAxis.RangePaddingType = ChartAxisRangePaddingType.None;
this.chartControl1.PrimaryYAxis.Range.Interval = 10;
this.chartControl1.PrimaryYAxis.Range.Min = 10;
this.chartControl1.PrimaryYAxis.Range.Max = 100;

Please take a look at the sample and let me know if its helpful.




This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon