how did I use select feature by radius Tool and get radius - pyqgis

How do I obtain the value in the top right corner of the screen when using the "Select feature by radius" function in QGIS, or set it manually, using pyqgis?
I tried to use iface.actionSelectRadius, but I couldn't find any relevant methods.

Related

Customizing echart Horizontal select brush functionality to select single point & range of points in x-axis

We are trying to implement functionality using echarts that allow the user the select a single & range of samples/points on x-axis . which looks something like this.
we started with the Horizontal select feature from the below link, which is working fine for the Range of samples. how to implement the same for a single sample?
https://echarts.apache.org/examples/en/editor.html?c=bar-brush

Getting the div screen location in Leaflet

I am working on a project using Leaflet. I want to place a label for objects on the map. I don’t want the label to appear on the map. I want the label placed above the map, but at the screen or div Left location from a latLng point.
I can’t seem to get the correct position using the functions available. Is there some example I can look at to give me insight? I would think Leaflet could do this.
The key here is to leverage the latLngToContainerPoint() method of L.Map - it will give you the pixel coordinates relative to the map container of the L.LatLng passed.
So create a container for a tick...
<div id="topbar"><span id="toptick">↓</span></div>
<div id="leaflet"></div>
...and use CSS to ensure it's on top of the map container, and has the same width. Then, run a function to translate the map point you want into an offset relative to the top-left corner of the map container...
function repositionEdges(){
var offset = map.latLngToContainerPoint(geopoint);
}
...run that after map initialization, and after every movement of the map...
repositionEdges();
map.on('move zoom', repositionEdges);
...and finally, inside that function, shift the tick horizontally tweaking its style...
function repositionEdges(){
var offset = map.latLngToContainerPoint(geopoint);
document.getElementById('toptick').style.left = offset.x + 'px';
}
You can see a working example at https://next.plnkr.co/edit/60qrWND50mCOQ11T?preview .
This is just one approach. The specific implementation will be different if you're using more than one point, or if you want to use <canvas> for drawing the ticks.
See also the graticule, edge scale bar and edge markers plugins from the Leaflet plugins list. Those plugins contain implementations of similar concepts.

Display color legend on tableau chart

Is there a way to display color legend on the top left side of a chart .
I have 4 charts in a tableau dashboard and if i display all the legends for all the 4 charts on the bottom it looks busy so I want to include the legends in the charts.
Please help me on this with details steps.
What you want is to make the "legend" a floating object instead of the default tiled object.
To achieve this; You can hold down the Shift key, then drag the legend using the left mouse button while still holding down the Shift key. Drop the legend wherever you wish on the dashboard. Make sure you only release the Shift key after you have dropped the legend at your desired destination.
Warning: Depending on the size of the dashboard you selected, floating objects move around when end users view your dashboard on a device with different screen resolution. To avoid this you can use the "Exactly" size option and define a size range which suits your needs.
To include legends on top left Side of the chart.
Follow steps here as under:
Step1:
Select legends, Right Click on legends top part and select floating and place inside the chart on the top part below heading of Graph as :
So you can follow above steps to add legends in all 4 charts.
Output will look like as
So in this way your legends will not be clumsy and you can describe visualization in a better manner.

Interactive bar chart.user changes y axis value at runtime by dragging it

For example 3 columns are there with y axis value as 100,200,300 in barcharts.
User select one column alone and drag it to 500 value in y-axis.
How to achieve this?
Is it available in library like androidplot or aChartPlugin?
If not which plugin support this requirement.Our project is for Android tablets
Please provide me sample code for this requirement.Thanks in advance.
To my knowledge no library exists for Android that provides 'out of the box' capabilities to drag and reorganize data. Having said that, any library that provides you with a way to correlate touch events to data elements and also supports dynamic updates should be suitable.
If you have specific requirements about how the "drag" is implemented then you may end up having to roll your own library or customize an existing one to your needs. If not, here's a basic workflow you could implement with Androidplot that represents the drag operation as a cursor:
1 - Detect selections using an OnTouchListener. Here's an example of a bar plot that allows bar selection via touch. Gives a full example of converting screen coords to model elements etc. Create and add an instance of XValueMarker denoting the current position of the selection. (An XValueMarker is basically a customizable vertical line marking an x-val.
2 - Detect "drag" events using an OnTouchListener. Here's an example that detects zooming and scrolling. It's not the same thing exactly but the scrolling logic is close enough to give you the general idea.
3 - As the user drags, update the position of the XValueMarker by XValueMarker.setValue(Number).
4 - Once the "drag" ends, remove the XValueMarker and modify the underlying XYSeries to reflect the change using basic data structure manipulation(s).
And of course remember to always call plot.redraw() after each operation that is expected to alter the appearance of the plot in some way.

Visio 2010: can one change predefined shapes into others?

I am drawing a visio diagram and would like to change (i.e. reduce) the radius of the corners of some of my rounded boxes.
I searched the program's help and googled for >1/2 hour but can't find any hint on how to achieve this - at least none that works.
The context dialog shows a Rounded corner section (Right-click => Format => Line), but any change done there has no effect whatsoever. Does one maybe have to "unprotect" these settings? If so: how?
Any expert who knows how to change the corners' radius?
Later Edit: I just realized: I had used a flow chart symbol "Rounded Process" instead of a plain vanilla rounded box to draw this diagram. That's why I can't change these corners!
Is there an elegant way to globally change a shape into another type, i.e. these flowchart shapes into plain vanilla boxes? Ideally while keeping the associated text?
M.
not without coding.
However, I'm pretty sure that Sandrilla has a ready to use tool.
It's available for reasonable money. http://www.sandrila.co.uk/
You can create your own shape in such situation, you can can create your own Stencil and then add the your predefined shapes into it. To add the predefined shapes into the stencil just follow the procedure
Select the shape from an existing Stencil and Right click on it
From the Menu select 'Add to My Shapes'
Create New stencil or add it to an existing Stencil.
Now you can edit the master shape but before that you have to put the Stencil in the Edit mode.
Right click on the newly added shape in the Stencil and click 'Edit Master' -> 'Edit Master Shape'
You can now modify the Shape as per your need , for ex. If you want to edit the Corner of the Shape then you right click on the Shape in the Master and then Select 'Format' - > 'Line' and then select type of corner from the 'Round corner' section.