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)



Similar Topics


Reading This Topic