Profile Picture

Time Axis configurator

Posted By Luca Azzoni 11 Years Ago
Author
Message
Luca Azzoni
Posted 11 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: Forum Members
Last Active: 10 Years Ago
Posts: 4, Visits: 1
I'am using NDateTimeScaleConfigurator to configure axis scale using this code:

NDateTimeScaleConfigurator scaleConfigurator = new NDateTimeScaleConfigurator
{
RoundToTickMax = true,
RoundToTickMin = true,
InflateViewRangeBegin = false,
InflateViewRangeEnd = false,
MinorGridStyle = { LineStyle = { Pattern = LinePattern.Dot } },
AutoDateTimeUnits = new NDateTimeUnit[]
{
NDateTimeUnit.Millisecond,
NDateTimeUnit.Second,
NDateTimeUnit.Minute,
NDateTimeUnit.Hour,
NDateTimeUnit.Day,
NDateTimeUnit.Week,
NDateTimeUnit.Month,
NDateTimeUnit.Year
}
};

scaleConfigurator.MajorGridStyle.SetShowAtWall(ChartWallType.Back, true);
scaleConfigurator.EnableUnitSensitiveFormatting = true;

for (int i = 0; i < scaleConfigurator.DateTimeUnitFormatterPairs.Count; i++)
{
NDateTimeUnitFormatterPair source = (NDateTimeUnitFormatterPair)scaleConfigurator
.DateTimeUnitFormatterPairs[i];
source.Formatter = new UtcToLocalDateTimeValueFormatter(source.Formatter);
}
scaleConfigurator.MajorTickMode = MajorTickMode.AutoMinDistance;
scaleConfigurator.MinTickDistance = new NLength(30, NGraphicsUnit.Pixel);

But in certain scenario where the axis has AxisOrientation.Depth only one label is show like in the attachement.

How could I configure it correctly?

Attachments
D#3446.png (125 views, 98.00 KB)
Nevron Support
Posted 11 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Yesterday @ 1:54 AM
Posts: 3,054, Visits: 4,009

Hi Luca,

The above code configures the axis to use an automatic step, which is computed depending on the size of the axis on the screen (larger size, more labels and vice versa). If the axis occupies a small region of the screen this will produce less labels (or one in the smallest case). You need to specify a different step mode in  this case (like fixed step or fixed max count). BTW the attachment seems to be missing...



Best Regards,
Nevron Support Team



Luca Azzoni
Posted 11 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: Forum Members
Last Active: 10 Years Ago
Posts: 4, Visits: 1
Hello,

I have updated the attachment and as you can see there is enough space to fill it with labels.

In both time axis I use the same date time configurator with same values and for horizontal axis orientation the labels are rightly show, but for depth axis the same values aren't correctly show...

Could you post an example for fiexd step or fixed max count?

Thanks

Luca



Any Idea?

Nevron Support
Posted 11 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Yesterday @ 1:54 AM
Posts: 3,054, Visits: 4,009

Hi Luca,

The step modes are described in detail here:

http://helpdotnetvision.nevron.com/UsersGuide_Axes_Scale_ScaleConfigurators_Major_and_Minor_Ticks.html

Can you send a small app replicating this problem for further investigation to support@nevron.com?



Best Regards,
Nevron Support Team





Similar Topics


Reading This Topic