I am currently trying to set the axis Scrollscale, but its appears anything smaller then .3 is ignored and seems to not get any smaller. It says it can be between 0 and 1 and need to try to set it to .1 but it seems to ignore it when its that small.
axis.AutoRange =
False
axis.Unit = 1
axis.UnitType = DateTimeUnitType.Hours
axis.ScrollScale = 0.1
axis.ShowLabels =
True
axis.ScrollPosition = 0.1
I’m trying reproducing it with:
<Grid x:Name="LayoutRoot" Width="400" Height="400">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="50" />
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<igTimeline:XamWebTimeline x:Name="Timeline"
Grid.Column="0"
Grid.Row="1"
Canvas.ZIndex="99"
Margin="0"
Grid.ColumnSpan="15">
</igTimeline:XamWebTimeline>
</Grid>
…
public MainPage()
{
InitializeComponent();
DateTimeAxis axis = new DateTimeAxis();
axis.ShowLabelsInPreview = true;
axis.ShowMajorGridLines = true;
axis.ShowMinorTickMarks = true;
axis.ShowThumb = true;
axis.Minimum = DateTime.Now;
axis.Maximum = DateTime.Now.AddHours(10);
axis.AutoRange = false;
axis.Unit = 1;
axis.UnitType = DateTimeUnitType.Hours;
axis.ScrollScale = 0.01;
axis.ShowLabels = true;
axis.ScrollPosition = 0.5;
this.Timeline.Axis = axis;
}
This is still working. Can you send us your project with the Timeline as attached project here?
I don't know how, but its the Grid.
If I remove
<Grid.ColumnDefinitions> <ColumnDefinition Width="1" /> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="50" /> <RowDefinition Height="*"/> </Grid.RowDefinitions>
it stops reseting to 30.......
WHY? whats wrong with putting the control in a grid?
I checked the value of axis.ScrollScale after I set it.
If I set it to .30 or lower I get 0.30769230769230771
so .29 = 0.30769230769230771
.01 = 0.30769230769230771
.31 and higher works.
'Setup Axis Dim axis As New DateTimeAxis()
axis.ShowLabelsInPreview = True axis.ShowMajorGridLines = True axis.ShowMinorTickMarks = True axis.ShowThumb = True
axis.Minimum = CDate(Results.Rows(0).Item("RequestStartDate")) axis.Maximum = CDate(Results.Rows(0).Item("RequestEndDate")) axis.AutoRange = False axis.Unit = 1 axis.UnitType = DateTimeUnitType.Hours axis.ScrollScale = 0.01 axis.ShowLabels = True axis.ScrollPosition = 0.5
xamTimeline.Axis = axis
'TimeLine Options xamTimeline.EventTitleLayoutSettings.Enabled = True xamTimeline.EventTitleLayoutSettings.HorizontalOffset = 5 xamTimeline.EventTitleLayoutSettings.VerticalOffset = 5
'Setup Legend xamTimeline.LegendStyle = DirectCast(Resources("rscLegendStyle"), Style)
I have no styles on the axis or timelien itself, just styles on the event points/spans, details, and titles.
My timeline is pretty simple
<Grid x:Name="LayoutRoot" ShowGridLines="False">
<igtl:XamWebTimeline x:Name="xamTimeline" Grid.Column="0" Grid.Row="1" Canvas.ZIndex="99" Margin="0" Grid.ColumnSpan="15">
</igtl:XamWebTimeline>
Only other code is looping thru records and add the datetimeserie(s) to the timeline
This is strange behaviour.
I'm trying setting:
axis.ScrollScale = 0.03;
and it works.
Can you send us some sample?