SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, iOS Chart, Android Chart and JavaScript Chart Components

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.