live update network graph and labels in anychart graph - anychart

I am wondering if there is a way lo live update nodes and node labels.
it seems to me that the function set and .append is not working on the network graph.
https://playground.anychart.com/yJyq7cMc/1
Maybe someone can help?

If you need to update the label's content or add/replace points, then you need to apply to the chart the updated data.
For details, check the live sample.
If you need to change the label's appearance settings, then you can call the label's API on the fly after the got rendered.

Related

Azure Maps - How to set drawing manager layers z-index to the top?

In my design page, the user will be creating/drawing new shapes, in addition to adding image overlays. I'm finding that any shapes drawn using the drawing manager are rendering underneath any image overlays added to the map, see below:
I'd like to know how to achieve a couple of tasks:
1 - How to set the drawing manager so any shape (rectangle/point/circle etc be default is always added as an upper/top layer when the drawingcomplete event has fired, that way the shapes will always appear above any images added to the map.
2 - How to programatically change the order of the various layers created during design, given the user may want to adjust the z-index of the various layers to suit their own endering requirements.
The MS docs here is not really helping me understand how to achieve the above, but also doesnt mention anything about shapes/layers that currently reside within the drawing manager.
Partial answer but along the right tracks...
We can retrieve the shapes (drawing manager layers) from the drawing manager so we have a reference to them.
When i add an image overlay, before actually adding/rendering it to the map, i would first get the shape layers from the drawing manager, then remove them from the map.
Next we add the image overlay to the map and add the shape layers back in as well, its the order that we add/remove the layers that seems to be relevant here.
Once i had added all layers back to the map in the chosen order, i was still able to put the drawing manager into edit mode and select the shape for editing, so i beleive this will work as my solution going forwards.
// Create the image layer
var imageLayer = new atlas.layer.ImageLayer({
url: 'myImageUrl,
coordinates: coordinates
})
// Then get the existing shapes (layers) from the DM
var layers = drawingManager.getLayers();
console.log(layers);
// Remove the shapes.
map.layers.remove(layers.polygonLayer); // polygonLayer as an example...
// Add new image overlay, then the shapes
map.layers.add([imageLayer, layers.polygonLayer]);

SciChart changing the color map on a FastHeatMapRenderableSeries

I'm a long-time user of SciChart, but it's an old version (3.1). I've just started using FastHeatMapRenderableSeries for the first time, and there is a requirement for a user to alter the chart's gradient stops. I've implemented a UI to do this (see image), which involves dragging markers that updates their respective gradient stop within the ColorMap's LinearGradientBrush. It's working in as much as gradient changes can be seen in the chart's HeatColorMap (not shown on this screenshot), and also in my "drag" control (a Rectangle whose Fill is bound to the ColorMap's brush).
The problem is that the colours within the chart itself don't change - perhaps I was being a little too hopeful that this would happen automatically! Is this possible, or will I have to recreate the series each time there has been a change to the gradient?
We actually have this working in a later version of SciChart. Im not sure which version exactly but it was introduced at some point. Have a look at this forum post which discusses a bug in the heatmap color map binding in v5.
In the v6 examples suite, you can drag the heat map legend and recolour the chart automatically, so we know in principle this works.
Very cool image by the way!

Auto Scrolling Within a View with React Native

Currently working on a project where I want to implement Auto Scrolling in a view. Is this possible with React Native? I have searched the internet and have not come across anything that shows this capability.
Most Stack Overflow questions and YouTube videos deal with scrolling between different views (not within the same view), scrolling to the bottom (with Scroll To), infinite scrolling, or scrolling responsively. But I haven't been able to find anything dealing specifically with auto-scrolling within a given view.
Please let me know. Thank you in advance.
Something that just came to my mind would be like...
Store current x and y offset values of the scrollview in the component's state, setState every 'x' seconds with the new offset and call scrollTo() method of scrollview. That would change the x and y offset repetitively and make it looks like is auto scrolling.
PS: I know is not a full solution and should be posted in the comments section but I'm not able to comment yet... hope this helps anyway :)

Is it possible to change the color of street in g-map?

I have a WPF project that shows all of buses route over the city and the current position of every bus. I can Show all positions using markers and also all of routes but the routes are shown by drawing a line inside the streets.
It is going to be more efficient if I can change the color of whole street's width instead of usual way(drawing line).
Is it possible? If yes How?
If you're using GMap.Net, the best would be to update to the latest version and go through the maps until you find a map with a colour scheme that works for you. The demo winforms project in the repo: https://github.com/radioman/greatmaps allows for easy switching between maps to find the map you like.

How to make Map.Center change instantly

I have a map control with its center bound to a GeoCoordinate property in the viewmodel.
The map's center properly changes whenever the property changes.
By default, the map has a animation for changing its view (it gradually moves to the new location).
However, I do not want this animation.
I would like the map to instantly center on the new location.
I have already set the animation of the map: AnimationLevel="None", but it didn't seem to change anything.
The animation normally looks really nice, however, this app only deals with locations in a very small view. With small changes to the map's center, the animation just makes everything look like its shaking and it takes too long to finish.
As always, please let me know if I need to clarify anything.
I had have related problem. Try to set AnimationLevel to something else and than set back to None

Resources