附上代码:
<c1chart:ChartPanel>
<c1chart:ChartPanelObject x:Name="tab2" Attach="DataX"
Action="MouseMove"
DataPoint="-1,-1"
HorizontalAlignment="Center"
VerticalAlignment="Top"
Width="60" Height="50">
<c1chart:ChartPanelObject.RenderTransform>
<TranslateTransform Y="-50"/>
</c1chart:ChartPanelObject.RenderTransform>
<Grid DataContext="{Binding RelativeSource={x:Static RelativeSource.Self},Path=Parent}" Opacity="0.8">
<Path Data="M0.5,0.5 L23,0.5 23,23 11.61165,29.286408 0.5,23 z" Stretch="Fill" Fill="#FFF1F1F1" Stroke="DarkGray" StrokeThickness="1"/>
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<TextBlock Text="Amp" Margin="2 0"/>
<TextBlock x:Name="label_2" Text="{Binding DataPoint.Y}" FontWeight="Bold" Margin="2"/>
</StackPanel>
</Grid>
</c1chart:ChartPanelObject>
</c1chart:ChartPanel>
|