Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to make line with rounded (smooth) corners with AndroidPlot
    primarykey
    data
    text
    <p>I have a small problem with ploting my graph. On a picture below is what I have already done.</p> <hr> <p>The graph should represent the actual signal strength of available Wi-Fi network(s). It's a simple <code>XYPlot</code> here data are represented with <code>SimpleXYSeries</code> (values are dynamically created).</p> <p>Here is a little snippet of code (only for example):</p> <pre><code>plot = (XYPlot) findViewById(R.id.simplexyPlot); series1 = new SimpleXYSeries(Arrays.asList(series1Numbers), SimpleXYSeries.ArrayFormat.Y_VALS_ONLY, "Link 1"); f1 = new LineAndPointFormatter(color.getColor(), null, Color.argb(60, color.getRed(), color.getGreen(), color.getBlue()), null); plot.addSeries(series1, f1); </code></pre> <p>The example in the picture is a dynamic simulation of dB changes. Everything works, I guess, correctly, but what I want to achieve is to have line with "rounded" corners (see the picture to see what I mean).</p> <p>I already tried to customize LineFormatter:</p> <pre><code>f1.getFillPaint().setStrokeJoin(Join.ROUND); f1.getFillPaint().setStrokeWidth(8); </code></pre> <p>But this didn't work as expected.</p> <p><img src="https://i.stack.imgur.com/VyH4R.png" alt="Enter image description here"></p> <p>Note: The <a href="https://play.google.com/store/apps/details?id=com.farproc.wifi.analyzer" rel="nofollow noreferrer">Wifi Analyzer</a> application has a similar graph and its graph has the rounded corners I want. It looks like this:</p> <p><img src="https://i.stack.imgur.com/jILfk.png" alt="Enter image description here"></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload