kan-qi / UMLx

Analyze software architecture and generate insights about software development complexities, risks, and costs.
3 stars 0 forks source link

javascript object injection on the svg graphs generated from R. #98

Open kan-qi opened 6 years ago

kan-qi commented 6 years ago

Javascript object injection on the svg graphs generated from R:

  1. do some experiment on injecting the javascript to listen to actions. Encapsulate the logic into an individual javascript file.
  2. do experiment on activating the actions.
  3. if that is possible, try to implement the function of pointing the trending lines and show the coordinates.
SparshithNR commented 6 years ago

We can certainly insert javascript file to svg. But the svg created by R is not well structured. There are no identifier to find specific item in SVG. When it comes to a graph with multiple component like distirbution graph it is hard to code a general function. If we change a bit in graph structure we may have to change javascript code completely. R doesn't put texts as text nodes rather it uses path tag and places glphy symbols.

kan-qi commented 6 years ago

Okay. I see. Any external library that can help with parsing svg exported from R. Or you have some suggestions to deal with this situation. Thanks!

SparshithNR commented 6 years ago

I am not sure if there any libraries available as such.. I would rather try to create SVG in the client side so that we can have better hold of the graph getting generated. We can try to check if there are any ways to generate structured SVG in R. One of the major problem current R svg is it doesn't use character, it draws the character which makes difficult to find what text it is. By text what I mean is number_of_paths (axis name) what you have in graph.

kan-qi commented 6 years ago

Okay. I see. Then let us continue to work on this issue. Any way, we need to explore a method of solving this issue. Thanks for the info.