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

Understanding behavior of custom chart axis labels

Thread ID:





61598 May 29,2007 08:59 PM UTC May 30,2007 09:57 AM UTC WinForms 1
Tags: Chart
Roger Norris
Asked On May 29, 2007 08:59 PM UTC

We've noticed some unexpected behavior with custom chart axis labels. We are adding several custom labels to a chart axis, but the labels do not appear on the chart past a certain value. Below is some sample code which yields similar results:

ChartControl chartControl1;

//Creation of New Series
ChartSeries series = chartControl1.Model.NewSeries("MySeries", ChartSeriesType.Line);


// Format the axis and add custom labels
ChartAxis axis = chartControl1.PrimaryXAxis;
axis.ValueType = ChartValueType.Logarithmic;
axis.RangeType = ChartAxisRangeType.Set;
axis.Range.Min = -1;
axis.Range.Max = 1;
axis.TickLabelsDrawingMode = ChartAxisTickLabelDrawingMode.UserMode;
axis.TickSize = new Size(1, 6);

for (double power = -1.0; power <= 1.0; power += 0.25)
ChartAxisLabel label = new ChartAxisLabel(Math.Pow(10.0, power), "0.00");
label.RoundingPlaces = 5;


We were expecting to see nine custom chart labels, ranging from 10^-1 to 10^1. However, as shown in the attached screenshot, half of the labels do not appear on the chart. The last displayed label is 10^0, leaving off four labels (10^0.25 thru 10^1).

We can confirm that the last four labels are definitely being added to the label collection, and with the debugger we can see them inside the label collection. But for some reason the labels are not being drawn on the chart.

We'd like to know if there's a way to get all of the custom labels to appear.


Rashidha F [Syncfusion]
Replied On May 30, 2007 09:57 AM UTC

Hi Roger,

Thanks for using Syncfusion Products.

If your intension is to create a custom axis label means please set ChartAxisValuetype as Custom. I have modified your sample.

Please take a look at the attached sample.


The above sample exhibit how to draw a custom labels in chart control.

Please let me know if this helps.



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

This page will automatically be redirected to the 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