Jump to content
Software FX Community

labels on XY Plot


User (Legacy)

Recommended Posts

Hi,

i am building xy chart (scatter) by databinding it to the datatable.

there are two issues that i am trying to resolve:

1. chart looks fine except when i have only one row in the source table, the

chart does not create label for the point.

since i am trying to create a xy plot, there may be a rescaling issue when

there is only one point?

2. specifying Axis.Step property to control the gap between the labels on

the X axis does not do anything.

I am doing something like this:

Dim axisx As Internet.Server.Axis = Chart1.AxisX

axisx.LabelAngle = 90

axisx.Font = New Font("Arial", 7)

axisx.LabelsFormat.Format = AxisFormat.DateTime

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

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

Chart1.DataSource = dt

thanks

Link to comment
Share on other sites

1) You are correct, there is a re-scaling issue because Min = Max, check for

this condition after databinding and resolve appropriately (choose what to

do with the X-Axis scale so that it can be shown).

2) Make sure you set the step AFTER you do the DataBinding, by default

DataBinding resets all Axis settings.

--

FP

Software FX, Inc.

Link to comment
Share on other sites

thanks for your help,

steps work now and I am handling min=max case,

however, when page is loaded the fist time, all the labels on the x-axis

instead of showing date/time show some random numbers.

When I do a PostBack everything looks great. THe initial load and a

postback execute the same routine but labels show different values on

the first load.

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

news:#txks3RdCHA.3064@webserver1.softwarefx.com...

> 1) You are correct, there is a re-scaling issue because Min = Max, check

for

> this condition after databinding and resolve appropriately (choose what to

> do with the X-Axis scale so that it can be shown).

>

> 2) Make sure you set the step AFTER you do the DataBinding, by default

> DataBinding resets all Axis settings.

>

> --

> FP

> Software FX, Inc.

>

>

Link to comment
Share on other sites

Can you provide sample code that exhibits this behavior ?

--

Regards,

JC

Software FX Support

"Bob" <bob4future@yahoo.com> wrote in message

news:klQmD#idCHA.2308@webserver1.softwarefx.com...

> thanks for your help,

>

> steps work now and I am handling min=max case,

>

> however, when page is loaded the fist time, all the labels on the x-axis

>

> instead of showing date/time show some random numbers.

>

> When I do a PostBack everything looks great. THe initial load and a

>

> postback execute the same routine but labels show different values on

>

> the first load.

>

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

> news:#txks3RdCHA.3064@webserver1.softwarefx.com...

> > 1) You are correct, there is a re-scaling issue because Min = Max, check

> for

> > this condition after databinding and resolve appropriately (choose what

to

> > do with the X-Axis scale so that it can be shown).

> >

> > 2) Make sure you set the step AFTER you do the DataBinding, by default

> > DataBinding resets all Axis settings.

> >

> > --

> > FP

> > Software FX, Inc.

> >

> >

>

>

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...