Pre loader

SVG image interpolation

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

We have a scalablecustomannotation and i have embedded a png in side the snnotation svg. currently when I zoom in on the svg it does interpolation/smoothening of the pixels by default. what would like to set is pixellated mode where there is no automatic smoothening.

Any ideas how to achieve that?

E.g. please see the video below, what you see on the right in the video is what I get from scichart. what I am trying to achieve is the effect in the left window

video

Version
3.1.333
  • You must to post comments
1
0

Nervemind I manged to find a solution for this. For anyone else who may have a similar issue, the solution is to add extra options to your SVG directly. style="image-rendering: pixelated"

eg.

            svgString =
            `<svg  
                id="bmp"
                x="0"
                y="0"
                width="${heatMapDataSeriesRef.current.xMax}" 
                height="${heatMapDataSeriesRef.current.yMax}" 
                preserveAspectRatio="none"
                viewBox="0 0 ${img.width} ${img.height}">
               <image style="image-rendering: pixelated" id="box_2_rect" href="${imageScanned.data}"/>
        </svg>`

Pramod

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.