Pre loader

Series don't render when using Palette provider

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

Hi,
Been following this doc to color FastLineRenderableSeries datapoints but my series won’t show. Here is my OverrideStrokeColor after implementing the Interface

public Color? OverrideStrokeColor(IRenderableSeries rSeries, int index, IPointMetadata metadata)
    {
        ColorMetadata colorMetadata = metadata as ColorMetadata;
        if(colorMetadata == null) 
            return null;

        switch (colorMetadata.Color.ToLower().Trim())
        {
            case: blah blah
                       return Colors.blahblah

            default:
                return null;
        }
    }

And the metadata class

public class ColorMetadata : IPointMetadata
{
    public string  Color    {get; set;    }

    public ColorMetadata(string color)
    {
        Color = color;
    }

    public bool IsSelected { get; set; }

    public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
}

And the series

<s:FastLineRenderableSeries Stroke="Green"  
                                        StrokeThickness="1" 
                                        PaletteProvider="{StaticResource pointColorProvider}"
                                        DataSeries="{Binding Source}">

Without forgetting (in UserControl.Resources)

 <pointColorProvider:ColorPaletteProvider x:Key="pointColorProvider"/>

and appending each point with its metadata
like dataSeries.Append(Date, data, new ColorMetadata(“green”));
All works great (without paletteProvider) except when I introduce PaletteProvider=”{StaticResource pointColorProvider}”. Tried with breakpoints in my PaletteProvider class, only OnBeginSeriesDraw gets hit, OverrideStrokeColor is never hit. Please help.

Version
4.1.2.8699
  • Andrew Burnett-Thompson
    Have you put a breakpoint in the PaletteProvider and can you determine if the line ‘return Colors.blahblah’ is hit? And is this color TRANSPARENT or null or a real color?
  • Kilosa Magali
    Yes, I have a break point on the first line of the method and the all the returns of the switch (including return Colors.blahblah), all are not hit. The method is not hit at all (Only OnBeginSeriesDraw is hit). The colors are real like Colors.Red.
  • You must to post comments
Showing 0 results
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