Jump to content
Software FX Community

DateTime Chart


User (Legacy)
 Share

Recommended Posts

Hi There

Created a new Chart in VB.Net with the following design properties:-

Gallery = Gantt

AxisY.LabelsFormat.Format = Number

AxisY.Min = 0

AxisY.Max = 200

NSeries=1

NValues=3

In the Form Load Sub got the following Code:-

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As

System.EventArgs) Handles MyBase.Load

With Me.Chart1

.Gallery = SoftwareFX.ChartFX.Gallery.Gantt

.AxisY.DataFormat.Format = SoftwareFX.ChartFX.AxisFormat.Time

.AxisY.Min = Today.ToOADate

.AxisY.Max = Today.AddDays(120).ToOADate

.OpenData(SoftwareFX.ChartFX.COD.Values, 1, 3)

.OpenData(SoftwareFX.ChartFX.COD.IniValues, 1, 3)

.IniValue(0, 0) = Today.ToOADate

.Value(0, 0) = Today.AddDays(10).ToOADate

.IniValue(0, 1) = Today.AddDays(30).ToOADate

.Value(0, 1) = Today.AddDays(80).ToOADate

.IniValue(0, 2) = Today.AddDays(90).ToOADate

.Value(0, 2) = Today.AddDays(110).ToOADate

.CloseData(SoftwareFX.ChartFX.COD.Values)

.CloseData(SoftwareFX.ChartFX.COD.IniValues)

End With

End Sub

When I run the application, it displays 00:00:00 in the Chart Tool Tip and

displays very long numbers on the Y Axis (Horizontal), starting at 37,804 ,

37824, etc etc..

Should the Axis be in Date Format and start at the Current Date....got the

example from Chartfx for .Net manual page 58 (Gantt Charts)...

Any suggestions would be appreciated.....

Iki

Link to comment
Share on other sites

Ok, a few things:

1) SoftwareFX.ChartFX.AxisFormat.Time is for TIME values, not dates, use

AxisFormat.DateTime or AxisFormat.Date for date values. Your data is all at

12:00 am (Today return today's date and 12:00 am as the time, you can use

Now to retrieve the current date and time).

2) You only changed the DataFormat, which is used in the tooltips and

data-editor, you must change the LabelsFormat property instead.

--

FP

Software FX, Inc.

Link to comment
Share on other sites

Ok Thanks for that, Just tried the following mods in my Form Load:-

.AxisY.DataFormat.Format = SoftwareFX.ChartFX.AxisFormat.Date

also

.AxisY.DataFormat.Format = SoftwareFX.ChartFX.AxisFormat.DateTime

still gives the same result i.e still gives 37804, 37824....etc etc...

Iki

"SoftwareFX Support" <support@softwarefx.com> wrote in message

news:pmpbMKKQDHA.2860@webserver1.softwarefx.com...

> Ok, a few things:

>

> 1) SoftwareFX.ChartFX.AxisFormat.Time is for TIME values, not dates, use

> AxisFormat.DateTime or AxisFormat.Date for date values. Your data is all

at

> 12:00 am (Today return today's date and 12:00 am as the time, you can use

> Now to retrieve the current date and time).

>

> 2) You only changed the DataFormat, which is used in the tooltips and

> data-editor, you must change the LabelsFormat property instead.

>

>

> --

> FP

> Software FX, Inc.

>

>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...