在Graph Viewer中配置标签属性(Configuring label attributes in Graph Viewer)
在ArangoDB Web界面中创建要查看的图形时,我遇到了顶点和边缘标签的一些问题:
我只能将Vertex / Edge属性设置为简单键。 我无法让更深层次的对象引用工作。
例如,name
的顶点标签属性有效,但info.firstName
或info["firstName"]
不是,即使该值在顶点上。 如果我使用对象引用,则图形显示ATTR NOT SET
以编程方式创建Graph时,我不知道如何设置:
- 顶点标签
- 顶点着色属性
- 边缘标签
使用Node.js和arangojs npm包创建图形时,我使用
graph.create
命令,例如:var graph = db.graph('myGraph'); graph.create({ edgeDefinitions: [ { collection: 'myEdges', from: [ 'myNodes' ], to: [ 'myNodes' ] } ] })
有没有办法在ArangoDB Web界面中完全配置图表以进行正确的格式化? 我似乎无法在库中找到任何其他功能,让我这样做。
我一直在破坏和重新创建图形,完全创建一个已配置的图形,在顶点(和边缘)内引用标签的对象会很棒。
谢谢
When creating graphs for viewing in the ArangoDB Web Interface, I am having some issues with labels for Vertices and Edges:
I can only set Vertex/Edge attributes to simple keys. I cannot get deeper object references working.
e.g. a vertex label attribute ofname
is valid, butinfo.firstName
orinfo["firstName"]
are not, even though the value is on the vertex. The graph displaysATTR NOT SET
if I use object referencesWhen programmatically creating a Graph, I don't know how to set:
- Vertices labels
- Vertices Coloring attributes
- Edge Labels
When creating a graph with Node.js and the arangojs npm package, I use the
graph.create
command, for example:var graph = db.graph('myGraph'); graph.create({ edgeDefinitions: [ { collection: 'myEdges', from: [ 'myNodes' ], to: [ 'myNodes' ] } ] })
Is there a way to fully configure the graph for proper formatting in the ArangoDB Web Interface? I can't seem to find any other function in the libraries that would let me do this.
I destroy and recreate graphs all the time and it would be great to fully create a configured graph, referencing objects within the vertex (and edges) for labels.
Thanks
原文:https://stackoverflow.com/questions/35127010
最满意答案
答案是将一个
notifyDataSetChanged()
添加到绘图函数的末尾。根据我在MPAndroid Chart(ios-Charts的Android版本)上找到的这个文档 ,
notifyDataSetChanged():让图表知道它[原文]基础数据已更改,并执行所有必要的重新计算(偏移量,图例,最大值,最小值...)。 这在动态添加数据时尤其需要。
The answer was to add a
notifyDataSetChanged()
to the end of the plot function.Per this documentation I found on MPAndroid Chart (the Android version of ios-Charts),
notifyDataSetChanged(): Lets the chart know it's [sic] underlying data has changed and performs all necessary recalculations (offsets, legend, maxima, minima, ...). This is needed especially when adding data dynamically.
相关问答
更多-
我完全不明白为什么人们抱怨说,“ 边距会导致iOS 8之前的任何事情彻底崩溃。 ” 设置您的限制相对于xib文件或故事板中的边距在iOS7上不会使您的应用程序崩溃,并且它不会在您的iOS7设备上造成UI差异,只要您不触摸UIView.layoutMargins和UIView.preservesSuperviewLayoutMargins在您的代码中UIView.preservesSuperviewLayoutMargins属性。 iOS8中的边距是多少? 布局边距表示布局系统在布局子视图时可以使用的UIVi ...
-
答案是将一个notifyDataSetChanged()添加到绘图函数的末尾。 根据我在MPAndroid Chart(ios-Charts的Android版本)上找到的这个文档 , notifyDataSetChanged():让图表知道它[原文]基础数据已更改,并执行所有必要的重新计算(偏移量,图例,最大值,最小值...)。 这在动态添加数据时尤其需要。 The answer was to add a notifyDataSetChanged() to the end of the plot funct ...
-
要限制可拖动视图,您需要在移动它时检查其位置,然后在超出边界时将其强制到约束位置。 所以假设你使用touchesMoved : - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { ... CGRect frame = mySubview.frame; if (frame.origin.x < boundaryX) { //frame exceeds the horizontal boundary ...
-
请查看图库中的ChartsDemo,它有组合图表供您参考。 Please take a look at the ChartsDemo which is part of the library, there is combined chart for your reference.
-
我认为你喜欢用错误的方式来定制突出显示。 您不需要使用此委托功能进行绘图。 您需要创建您自己的渲染器类并重写drawHighlighted(context: CGContext, indices: [Highlight])方法。 在这个地方你可以访问正确的坐标。 请记住,您需要根据图表视图的类型从正确的父类中实例化。 (例如CandleStickChartRenderer , BarChartRenderer , LineChartRenderer等) 不要忘记将自定义渲染器类的实例设置为图表视图的渲染器属 ...
-
显然,这是追加订单的问题。 看起来如果我们不按顺序插入数据(例如星期五,星期五,星期二,星期六......),则点按操作会出错。 我通过在Sun,Mon,Tue,Wed ...中排序词典来解决这个问题。 Apparently, it was issue of appending order. It seems like if we insert data not in order (i.e Thu, Fri, Tue, Sat...), tap action goes wrong. I solved thi ...
-
Xcode:如何约束相同大小的视图以相互叠加(Xcode: How to constrain views of the same size to sit on top of each other)[2023-06-10]
首先,将它们的高度和宽度限制为相同的值。 接下来,选择两个视图(使用shift单击)并选择对齐水平中心,以及对齐垂直中心。 这意味着它们处于相同的位置并且大小相同。 此外,您需要将其中一个视图约束到superview。 将其固定到x和y的中心,或者执行自定义顶部和前导约束。 如果您有任何疑问,请告诉我。 First, constrain their heights and widths to the same values. Next, select both views (using shift clic ... -
可以根据键盘大小以编程方式添加约束,也可以根据屏幕键盘的已知大小,使用固定约束为每个屏幕大小制作单独的界面文件。 Either add the constraints in programmatically based on the keyboard size, or make separate interface files for every screen size with a fixed constraint based on a known size for the keyboard for th ...
-
如何通过从不同方法获取值来绘制iOS图表中的点(How to plot points in iOS-chart by taking values from a different method)[2022-01-22]
我改变了for循环以获得yVals for (int i = 0; i < headData.count; i++) { NSPredicate *predicate = [NSPredicate predicateWithFormat:@"SELF.iid == %ld AND SELF.yr == %ld", /*10653*/[[arrLeft objectAtIndex:0]intValue], [[headData objectAtIndex:i] intValue]]; NSAr ... -
iOS图表中的组合图表 - 不显示折线图的负值(Combined Charts in iOS-Chart - Negative values for Line Chart are not rendered)[2023-02-25]
通过重新排列折线图数据集的x值(从-12到12)来解决这个问题,在我原来的问题中,数据集是混合的,而不是以折线图的正确顺序。 Fixed this by reordering the line chart data set with x values from -12 to 12 , in my original question , the data set was mixed and not in a proper order for the line chart.