Pre loader

Issue with constant column width on FastColumnRenderable Series after trying to migrate from 5.4 to 6.2

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

I am in process of trying to upgrade scichart on a wpf project from 5.4 to 6.2. Before I created a class like below to override what the column width would be. Now it state that FastColumnRenderableSeries does not have a method called GetColumnWidth to override. How can I do same thing with newer version? Thanks.

public class ConstantColumnRenderableSeries : FastColumnRenderableSeries
{
    public static readonly DependencyProperty ColumnWidthProperty =
        DependencyProperty
            .Register("ColumnWidth",
                typeof(IComparable),
                typeof(ConstantColumnRenderableSeries),
                new PropertyMetadata(default(IComparable), OnInvalidateParentSurface));

    public IComparable ColumnWidth
    {
        get => (IComparable) GetValue(ColumnWidthProperty);
        set => SetValue(ColumnWidthProperty, value);
    }

    protected override double GetColumnWidth(IPointSeries points, IRenderPassData renderPassData)
    {
        return ConvertToDouble(ColumnWidth);
    }

    private static double ConvertToDouble(IComparable comparable)
    {
        switch (comparable)
        {
            case null:
                return 0;
            case DateTime time:
                return time.Ticks;
            case TimeSpan span:
                return span.Ticks;
            default:
                return Convert.ToDouble(comparable, CultureInfo.InvariantCulture);
        }
    }
}
Version
6.2
  • You must to post comments
0
0

Nevermind it was because i had protected for the method.

  • 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