Pre loader

Tag: PaletteProvider

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 votes

paletteProvider transparent colour is not working.

I tried with parseColorToUIntArgb(“#ffffff00”) and parseColorToUIntArgb(“#ffffff00”, 0) to replace the colour with transparent. But its not working.

I want ho hide the marker on the chart if the value is less than a limit. Is any other possibility to hide the marker based on value?
can you check the image, i want to show only the yellow marker.
one more error i am getting from typescript
“Type ‘undefined’ is not assignable to type ‘TPointMarkerArgb'”.

0 votes


I have a line series with 500k to 8 million data points and I use the StrokePaletteProvider to highlight certain peaks in different colors. But the colors only appear right at a certain zoom level, without zooming in it is a mixture of my default line color and the chosen StrokePaletteProvider color. Is there anything I can do about this?

  • Roland D asked 5 years ago
  • last active 5 years ago
0 votes

I want to implement a chart that represent currency changed rate, so that the chart will show a rise with a green point and a fall with a red point.

in the image I’ve uploaded I’ve used Custom PaletteProvider to manipulate the colors accordingly.

what I want to implement is instead of coloring the Point (Ellipse) I want to load an Image.
the closest i’ve got is to load a single image to all the points, without theme changing (red or green) accordingly.

I did managed to implement that exact behavior in iOS.

how could I implement a dynamically changing Sprits in a PaletteProvider ?

Thanks in advance…

0 votes

How to achieve per-point shapes? I need to have, say, triangle, ellipse, and square shapes on a single line series. It’s pretty straightforward for iOS by overriding the StyleForPoint() method and providing shapes and colors. However, I had hard times figuring it out for Android (Xamarin). I found how to change colors of markers but not shapes. Could anyone help me with this, please?

  • rubs00 asked 6 years ago
  • last active 6 years ago
2 votes


This is my data structure which needs to be plotted using XyScatterRenderableSeries:

public class Measurement
        public Color Color { get; set; }
        public double X { get; set; }
        public double Y { get; set; }

I need to plot a list of measurements. It can be done in one series but each point color needs to be read from measurement data. To achieve that I’ve used a custom PaletteProvider and the result is satisfactory:

single series

It looks good but there is a huge problem with a performance. If I try to pan, zoom etc. the application horribly slows down.
Also I’ve tried to group measurements by Color and then plot a couple of series with specified color but the result is the same.

I am attaching a simple application which shows the problem.
Hope anyone can help me.

Best regards,

0 votes
0 answers

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

                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"  
                                        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.

1 vote

Hi SciCharters,
I would like to create a color coded 2D scatter plot.
My approach is the IPointMarkerPaletteProvider interface. It works, but I have experienced a huge performance difference when I individually colored every datapoint of my 2D chart and using a static color.
When I use the same provider but only a single color there is no performance issue at all.

Here is the relevant code of my PointMarkerPaletteProvider interface:

 public PointPaletteInfo? OverridePointMarker(IRenderableSeries rSeries, int index, IPointMetadata metadata)
            var myMetaData= metadata as MyRecordMetadata;
            var colorBarPosition = GetColorBarPosition(myMetaData.PlotValue);

            _pointMarkerColorOverrides.Fill = _ColorBar[colorMapPosition];
            _pointMarkerColorOverrides.Stroke = _ColorBar[colorMapPosition];
             return _pointMarkerColorOverrides;

The _ColorBar contains only 256 values and the Color is selected according to the myMetaData.PlotValue in GetColorBarPosition().
The series is plotted as expected, but it takes “ages”(seconds for 4000 data points) for rendering it on the chart.
If I replace the assignments of _pointMarkerColorOverrides.Stroke and _pointMarkerColorOverrides.Fill with one static color, there’s no performance issue at all.

I was just curious if that is the expected behaviour? Would it be better (in terms of performance) to switch to another chart type (e.g. heatmap chart) to plot color coded values?

  • Tim asked 7 years ago
  • last active 7 years ago
0 votes

Hello again!
I’m creating fastlinerenderableseries and I need to show only one part of this line. For this purpose I’m using palette provider. But there is a strange side effect: when I set transparent color for line segment, it also paints lines on the chart (see pictures below-1 before switching on segment painting, 2 – after).
How can I fix it.

Thanks in advance
P.S. I ‘ve also attached project below.

  • Egor asked 9 years ago
  • last active 9 years ago
0 votes

I am using heatmaps in my application and would love to use the same color scheme that is used for those also in my xyz scatter plots. I know how to make palette providers I just don’t know how to get a specific color that is defined by a lineargradientbrush (defined in xaml) for a specific (relative value? 0.0-1.0 ). Is this possible?

1 vote

Hi there,

We are looking for a high-performance charting library, hence Im testing scichart and I am very excited about it.

Our application has an very abstract processing mechanism which categorize incoming data and dynamically adds channels to the plot. Each sample is – like we call it – a ProcessedData object which is a base class containing extented information about the sample like “is valid” or “is out of range”. Eg. if measureing a voltage, we need to mark data points on the chart that are “out of range” or similar.
I’d thought to start with the “DragHorizontalThreshold” which uses the RedIfOverThresholdPaletteProvider to change the color of the plot.
Do you have an idea if it is possible to implement a custom PaletteProvider which takes respect of an IsValid-property? Acutally i do not have a clue how to.


  • Sven Fink asked 9 years ago
  • last active 9 years ago
0 votes

Have a good day!

In the new SciChart version (5th august) I’ve got this result of painting line using palette provider (image 1). Is there any way to make it look like this (image 2)?

  • Egor asked 9 years ago
  • last active 9 years ago
1 vote

Hello together,

I have implemented a PaletteProvider which colors the whole Series depending on the Series always the same.

public class OwnPaletteProvider : PaletteProviderBase
    private readonly Dictionary<IRenderableSeries, Color> seriesColorsDictionary = new Dictionary<IRenderableSeries, Color>();

    private List<Color> availablesColors = new List<Color>()

    private int counter = 0;

    public override Color? GetColor(IRenderableSeries series, double xValue, double yValue)
        // Get the specific Color for the specific Series
        if (seriesColorsDictionary.ContainsKey(series))
            return seriesColorsDictionary[series];

        // Series doesn't have a color
        // Add new Color from the list for this series in a RoundRobin-way
        var newColorForSeries = availablesColors[counter%availablesColors.Count];

        seriesColorsDictionary.Add(series, newColorForSeries);

        return newColorForSeries;

The problem is that I have also in this Series PointMarkers which should have the same Color as the RenderableSeries. I thought, I could create a Style which binds to the Color of the RenderableSeries, but this is not working (see image in attachment).

<Style x:Key="pointMarker" TargetType="{x:Type s:BasePointMarker}">
    <Setter Property="StrokeThickness" Value="5" />
    <Setter Property="Fill" Value="{Binding Path=SeriesColor, 
        RelativeSource={RelativeSource AncestorType={x:Type s:FastLineRenderableSeries}}, Converter={StaticResource StringToBrushConverter}}"/>
    <Setter Property="Background" Value="{Binding Path=SeriesColor, 
        RelativeSource={RelativeSource AncestorType={x:Type s:FastLineRenderableSeries}}, Converter={StaticResource StringToBrushConverter}}"/>

