Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2085
Stack EventSpans by Series
posted

I have a similar need as described in this post:

   https://ko.infragistics.com/community/forums/t/49045.aspx


However, I need to display multiple series of EventSpans/Points where each series is stacked.  Using the code from the above post and modifying it to use a negative EventSpan control template margin (as I want series to be stacked above the Axis), the stacked series are clipped from the control (I added a grid splitter control to try and dynamically expand the control in a grid, but that does not allow the control to resize and draw all the stacked series either).  I need to do this for an arbitrary number of series, and I know I have to calculate margins for the control templates based on the (assuming this capability has not been added as an option since the post above), but how can I expand the area the EventSpans can be drawn in?


<GridSplitter Grid.Row="1" Height="5" HorizontalAlignment="Stretch" />

<Grid Grid.Row="2">

<Grid.RowDefinitions>

<RowDefinition Height="*" />

</Grid.RowDefinitions>

<Grid.Resources>

<Style x:Key="ZoombarStyle" TargetType="{x:Type ig:XamZoombar}">

<Setter Property="Visibility" Value="Collapsed"/>

</Style>

<Style x:Key="EventSpan1Style" TargetType="ig:EventSpan">

<Setter Property="Template">

<Setter.Value>

<ControlTemplate TargetType="ig:EventSpan">

<Grid Margin="0,2,0,2">

<Rectangle Margin="0,0,0,0" RadiusX="5" RadiusY="5" Fill="{ TemplateBinding Fill}" Stroke="{ TemplateBinding Stroke}" StrokeThickness="1" Height="10" VerticalAlignment="Top" />

</Grid>

</ControlTemplate>

</Setter.Value>

</Setter>

</Style>

<Style x:Key="EventSpan2Style" TargetType="ig:EventSpan">

<Setter Property="Template">

<Setter.Value>

<ControlTemplate TargetType="ig:EventSpan">

<Grid Margin="0,2,0,2">

<Rectangle Margin="0,-8,0,0" RadiusX="5" RadiusY="5" Fill="{ TemplateBinding Fill}" Stroke="{ TemplateBinding Stroke}" StrokeThickness="1" Height="10" VerticalAlignment="Top" />

</Grid>

</ControlTemplate>

</Setter.Value>

</Setter>

</Style>

</Grid.Resources>

<ig:XamTimeline x:Name="xamTimeline" ZoombarStyle="{StaticResource ZoombarStyle}">

<ig:XamTimeline.Series>

<ig:DateTimeSeries Title="Series 1"

EventSpanStyle="{StaticResource EventSpan1Style}">

<ig:DateTimeSeries.Entries>

<ig:DateTimeEntry Time="07:00 01/01/2000" Duration="3:00" />

<ig:DateTimeEntry Time="12:00 01/01/2000" Duration="2:00" />

</ig:DateTimeSeries.Entries>

</ig:DateTimeSeries>

<ig:DateTimeSeries Title="Series 2" Fill="Red"

EventSpanStyle="{StaticResource EventSpan2Style}">

<ig:DateTimeSeries.Entries>

<ig:DateTimeEntry Time="09:00 01/01/2000" Duration="2:00" />

<ig:DateTimeEntry Time="14:00 01/01/2000" Duration="1:00" />

</ig:DateTimeSeries.Entries>

</ig:DateTimeSeries>

</ig:XamTimeline.Series>

</ig:XamTimeline>

</Grid>

Parents Reply Children