How to use crossfilter with sigma.js and canvas - crossfilter

I'm really not sure how to get started trying to use crossfilter to change my network visualisation (generated using sigma.js - which uses canvas to draw the visualisation). I'm relatively new to js.
Basically I want the size of my nodes to reflect values tied to dates which I want to filter using crossfilter.
Is this possible?
Any help would be much appreciated.

You could use linkurious.js (a fork of sigma) and it's filter plugin. Here's a demo: https://rawgit.com/Linkurious/linkurious.js/develop/examples/filters.html

Related

How to create map marker to show multi users' facing direction by here sdk?

I want to create a mobile application that can show where is your friends and in which direction they are facing. I want to use positionIndicator at first but I can't create one more positionIndicator on the map view. Then I turned to MapMarker, But I found I can't rotate it and scale it. And I tried MapLocalModel, but I don't think it's a good idea to use a 3d module to render a 2d object. Then I think I should create a new MapObject class. But the constructor of MapObject is package protect. I can't call it or override it. So, what's the correct way to implement it?
MapLocalModel in general is the right approach for a marker which could be rotated. Agree that for 2D object MapLocalModel is not the best approach however the alternative would be rotating the image used for MapMarker itself which might also have some performance hit.

How to build tree diagrams in bokeh

What would it take to implement a tree diagram in bokeh? Something similar to this DS example would be nice --
http://bl.ocks.org/robschmuecker/7880033
I'm just looking to visualize a data structure, so only need the pan, zoom, and collapse functionality.
Thanks!
- AH
There is nothing in Bokeh to do this automatically. Bokeh does now support network/graph support, which it did not at the time the question was originally posted:
https://docs.bokeh.org/en/latest/docs/user_guide/graph.html
However, it would take some work to use this to reproduce the link above:
non straight-line edges would need to be computed explicitly
nodes/edges would have to be hidden manually based on TapTool events
Additionally there is no "smooth animation" option yet (as of Bokeh 0.13.0) so the transitions would be instant.
If the idea is to have this sort of capability along side other Bokeh plots, or to connect it to Python backend code, then another option is to write a custom extension for Bokeh:
https://docs.bokeh.org/en/latest/docs/user_guide/extensions.html
This would take some up-front work, but doing this, you could integrate the fancy D3 widget directly into Bokeh documents, and use it like, and connect it to, any other Bokeh component or widget.

How to do chalk style drawing with Qt

I want to use Qt to draw lines in chalk style, as you typically see on a blackboard. Here is an example of what I have in mind:
What is the best way to achieve this rendering style? Do I need to draw a lot of little lines with a special brush, or is there a better way to get the "curvy" style you see in the sample image?
And where is the best place to integrate this? Theoretically it would be ideal to get this underneath QPainter, e.g. in a custom QPaintEngine, so that e.g. all the various QPainter::drawLine calls end up using the chalk style. However, it seems while the QPaintEngine interface looks perfect for this, the class itself isn't meant to be used for this purpose...
Thanks in advance for any help.
Greetings,
Fabian
I have solved the problem in a different way. Using textured brushes didn't provide good results (maybe my fault). QGraphicsEffect was unfortunately not an option since my rendering is not based on QGraphicsView.
What I have done in the end:
Derived an own class from QPainter (i.e. ChalkPainter)
Added a new drawChalkLine() method to ChalkPainter. This method takes the passed line, splits it into smaller chunks and renders these chunks as bezier curves via QPainter::drawPath. For each bezier curve chunk I randomly shift the control point orthogonal to the line.
Next I added additional rendering methods to the ChalkPainter class, such as drawChalkRect(), all internally using the drawChalkLine() method.
This is not the most elegant method since I can't use the QPainter methods directly, but it provides good results for my purpose. Here is an example:
I would start looking in QGraphicsEffect's way.. I think it should be possible to develop such a filter which will produce similar effect..
I'll update in here answer on your comment.
No, QGraphicsEffect can be applied 'per graphics item'. If you have a look on QGraphicsItem you will see that there is a setGraphicsEffect method, so you can design an effect which works on QGraphicsLineItem for example and set it only on lines you want to look chalky..
Important thing is that you don't have to operate on pre-drawn image, you can either make it completely owner-draw item with graphicsEffect (for example make an assumption that effect is only applicable on QGraphicsLineItem) pre-draw it using drawSource() and then modify OR draw it completely from scratch..
I would love to help you with some coding, probably will do it somewhere around next week, since I will need similar thing for project I am working on now.. but physically don't have time next few days..
I'll update an answer with sources link as soon as it's done.
Custom brush also looks really promising..

Dynamically creating a force directed graph with weighting

I can't find any way to draw a force directed graph where the weighting of the edges affects their length.
Although the Neato layout engine for .Dot format claims to do this, it never seems to actually respond to the edge weight that I give to it.
Ideally, I'd like to do this in Javascript. I've been using the Javascript Infovis Toolkit, but this doesn't seem to have any means for setting a weighting.
Any suggestions gratefully received!
So infovis doesn't solve this problem at all well, and I can't see what's going on with gvis either. However, I have solved this problem using cytoscape.
Although I haven't used it, cytoscape does have a command line option, so you could potentially use it to create images dynamically.

Graphical representation of data in flex

I am a newbie in flex.
Latest task is to generate a graph or a netwrok based on the data input.
What is the best way to do it. Also when clicked on a node of a network it should show the associated data with that node.
Hope to get some help soon!
Thanks,
Kartik
You need to get a license to flex builder pro to use the Flex Graphing components. You can see what components are available with example code from this link
http://examples.adobe.com/flex3/componentexplorer/explorer.html
Open the data visualization folder to get to the charts.
You could also try:
http://www.fusioncharts.com/

Resources