Jump to content
Software FX Community

Is it a bug?


User (Legacy)

Recommended Posts

Hi,

I am new to ChartFx so it's quite possible that I am not setting it

correctly.

I am trying to draw a Gnatt chart, with date values on X-axis and Tasks on

the Y-axis. For each task I have StartDate and EndDate values. Here is my

code,

With chrtMain

.Gallery = Gallery.Gantt

.OpenData(COD.Values, 1, 4)

.OpenData(COD.IniValues, 1, 4)

.Legend(0) = "A"

.IniValue(0, 0) = #1/1/2000#.ToOADate

.Value(0, 0) = #1/1/2001#.ToOADate

.Legend(1) = "B"

.IniValue(0, 1) = #1/1/2002#.ToOADate

.Value(0, 1) = #1/1/2003#.ToOADate

.Legend(2) = "C"

.IniValue(0, 2) = #1/1/2004#.ToOADate

.Value(0, 2) = #1/1/2005#.ToOADate

.Legend(3) = "D"

.IniValue(0, 3) = #1/1/2006#.ToOADate

.Value(0, 3) = #1/1/2007#.ToOADate

.CloseData(COD.IniValues)

.CloseData(COD.Values)

With .AxisY

.LabelsFormat.Format = AxisFormat.DateTime

.LabelsFormat.CustomFormat = "MM/yyyy"

End With

End With

Here are the issues,

1. When I run the app, first time it only shows three tasks (no "A"). If I

rerun the above code, now I see all four tasks. Why its not showing four

tasks very first time?

2. Please see the enclosed image. Note that in code, for task "A", I have

set IniValue to 1/1/2000 and end value to 1/1/2001, but on the chart it

seems like task "A" begins before 1/1/2000 and ends before 1/1/2001.

What's happenning?

Thanks for help.

Vidvan

Link to comment
Share on other sites

> 1. When I run the app, first time it only shows three tasks (no "A").  If 

> I rerun the above code, now I see all four tasks. Why its not showing

> four tasks very first time?

When I run this code in my Form Load or in the Click event of a button I get

4 bars (A,B,C and D), please provide with a sample program that reproduces

this behavior.

> 2. Please see the enclosed image. Note that in code, for task "A", I have

> set IniValue to 1/1/2000 and end value to 1/1/2001, but on the chart it

> seems like task "A" begins before 1/1/2000 and ends before 1/1/2001.

> What's happenning?

The labels displayed are every 6 months, the label is for the END of each

period, so the first label :1/2000 refers to 1/31/2000 but your format:

"MM/yyyy" that's hiding the day.

--

Francisco Padron

www.chartfx.com

Link to comment
Share on other sites

Hi Francisco,

Thanks for the quick reply. As you requested,

Issue 1

---------------------------

You wrote,

> When I run this code in my Form Load or in the Click event of a button I

> get

> 4 bars (A,B,C and D), please provide with a sample program that reproduces

> this behavior.

I have enclosed Form1.VB & Form1.Resx files in the attached Form1.Zip file.

To duplicate the problem,

1. Create a blank WinForm solution, add Form1.VB & Form1.Resx file to it

2. Run the solution

3. Click on the "Update Chart" button ... notice that it shows three bars

4. Click on the "Update Chart" button again .. notice that now it shows four

bars

Issue 2

---------------------------

You wrote,

> The labels displayed are every 6 months, the label is for the END of each

> period, so the first label :1/2000 refers to 1/31/2000 but your format:

> "MM/yyyy" that's hiding the day.

I see, that makes perfect sense. Thanks for clarifying it. What should I

do so that label is displayed for BEGINNING of each period (for example

1/1/2000)?

Thanks for all the help.

Vidvan

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

news:Z$U1TzvsFHA.4084@webserver3.softwarefx.com...

>> 1. When I run the app, first time it only shows three tasks (no "A"). If

>> I rerun the above code, now I see all four tasks. Why its not showing

>> four tasks very first time?

>

> When I run this code in my Form Load or in the Click event of a button I

> get

> 4 bars (A,B,C and D), please provide with a sample program that reproduces

> this behavior.

>

>> 2. Please see the enclosed image. Note that in code, for task "A", I have

>> set IniValue to 1/1/2000 and end value to 1/1/2001, but on the chart it

>> seems like task "A" begins before 1/1/2000 and ends before 1/1/2001.

>> What's happenning?

>

> The labels displayed are every 6 months, the label is for the END of each

> period, so the first label :1/2000 refers to 1/31/2000 but your format:

> "MM/yyyy" that's hiding the day.

>

> --

> Francisco Padron

> www.chartfx.com

>

>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...