Jump to content
Software FX Community
Sign in to follow this  
User (Legacy)

Line Graph Question

Recommended Posts

Hi,

I'm trying to create a line graph with 2 series using a datatable in .NET.

The data looks like this:

Date ActualQty GoalQty

20061201 100 Null

20061202 300 250

20061203 500 Null

20061204 200 Null

20061205 400 Null

20061206 500 Null

20061207 600 Null

20061208 300 Null

20061209 250 300

20061210 220 Null

I want to have the lines in each series be connected. The GoalQty is

sporadic but I want it to be drawn with connecting lines between each point.

Right now they come out as single points. Below is a sample graph, see the

green points below...

Is there a way to make the second series points connect?

Thanks,

Chris

Share this post


Link to post
Share on other sites

Hi,

I'm trying to create a line graph with 2 series using a datatable in .NET.

The data looks like this:

Date ActualQty GoalQty

20061201 100 Null

20061202 300 250

20061203 500 Null

20061204 200 Null

20061205 400 Null

20061206 500 Null

20061207 600 Null

20061208 300 Null

20061209 250 300

20061210 220 Null

I want to have the lines in each series be connected. The GoalQty is

sporadic but I want it to be drawn with connecting lines between each point.

Right now they come out as single points. Below is a sample graph, see the

green points below...

Is there a way to make the second series points connect?

Thanks,

Chris

Share this post


Link to post
Share on other sites

In order to obtain two lines you will need to re-organize your data as 

follows:

Date1 ActualQty Date2 GoalQty

20061201 100 20061202 250

20061202 300 20061209 300

20061203 500 Null Null

20061204 200 Null Null

20061205 400 Null Null

20061206 500 Null Null

20061207 600 Null Null

20061208 300 Null Null

20061209 250 Null Null

20061210 220 Null Null

Notice that there is two separate set of X-Values and the Null's are all at

the end. The dates in the second set of X-Values are sorted, the dates tat

contain data go first.

--

Francisco Padron

www.chartfx.com

post-2107-13922382380894_thumb.png

post-2107-1392238607593_thumb.png

Share this post


Link to post
Share on other sites

In order to obtain two lines you will need to re-organize your data as 

follows:

Date1 ActualQty Date2 GoalQty

20061201 100 20061202 250

20061202 300 20061209 300

20061203 500 Null Null

20061204 200 Null Null

20061205 400 Null Null

20061206 500 Null Null

20061207 600 Null Null

20061208 300 Null Null

20061209 250 Null Null

20061210 220 Null Null

Notice that there is two separate set of X-Values and the Null's are all at

the end. The dates in the second set of X-Values are sorted, the dates tat

contain data go first.

--

Francisco Padron

www.chartfx.com

Share this post


Link to post
Share on other sites

Hi,

Thanks for the reply.

Right now I'm using using a datatable and just binding to the chart with

something like:

Chart1.DataSourceSettings.DataType(0) = DataType.Label

Chart1.DataSourceSettings.DataType(1) = DataType.Value

Chart1.DataSourceSettings.DataType(2) = DataType.Value

Chart1.DataSourceSettings.DataSource = dt

Chart1.DataBind()

There's a lot of other code, but basically it just sets the colors and

fonts.

Will I be able to do something similar or will I have to input the values

manually into the chart?

Thanks,

Chris

"Software FX" <noreply@softwarefx.com> wrote in message

news:dJmefDwIHHA.244@webserver3.softwarefx.com...

> In order to obtain two lines you will need to re-organize your data as

> follows:

>

> Date1 ActualQty Date2 GoalQty

>

> 20061201 100 20061202 250

> 20061202 300 20061209 300

> 20061203 500 Null Null

> 20061204 200 Null Null

> 20061205 400 Null Null

> 20061206 500 Null Null

> 20061207 600 Null Null

> 20061208 300 Null Null

> 20061209 250 Null Null

> 20061210 220 Null Null

>

>

> Notice that there is two separate set of X-Values and the Null's are all

> at the end. The dates in the second set of X-Values are sorted, the dates

> tat contain data go first.

>

> --

> Francisco Padron

> www.chartfx.com

>

Share this post


Link to post
Share on other sites

Hi,

Thanks for the reply.

Right now I'm using using a datatable and just binding to the chart with

something like:

Chart1.DataSourceSettings.DataType(0) = DataType.Label

Chart1.DataSourceSettings.DataType(1) = DataType.Value

Chart1.DataSourceSettings.DataType(2) = DataType.Value

Chart1.DataSourceSettings.DataSource = dt

Chart1.DataBind()

There's a lot of other code, but basically it just sets the colors and

fonts.

Will I be able to do something similar or will I have to input the values

manually into the chart?

Thanks,

Chris

"Software FX" <noreply@softwarefx.com> wrote in message

news:dJmefDwIHHA.244@webserver3.softwarefx.com...

> In order to obtain two lines you will need to re-organize your data as

> follows:

>

> Date1 ActualQty Date2 GoalQty

>

> 20061201 100 20061202 250

> 20061202 300 20061209 300

> 20061203 500 Null Null

> 20061204 200 Null Null

> 20061205 400 Null Null

> 20061206 500 Null Null

> 20061207 600 Null Null

> 20061208 300 Null Null

> 20061209 250 Null Null

> 20061210 220 Null Null

>

>

> Notice that there is two separate set of X-Values and the Null's are all

> at the end. The dates in the second set of X-Values are sorted, the dates

> tat contain data go first.

>

> --

> Francisco Padron

> www.chartfx.com

>

Share this post


Link to post
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.

Loading...
Sign in to follow this  

×
×
  • Create New...