I want draw in plantuml MVC diagram, but shadow is not work as I want.
#startuml
digraph G {
node[shape=box, style=rounded, shadow_offset=7, shadow_blur=5];Model;View;Controller
View -> Model
Controller -> View
Controller -> Model
}
#enduml
I want to draw
Using the neato layout engine with extra node for background, you can create something that looks like a shadow.
Image:
Script:
graph {
layout=neato
node [pin=true shape=box style="filled, rounded" ]
under [
pos="0,-0.05"
color=none
fillcolor="black:white"
style="radial, rounded"
gradientangle=0
width=.8]
over [pos="0,0" fillcolor=white ]
}
Related
I have an object moving about a scene, which I exported as a .glb (model A).
Within Aframe I'm playing the animation on model A using the animation-mixer tag and can see the object moving around. Now what I'm trying to do is append another model (model B), so that model B is also moving around the scene. However, model B just stays in place - at the specified model A position.
Is there a way to accomplish this in Threejs/Aframe?
I have revisited this technique and have the below code, so far, but the position of the model flickers between it's static position and where it's being set to in the tick.
<a-entity id="mantaray-path" gltf-model="#mantaray-path-glb" animation-mixer="timeScale: 1; loop: true;" pathanim></a-entity>
<a-entity id="mantaray" gltf-model="#mantaray-glb" animation-mixer="timeScale: 1;"></a-entity>
AFRAME.registerComponent("pathanim", {
init: function() {
this.el.addEventListener('model-loaded', this.update.bind(this));
},
tick: function() {
this.el.object3D.traverse(function(child) {
if (child.name == "mantaraypath") {
mantaray.object3D.position = child.position;
}
});
}
});
I'm trying to draw a SVG map with two layers using Kartograph.py.
The end result should be a single country on the first layer (say France) with the main rivers on a second layer.
The first layer with France borders works perfectly, but then I would like to add additional topological information on top of the map (say rivers). I have found the shapefile describing the rivers. However, when I add it in the JSON configuration file as shown below, the rivers are out of the country (but inside the square defined by the country, see image).
The documention of Kartograph mentions crop-to, but I cannot get it to work. When I add this option to crop the second layer to the first one, all the river data does not appear.
{
"proj": {
"id": "laea"
},
"layers": [
{
"id": "layer0",
"src": "FRA_adm2.shp",
"simplify": 2
},
{
"id": "rivers",
"src": "rivers.shp",
"crop-to": "layer0", /* This is not working */
"simplify": 0
}
]
}
I have the following codes:
The code generated by the API does not work:
digraph g {
graph [rankdir="LR" ,nodesep="1" ,compound="true" ];
subgraph cluster0 {
graph [label="<TABLE><TR><TD>End</TD></TR></TABLE>" ,shape="plaintext" ];
1 [ shape="none" ,fontcolor="white" ];
};
}
Changing the generated to this works:
digraph g {
graph [rankdir="LR" ,nodesep="1" ,compound="true" ];
subgraph cluster0 {
graph [label=< <TABLE><TR><TD>End</TD></TR></TABLE> > ,shape="plaintext" ];
1 [ shape="none" ,fontcolor="white" ];
};
}
The simple use of Label=< instead of Label=" Makes it work.
I'm using the latest version of Graphviz API and am coding in C#. I add the label as below:
var newBlockSubgraph = new SubGraph<MyClass> { Label = stringBuilder.ToString()};
Is it possible to do the change in the generated code? I need the label to be Label=<
I have recompiled the Graphviz4Net with the necessary changes. The official compiled version has not implemented and compiled the bug fix.
You can download the version I compiled here. PS.: Host removed file and i do not have it available atm.
It can now generate the code Label=< in dot code
Example of syntax
var newBlockSubgraph = new SubGraph<State> { Label = "<<b>Hello World</b>>" };
I am using highcharts to graph multilple series (several lines with multiple points each on one chart). The user selects one or more points on multiple lines. Data about the selected points is shown in a gridview on my asp page. After some server side logic I would like to redraw the page and put an image, marker, flag or some other way of showing the user the redrawn graph with those points "marked".
I have been playing with jquery to add an image (small circle) to the div where the chart is rendered but not having much luck with the X/Y position of the image within the div.
Any advice or examples on how I might do this? Not married to image in DIV other suggestions appreciated.
I figured it out. I made a function that is called when the point is clicked passing the whole point object. An if statement toggles the marker of the ponit and using the acumulate = true it shows all the points on my curve that have been selected. Likewise if it is already selected it toggles the marker off. Much easier than what I was trying.
Here is my function to toggle point and make them all seleted
function ChartClicked(oPointObject) {
if (oPointObject.selected) {
oPointObject.select(false, true);
}
else {
oPointObject.select(true, true);
}
}
Here is a snipet of my graph. It is in the plotOptions I call the click event
plotOptions: {
series: {
cursor: 'pointer',
point: {
events: {
click: function () {
ChartClicked(this);
}
}
}
}
},
Hope this helps someone else.
Is there a way to display a node label centered inside the node such as cytoscape desktop does by default?
I set css style for nodes and it works:
"text-valign" : "center"
"text-halign" : "center"
Yes, you can control this with the labelValign property as explained in the Wiki StyleObject description. For example:
var myStyle = {
selectors: {
"node": {
labelValign: "middle",
... } } }
$("#cy").cy({style: myStyle, ... })
From the official and actual documentation - text-valign and text-halign are the way to go. They are certainly not css properties however. The possible options are: text-halign - left, center, or right; text-valign - top, center, or bottom.
These options work only for nodes, not for edges.
Offical documentation for more info