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

Issues with date/time data for column charts

Thread ID:





76359 Sep 3,2008 02:21 PM UTC Sep 12,2008 01:31 PM UTC WinForms 1
Tags: Chart
Administrator [Syncfusion]
Asked On September 3, 2008 02:21 PM UTC

I am attempting to display date/time along an X axis, quantity of 'events' on the Y.

Here's the pertinent bit from InitializeComponent()
// cht
this.cht.Legend.IsWindowLess = false;
this.cht.Legend.Location = new System.Drawing.Point(675, 42);
this.cht.Legend.TabIndex = 1;
this.cht.Location = new System.Drawing.Point(220, 576);
this.cht.Name = "cht";
this.cht.Size = new System.Drawing.Size(768, 112);
this.cht.TabIndex = 91;
this.cht.Title.Name = "Def_title";
this.cht.Title.Size = new System.Drawing.Size(8, 8);
this.cht.Title.TabIndex = 2;
this.cht.Title.Visible = false;
this.cht.ToolBar.ButtonFlatStyle = System.Windows.Forms.FlatStyle.Popup;

I add this data (8:20/2, 8:21/4, 8:22/4, 8:23/17) in the format of DateTime (dtStart)/long (lEventQty) to a series:

seriesProcess.Points.Add(dtStart, lEventQty);

At the conclusion of creating that series, we set the type and add it to the chart:

seriesProcess.Type = ChartSeriesType.Line; this.cht.Series.Add(seriesProcess);

this.cht.PrimaryXAxis.ValueType = ChartValueType.DateTime; this.cht.PrimaryXAxis.DateTimeFormat = "hh:mm"; cht.PrimaryXAxis.LabelRotate = true; cht.PrimaryXAxis.LabelRotateAngle = 45;

When the series type is set to 'ChartSeriesType.Line', everything displays properly. When the type is set to 'ChartSeriesType.Column' I get what appears to be a very odd display (see attachment) of the information; does anyone have some insight on why the grid is acting so oddly?

-Drew Johnson


Manohari [Syncfusion]
Replied On September 12, 2008 01:31 PM UTC

Hi Drew,

We regret very much for the delayed response.

I have tested for this issue in Version and was able reproduce this issue. However I am glad to inform you that this issue has been fixed in our later version (from version and above).

You can download the later versions from the following link.


Unlock key:

If your Essential Studio license is current, you will be able to obtain the key to install this version from your account in DirectTrac. Otherwise, please contact your Syncfusion Sales Representative or e-mail salessupport@syncfusion.com

However it also is possible to overcome this issue by setting the ColumnWidthMode of ChartControl to FixedWidthMode. Please refer to the sample code below.

this.chartControl1.ColumnWidthMode = ChartColumnWidthMode.FixedWidthMode;
this.chartControl1.ColumnFixedWidth = 20;

I have also attached the sample that illustrates the same in this link below.


Kindly let us know if this helps in resolving your problem. Thanks for your patience.



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