i am tried to use this code in window.cs file …it is not showing any output. kindly let me know the steps what i have to do for getting output
// Create the chart surface
var sciChartSurface = new SciChartSurface();
// Create the X and Y Axis
var xAxis = new NumericAxis() { AxisTitle = "Number of Samples (per series)"};
var yAxis = new NumericAxis() { AxisTitle = "Value"};
sciChartSurface.XAxis = xAxis;
sciChartSurface.YAxis = yAxis;
// Specify Interactivity Modifiers
sciChartSurface.ChartModifier = new ModifierGroup(new RubberBandXyZoomModifier(), new ZoomExtentsModifier());
// Add annotation hints to the user
var textAnnotation = new TextAnnotation()
{
Text = "Hello World!",
X1=5.0,
Y1=5.0
};
sciChartSurface.Annotations.Add(textAnnotation);
- cse dbmt asked 4 years ago
- last edited 4 years ago
- You must login to post comments
I can’t see any problems in your code, if you’ve added the chart to a WPF Window or parent control it should draw.
I would suggest working through our tutorials on SciChart WPF. We have a set of tutorials which use just code-behind here:
WPF Chart Tutorials (Code Behind)
and a set of tutorials for MVVM here
This will give you an understanding of the SciChart APIs and how to do common features. After that if you are still stuck, feel free to ask questions.
Best regards,
Andrew
- Andrew Burnett-Thompson answered 4 years ago
- You must login to post comments
Please login first to submit.