Pre loader

CreateCloneOfSurfaceInMemory axis tick value display different

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

below is my source code.
Only Changed style.
result is different.

the Yaxis Value is different.

Please Someone help me..

call
ExportToStream(SciChart.Core.ExportType.Png, true)

protected override SciChartSurfaceBase CreateCloneOfSurfaceInMemory(System.Windows.Size newSize)
{

        var cloned = (SciChartSurface)base.CreateCloneOfSurfaceInMemory(newSize);
        if (cloned is BaseChart2DSurface specCloned)
        {
            if(cloned.XAxis is NumericAxis numXaxis)
                numXaxis.Style = (Style)Application.Current.Resources["xAxis-Export-Style"];

            cloned.XAxis.TickLabelStyle = (Style)Application.Current.Resources["BaseTickLabel-Export-Style"];
            cloned.XAxis.MajorGridLineStyle = (Style)Application.Current.Resources["BaseAxis-Export-GridLineStyle"];
            cloned.XAxis.MajorTickLineStyle = (Style)Application.Current.Resources["BaseAxis-Export-GridLineStyle"];
            cloned.XAxis.MinorGridLineStyle = (Style)Application.Current.Resources["BaseAxis-Export-GridLineStyle"];
            cloned.XAxis.MinorTickLineStyle = (Style)Application.Current.Resources["BaseAxis-Export-GridLineStyle"];

            cloned.XAxis.TickTextBrush = System.Windows.Media.Brushes.Black;

            if (cloned.YAxis is NumericAxis numYaxis)
                numYaxis.Style = (Style)Application.Current.Resources["yAxis-Export-Style"];

            cloned.YAxis.TickLabelStyle = (Style)Application.Current.Resources["YAxis-Export-TickLabelStyle"];
            cloned.YAxis.MajorGridLineStyle = (Style)Application.Current.Resources["BaseAxis-Export-GridLineStyle"];
            cloned.YAxis.MajorTickLineStyle = (Style)Application.Current.Resources["BaseAxis-Export-GridLineStyle"];
            cloned.YAxis.MinorGridLineStyle = (Style)Application.Current.Resources["BaseAxis-Export-GridLineStyle"];
            cloned.YAxis.MinorTickLineStyle = (Style)Application.Current.Resources["BaseAxis-Export-GridLineStyle"];

            cloned.YAxis.TickTextBrush = System.Windows.Media.Brushes.Black;
            cloned.Background = System.Windows.Media.Brushes.Transparent;
        }
        return cloned;
    }
Version
6.5.0.11862
Images
  • Lex
    Hello, Could you please clarify – do you use a LabelProvider? We have also noticed you use an outdated SciChart version. Please upgrade to the latest one, which is SciChart v7.0.1.27055 currently, and let us know if you still experience this issue. Thanks in advance, Lex
  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.