Pre loader

Heatmap resampling

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 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-dev.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?

Version
5
  • You must to post comments
0
0

Hi Mike

The heatmap is not resampled. In v5 we do however perform some optimisations internally (such as not bothering to write to a pixel more than once).

You can – if you have source code access – modify our heatmap source for direct access to the RenderSurface. In v5 we basically draw to texture then blit that texture to the screen. However other than that, it’s not possible to modify how the heatmap draws.

In fact, you might be able to achieve this by overriding one method and customizing the drawing.

Try this:

public class HeatmapCustom : FastUniformHeatmapRenderableSeries
{
    protected override void GetColorDataForTexture(int xStartInd, int textureWidth, int xInc, int yStartInd, int textureHeight, int yInc)
    {
        var pp = PaletteProvider as IHeatmapPaletteProvider;
        var colorMap = ColorMap;

        Action<int> iterateX = new Action<int>(y =>
        {
            // This function populates an integer array of ARGB colors 
            var xInd = xStartInd;
            var yInd = yStartInd + y * yInc;
            for (int x = 0; x < textureWidth; x++, xInd += xInc)
            {
                _colorData[y * textureWidth + x] = GetColor(yInd, xInd, colorMap, pp);
            }
        });

        var allowsMultiThread = GetParentSurface().EnableMultiThreadedRendering;
        if (allowsMultiThread)
        {
            Parallel.For(0, textureHeight, iterateX);
        }
        else
        {
            for (int y = 0; y < textureHeight; y++)
            {
                iterateX(y);
            }
        }
    }
}

I have made BaseHeatmapRenderableSeries.GetColor protected virtual for you in build v5.0.0.10614 so that you can use this workaround.
This build is being published now to our nightly build feed.

Best regards,
Andrew

  • 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