Hi,
thank you very much for providing me with the syncfusion toolkit for drawing charts.
I am trying to add an annotation to a sfchart control carrying a series having custom numerical axis.
Is this a bug or am I doing somethung wrong?
Expected:
Obtained:
How to reproduce: Remove the Folowing lines from the following code:
Lines to remove:
this.fastlineSeries.XAxis = xAxis;
this.fastlineSeries.YAxis = yAxis;
Code:
namespace test1
{
/// <summary>
/// An empty page that can be used on its own or navigated to within a Frame.
/// </summary>
public sealed partial class MainPage : Page
{
private SfChart chart = new SfChart();
private FastLineSeries fastlineSeries = new FastLineSeries();
public MainPage()
{
this.InitializeComponent();
}
private void button_Click(object sender, RoutedEventArgs e)
{
TextAnnotation textAnnotation = new TextAnnotation();
textAnnotation.CoordinateUnit = CoordinateUnit.Axis;
textAnnotation.X1 = 0.5;
textAnnotation.Y1 = 0.5;
textAnnotation.Text = "symbol";
textAnnotation.FontSize = 16;
chart.Annotations.Add(textAnnotation);
}
private void Page_Loaded(object sender, RoutedEventArgs e)
{
NumericalAxis xAxis = new NumericalAxis();
NumericalAxis yAxis = new NumericalAxis();
this.fastlineSeries.XAxis = xAxis;
this.fastlineSeries.YAxis = yAxis;
this.chart.Series.Add(this.fastlineSeries);
this.chartGrid.Children.Add(chart);
}
}
}
The whole solution is attached as Zip-File.
Any ideas?
Thank you!
Attachment:
test1_ce573e83.zip