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
350
ChartInfoStrip Help
posted
  • I have a xamDataChart that I am very pleased with, however I need to provide a ChartInfoStrip to provide a dynamic "Acceptance" area of my chart.
  • I have followed the sample code in your Samples Browser but I just cannot get the area to actually display!
  • Am I doing anything wrong?

<ig:XamDataChart x:Name="DataChart"
Title="{x:Static languages:Strings.StandardTrendsChartTitle}"
Grid.Row="1"
Margin="20,20,50,20"
Background="{StaticResource TransparentBrush}"
HorizontalZoomable="True"
VerticalZoomable="True">

<behaviors:ChartStripBehaviors.ChartInfoStrips>
<behaviors:ChartInfoStripsBehavior>
<behaviors:ChartInfoStripsBehavior.InfoStrips>
<behaviors:InfoStrip EndY="1.52"
Fill="#44918F8F"
Label="Test"
StartY="1.5205">
<behaviors:InfoStrip.StripTemplate>
<DataTemplate>
<Grid Width="{Binding Width}"
Height="{Binding Height}"
Margin="0">
<Rectangle Fill="{Binding Fill}" Opacity="1" />
<TextBlock Margin="5"
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="30"
FontWeight="Bold"
Foreground="DimGray"
Text="{Binding Label}" />
</Grid>
</DataTemplate>
</behaviors:InfoStrip.StripTemplate>
</behaviors:InfoStrip>
</behaviors:ChartInfoStripsBehavior.InfoStrips>
</behaviors:ChartInfoStripsBehavior>
</behaviors:ChartStripBehaviors.ChartInfoStrips>


<ig:XamDataChart.Axes>
<ig:NumericXAxis x:Name="xAxis"
Title="{x:Static languages:Strings.MeasurementDateColumnName}"
Visibility="Visible">
<ig:NumericXAxis.Label>
<DataTemplate>
<TextBlock Foreground="{StaticResource GreyBrush}"
Style="{StaticResource FieldDataTextBlockStyle}"
Text="{Binding Item,
Converter={StaticResource OaDateConverter}}" />
</DataTemplate>
</ig:NumericXAxis.Label>
</ig:NumericXAxis>
<ig:NumericYAxis x:Name="yAxis"
Title="{Binding YAxisTitle}"
Visibility="Visible">
<ig:NumericYAxis.Label>
<DataTemplate>
<TextBlock Foreground="{StaticResource GreyBrush}"
Style="{StaticResource FieldDataTextBlockStyle}"
Text="{Binding Item}" />
</DataTemplate>
</ig:NumericYAxis.Label>
</ig:NumericYAxis>
</ig:XamDataChart.Axes>
<ig:XamDataChart.Series>
<ig:ScatterSeries IsHighlightingEnabled="True"
ItemsSource="{Binding DataPoints}"
MarkerBrush="{StaticResource GreenGradientBrush}"
MarkerOutline="{StaticResource GreyBrush}"
MarkerType="Diamond"
ShowDefaultTooltip="True"
UseLayoutRounding="True"
XAxis="{Binding ElementName=xAxis}"
XMemberPath="X"
YAxis="{Binding ElementName=yAxis}"
YMemberPath="Y" />
<ig:ValueOverlay x:Name="EditableValueOverlay"
Axis="{Binding ElementName=yAxis}"
Background="{StaticResource BlueBrush}"
IsHighlightingEnabled="True"
Opacity="0.3"
Thickness="5"
Value="{Binding StandardCalibratedValue}" />

</ig:XamDataChart.Series>
</ig:XamDataChart>

I am really struggling with this.

  • 34510
    Verified Answer
    Offline posted

    Hi Steven,

    I'm not really sure why your code isn't working without seeing it in action in a sample.  I suspect that your Y axis range is just to large for the small difference between the StartY and EndY properties of the info strip.  Take a look at my attached sample.

    ChartInfoStripsExample.zip