Skip to content

Instantly share code, notes, and snippets.

Pacsangon / chart.js
Created Aug 4, 2016 — forked from chrtze/chart.js
Line Chart Example
View chart.js
var Chart = (function(window,d3) {
var svg, data, x, y, xAxis, yAxis, dim, chartWrapper, line, path, margin = {}, width, height, locator;
var breakPoint = 768;
d3.csv('data.csv', init); //load data, then initialize chart
//called once the data is loaded
function init(csv) {
Pacsangon /
Created Jul 27, 2016 — forked from robschmuecker/
D3.js Drag and Drop, Zoomable, Panning, Collapsible Tree with auto-sizing.

This example pulls together various examples of work with trees in D3.js.

The panning functionality can certainly be improved in my opinion and I would be thrilled to see better solutions contributed.

One can do all manner of housekeeping or server related calls on the drop event to manage a remote tree dataset for example.

Dragging can be performed on any node other than root (flare). Dropping can be done on any node.

Panning can either be done by dragging an empty part of the SVG around or dragging a node towards an edge.

Pacsangon / d3js layout scaling
Created Jul 27, 2016 — forked from plandem/d3js layout scaling
Correct zoom of layout
View d3js layout scaling
In some cases you want to handle zooming and rescale your layout.
But at all examples you can see something like this:
var width = 640;
var height = 480;
var outer ='div')
.attr("width", width)
.attr("height", height)
Pacsangon / index.html
Created Jul 21, 2016 — forked from syntagmatic/index.html
Nutrient Parallel Coordinates
View index.html
<!DOCTYPE html>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>Nutrient Database Explorer</title>
<link rel="stylesheet" type="text/css" href="parallel.css" />
<div id="header">
<h1>Nutrient Explorer</h1>
You can’t perform that action at this time.