I could imagine that the PaletteProvider doesn’t support this. I would need a dynamic coloring of the RenderableSeries and the PointMarkers because the amount of the Series are flexible.

My current solution for this problem is to set the color in the ViewModel, but this seems to me not very nice, because I what to have only Bindings in the ViewModel and the “Styling” and the “Coloring” of the Chart should be done in the Xaml Code with some converters are with the PaletteProvider.

Why questions are:

  • How is it possible to color the FastLineRenderableSeriesor or the XyScatterRenderableSeries dynamically, also when new ones are added or deleted dynamically from the Xaml Code?
  • Can the PaletteProvider have an influence of the Color MarkerPoints?

Best regards,

PS: Sry I couldn’t use NuGet because the Port 81 is blocked in our company, so you have to add the SciChart library by our own.

1 vote

I have a chart with FastImpulseRenderableSeries.

<s:FastImpulseRenderableSeries StrokeThickness="3" SeriesColor="LawnGreen" x:Name="IdentifiedPeakSeries" YAxisId="PeakAxis">
                      <s:EllipsePointMarker Width="0" Height="0" Fill="LawnGreen"/>

The color of each Impulse depends on a own type of each result. There are three different types which should have color green, yellow and red. In the program I use the XyzDataSeries to set the x and y values of the impulse and the z-value as the type to get the color.

var seriesId2 = new XyzDataSeries<double, double, int>();

for (int i = 0; i < SamplePeakList.Count(); i++)
         seriesId2.Append(SamplePeakList[i].Mass / 1000, SamplePeakList[i].Intensity, peakType);

But the IPaletteProvider has no overridable method with x, y and z value!
How can I pass the impulsetype to the palette provider to set the corresponding color?

0 votes

Hello Everyone,

I am using trial version of Sci Chart. I am interested in using sci chart to build a stock charting program. I would be glad if someone can help me. Though I am using but you can post code in c# also.

Q-1) How to change the color of a particular candle or wick For e.g how to change color of five candle of my choice. I had used property UpWickColor and UpBodyBrush but it effects all data series.

Thank you,


  • Saurabh asked 10 years ago
  • last active 10 years ago
1 vote

I want to color individual points in the line. How can it be done with the SciChart?

Attached is an image of what I want to accomplish.


  • Miguel Hau asked 10 years ago
  • last active 10 years ago
Showing 15 results