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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Issues with date/time data for column charts

Thread ID:

Created:

Updated:

Platform:

Replies:

76359 Sep 3,2008 10:21 AM Sep 12,2008 09:31 AM Windows Forms 1
loading
Tags: Chart
Administrator [Syncfusion]
Asked On September 3, 2008 10:21 AM

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.Legends.Add(this.chtAuditEvents.Legend);
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.Titles.Add(this.cht.Title);
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?

Best,
-Drew Johnson



chart_f162508b.zip

Manohari [Syncfusion]
Replied On September 12, 2008 09:31 AM

Hi Drew,

We regret very much for the delayed response.

I have tested for this issue in Version 6.1.0.34 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 6.2.0.40 and above).

You can download the later versions from the following link.

http://www.syncfusion.com/downloads/product/versionhistory.aspx

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.

Chart_WF_FixedWidthMode.zip

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

Regards,
Manohari.R


CONFIRMATION

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.

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

;