If i do this:
public void createTestGraph()
{
var series = new FastLineRenderableSeries()
{
SeriesColor = Colors.Red,
DataSeries = GetDataSeries()
};
var xAxes = new AxisCollection()
{
new NumericAxis()
};
var yAxes = new AxisCollection()
{
new NumericAxis()
};
var surface = new SciChartSurface()
{
ChartTitle = "Rendered In Memory",
XAxes = xAxes,
YAxes = yAxes,
RenderableSeries = new ObservableCollection<IRenderableSeries>() { series },
Annotations = new AnnotationCollection()
{
new BoxAnnotation()
{
X1 = 10,
X2 = 30,
Y1 = 10,
Y2 = 40,
Background = new SolidColorBrush(Colors.Green),
},
new VerticalLineAnnotation()
{
X1 = 35,
Stroke = new SolidColorBrush(Colors.Yellow),
StrokeThickness = 3,
ShowLabel = true,
LabelPlacement = LabelPlacement.Axis
}
}
};
ThemeManager.SetTheme(surface, "Chrome");
surface.Width = 1000;
surface.Height = 1000;
// Export to bitmap
var bitmapSource = surface.ExportToBitmapSource();
GraphTools.SaveBitmapToFile(bitmapSource, "D:\\TestChart.png");
bitmapSource = surface.ExportToBitmapSource();
GraphTools.SaveBitmapToFile(bitmapSource, "D:\\TestChart2.png");
I get the following:
In TestChart.png everything is as expected,
in TestChar2.png the BoxAnnotation is missing…
The effect of missing BoxAnnotations occors also in other not so clearly defined circumstances which gives me major headaches when trying to produce graphs for reports… Is there a bug oder an oversight of my part ?
(Using Old Version 3.1.0.4549)
- hbruns asked 8 years ago
- You must login to post comments
It’s a bug, and it has reported by several users at the moment, and we are fixing on the v4.0.x branch very shortly!
Best regards,
Andrew
- Andrew Burnett-Thompson answered 8 years ago
- You must login to post comments
Please login first to submit.