humanitiesplusdesign / palladio

An application that brings humanities research methods to data visualization.
BSD 3-Clause "New" or "Revised" License
170 stars 31 forks source link

Request to designate colors for 2 node types in graph view #93

Closed cncoleman closed 8 years ago

cncoleman commented 8 years ago

This would be for the component view of the graph.

esjewett commented 8 years ago

Should be fixed in https://github.com/humanitiesplusdesign/palladio/commit/e05e999fd8ada82fdd647c6bb233b0b218d82f5c

This will allow using CSS styles to style the source/target nodes as desired. I'll update the Palladio file in the endangered languages repo and push an example to visualization/three.html.

esjewett commented 8 years ago

Update completed. CSS to style a source and target node is:

[data-palladio-graph-view] .node.source {
  fill: #777;
}

[data-palladio-graph-view] .node.target {
  fill: #bbb;
}

Default style will be the same as before, but is now applied via palladio.css. The element itself no longer has any inline style, so you can do whatever you want to it.

Generally speaking, I'd like to move in this direction for allowing styling of all of the component elements. However, in the case of the graph view if we want to change the appearance of the vectors/links between nodes, that will need to be part of the JS API because they are canvas, so cannot be styled with CSS (as far as I am aware).