I've got new bug with the new version of WPF TeeChart. The problem is in serialization of real numbers when I try to export TeeChart to XAML. Decimal separator of that numbers must be invariant - dot, not comma for any locale!
For example, if I set TeeChart width to 300.5 and height to 200
Code: Select all
MyTChart.Width = 300.5;
MyTChart.Height = 200;
Code: Select all
MyTChart.Export.Image.XAML.Save(@"D:\test.xaml");
See bold text (coordinates of lines).<Canvas Name="MyTChart" Width="300.5" Height="200" Background="#FFF0F0F0" ClipToBounds="True" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns="http://schemas.microsoft.com/winfx/2006 ... esentation" >
<Rectangle
Canvas.Left="0" Canvas.Top="0" Width="301.5" Height="201">
<Rectangle.Fill>
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#FFEAEAEA"/>
<GradientStop Offset="1" Color="#FFFFFFFF"/>
</LinearGradientBrush>
</Rectangle.Fill>
</Rectangle>
<Line X1="0" X2="299,5" Y1="0" Y2="0" StrokeThickness="1" Stroke="#FF000000"/>
<Line X1="0" X2="0" Y1="0" Y2="199" StrokeThickness="1" Stroke="#FF000000"/>
<Line X1="0" X2="299,5" Y1="199" Y2="199" StrokeThickness="1" Stroke="#FF000000"/>
<Line X1="299,5" X2="299,5" Y1="199" Y2="0" StrokeThickness="1" Stroke="#FF000000"/>
<TextBlock Canvas.Left="121.5" Canvas.Top="9.5" Foreground="#FF000080" FontFamily="Verdana" FontSize="11.2" >
TeeChart
</TextBlock>
<TextBlock Canvas.Left="121.5" Canvas.Top="9.5" Foreground="#FF000080" FontFamily="Verdana" FontSize="11.2" >
TeeChart
</TextBlock>
<Polygon Points="21,51 284.5,51 284.5,166 21,166 ">
<Polygon.Fill>
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#FFEAEAEA"/>
<GradientStop Offset="1" Color="#FFFFFFFF"/>
</LinearGradientBrush>
</Polygon.Fill>
</Polygon>
<Line X1="21" X2="284,5" Y1="51" Y2="51" StrokeThickness="1" Stroke="#FF000000"/>
<Line X1="284,5" X2="284,5" Y1="51" Y2="166" StrokeThickness="1" Stroke="#FF000000"/>
<Line X1="284,5" X2="21" Y1="166" Y2="166" StrokeThickness="1" Stroke="#FF000000"/>
<Line X1="21" X2="21" Y1="166" Y2="51" StrokeThickness="1" Stroke="#FF000000"/>
<Polygon Fill="#FFFFFFE0" Points="16,56 21,51 21,166 16,171 "/>
<Line X1="16" X2="21" Y1="56" Y2="51" StrokeThickness="1" Stroke="#FF000000"/>
<Line X1="21" X2="21" Y1="51" Y2="166" StrokeThickness="1" Stroke="#FF000000"/>
<Line X1="21" X2="16" Y1="166" Y2="171" StrokeThickness="1" Stroke="#FF000000"/>
<Line X1="16" X2="16" Y1="171" Y2="56" StrokeThickness="1" Stroke="#FF000000"/>
<Polygon Fill="#FFFFFFFF" Points="16,171 279.5,171 284.5,166 21,166 "/>
<Line X1="16" X2="279,5" Y1="171" Y2="171" StrokeThickness="1" Stroke="#FF000000"/>
<Line X1="279,5" X2="284,5" Y1="171" Y2="166" StrokeThickness="1" Stroke="#FF000000"/>
<Line X1="284,5" X2="21" Y1="166" Y2="166" StrokeThickness="1" Stroke="#FF000000"/>
<Line X1="21" X2="16" Y1="166" Y2="171" StrokeThickness="1" Stroke="#FF000000"/>
<Line X1="16" X2="16" Y1="56" Y2="171" StrokeThickness="2" Stroke="#FF404040"/>
<Line X1="284,5" X2="284,5" Y1="51" Y2="166" StrokeThickness="2" Stroke="#FF404040"/>
<Line X1="21" X2="285" Y1="51" Y2="51" StrokeThickness="2" Stroke="#FF404040"/>
<Line X1="16" X2="280" Y1="171" Y2="171" StrokeThickness="2" Stroke="#FF404040"/>
</Canvas>