Jump to content
Software FX Community

Autoscale and rounded start


User (Legacy)

Recommended Posts

[Chartfx v6.2 for windows forms.net]

I'm using the Autoscale feature with a date-time or time axis to get nice

'round' values.

The round values always seem to the the chart step, eg 2 hours according to

the 'width' of the data. This is fine. See attached chart.

Is there any way to round down the axis minimum value to a round time, eg

13:00:00 when the first datapoint is at 13:07:52, and still retain the smart

labeling / auto scale features?

Link to comment
Share on other sites

Are these things in the X-Axis Dates (X-Values) or Labels (Strings) ?

If they are strings, they already lost its underlying value so Chart FX will

not know what's round and what's not. How are you passing these times to the

chart ?

If these are labels, you can use the FirstLabel property to tell Chart FX

which label (index) to start from.

If this are X-Values, the default behavior is that the first label will

appear at the first "round" number. A flag in Axis.Style called

AxisStyle.AutoFirstLabel controls this behavior and it is ON by default.

Either you are turning this flag OFF or there is something I'm missing here.

If you can't find anywhere where you are setting Axis.Style, please export

this chart to a Binary file and attach it. I will be able to tell whether or

not the AutoFirstLabel flag was turned off.

--

FP

Software FX

post-2107-13922379507307_thumb.jpg

Link to comment
Share on other sites

I'm using a Gantt chart, so the axes are swapped; the Y axis is the

horizontal (time) axis, and the X aixs is teh vertical category axis.

Does this make a difference?

JM

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

news:2MyoT8YpEHA.688@webserver3.softwarefx.com...

> Are these things in the X-Axis Dates (X-Values) or Labels (Strings) ?

>

> If they are strings, they already lost its underlying value so Chart FX

will

> not know what's round and what's not. How are you passing these times to

the

> chart ?

>

> If these are labels, you can use the FirstLabel property to tell Chart FX

> which label (index) to start from.

>

> If this are X-Values, the default behavior is that the first label will

> appear at the first "round" number. A flag in Axis.Style called

> AxisStyle.AutoFirstLabel controls this behavior and it is ON by default.

> Either you are turning this flag OFF or there is something I'm missing

here.

>

> If you can't find anywhere where you are setting Axis.Style, please export

> this chart to a Binary file and attach it. I will be able to tell whether

or

> not the AutoFirstLabel flag was turned off.

>

> --

> FP

> Software FX

>

>

Link to comment
Share on other sites

Some of the stuff I said doesn't apply as we are talking about the Y-axis 

not the X-Axis (I could not tell it was a Gantt chart from the image, I

should have !).

The part about AutoFirstLabel does apply. Here it is again changed to the

Y-Axis:

The default behavior is that the first label will

appear at the first "round" number. A flag in Axis.Style called

AxisStyle.AutoFirstLabel controls this behavior and it is ON by default.

Either you are turning this flag OFF or there is something I'm missing here.

If you can't find anywhere where you are setting Axis.Style, please export

this chart to a Binary file and attach it. I will be able to tell whether or

not the AutoFirstLabel flag was turned off.

--

FP

Software FX

Link to comment
Share on other sites

I've tried AutoFirstLabel but this does not seem to work

Attached is a screen shot, the exported chart binary data, and the C#

source.

As you can see from the screenshot, the horizontal (time axis starts at

15:56:04), and the step is a nicely rounded 2 hours. My expectation is to

round dound the first point to a nice time value 15:56:04 -> 15:45:00,

15:30:00, or even 15:00:00, and then draw the steps at nice (two hour etc)

intervals.

Having nicely rounded step intervals seems unnatural when the starting point

is not nicely rounded as well.

John

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

news:M5u387ipEHA.692@webserver3.softwarefx.com...

> Some of the stuff I said doesn't apply as we are talking about the Y-axis

> not the X-Axis (I could not tell it was a Gantt chart from the image, I

> should have !).

>

> The part about AutoFirstLabel does apply. Here it is again changed to the

> Y-Axis:

>

> The default behavior is that the first label will

> appear at the first "round" number. A flag in Axis.Style called

> AxisStyle.AutoFirstLabel controls this behavior and it is ON by default.

> Either you are turning this flag OFF or there is something I'm missing

here.

>

> If you can't find anywhere where you are setting Axis.Style, please export

> this chart to a Binary file and attach it. I will be able to tell whether

or

> not the AutoFirstLabel flag was turned off.

>

> --

> FP

> Software FX

>

>

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...