Pre loader

Missing Box Annotations when exporting to Bitmaps

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

0
0

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)

Images
  • You must to post comments
0
0

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

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies