Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- onload="loadVisualization('./csv/DataSet1.csv')"
- <script>
- var parcoords = d3.parcoords()("#NetworkData").alpha(.1)
- function loadVisualization(source)
- {
- parcoords = d3.parcoords()("#NetworkData").alpha(.1)
- d3.csv(source, function(data)
- {
- parcoords
- .data( data.map(function(d)
- {
- return { "Time": d3.time.format("%H:%M:%S").parse(d.Time),
- "Source": (d.Source),
- "Destination": (d.Destination),
- "Protocol": (d.Protocol),
- "Length": (d.Length),
- "Destination Port": (d.DestPort),
- }
- }) )
- .color( "steelblue" )
- .mode("queue")
- .render()
- .reorderable()
- .interactive()
- .brushable();
- });
- }
- function reloadNewData()
- {
- // Delete all data and reload from new source
- d3.select("#NetworkData").remove();
- source = './csv/DataSet_New.csv'
- loadVisualization(source)
- }
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement