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
191 views

I am considering applying server-side licensing for my javerScript application.

In the document below, there is a phrase “Our server-side licensing component is written in C++.”
(https://support.scichart.com/index.php?/Knowledgebase/Article/View/17256/42/)

However, there is only asp.net sample code on the provided github.
(https://github.com/ABTSoftware/SciChart.JS.Examples/tree/master/Sandbox/demo-dotnet-server-licensing)

I wonder if there is a sample code implemented in C++ for server-side licensing.

Can you provide c++ sample code?
Also, are there any examples to run on Ubuntu?

  • Gopika V asked 2 weeks ago
  • last active 5 hours ago
0 votes
12k views

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
10k views

Hello,

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 4 years ago
  • last active 4 years ago
0 votes
12k views

Hi,
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
9k views

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
13k views

Hello,

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,
Darek

0 votes
0 answers
9k views

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.

1 vote
11k views

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
7k views

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 8 years ago
  • last active 8 years ago
0 votes
11k views

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
8k views

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.

Thanks.

  • Sven Fink asked 9 years ago
  • last active 9 years ago
0 votes
17k views

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
14k views

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>()
    {
        Colors.Red,
        Colors.Yellow,
        Colors.Green,
        Colors.Orange,
        Colors.Blue
    };

    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];
        counter++;

        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}}"/>
</Style>

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,
Martin

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
13k views

I have a chart with FastImpulseRenderableSeries.

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

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
13k views

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 vb.net 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,

Cheers,
Saurabh

  • Saurabh asked 9 years ago
  • last active 9 years ago
1 vote
15k views

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.

Thanks.

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

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies