An interactive multi-line chart.
Note, I borrowed a bit of code from Duopixel's excellent code sample here.
Built with blockbuilder.org
An interactive multi-line chart.
Note, I borrowed a bit of code from Duopixel's excellent code sample here.
Built with blockbuilder.org
import React, { useRef, useEffect } from 'react'; | |
export default ({ | |
artifacts, | |
width, | |
height, | |
}) => { | |
const root = useRef(); | |
const context = useRef(); |
import * as d3 from "d3"; | |
export default class D3BubbleChart { | |
constructor(domEl, { width, height, nodes = [] }) { | |
this.domEl = domEl; | |
this.width = width; | |
this.height = height; | |
// and the svg container | |
this.setup(nodes); |
import React from "react"; | |
export default ({ artifacts, width, height }) => ( | |
<svg width={width} height={height}> | |
<g transform={`translate(${width / 2}, ${height / 2})`}> | |
{artifacts.map((item, index) => ( | |
<circle | |
r={item.radius} | |
color={item.color} | |
key={index} |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title></title> | |
</head> | |
<body> | |
var ffprobe = require('ffprobe'), | |
ffprobeStatic = require('ffprobe-static'); | |
ffprobe('/Users/gion/Downloads/landscape-fail.mp4', { path: ffprobeStatic.path }, function (err, info) { | |
if (err) { | |
console.log('error'); | |
console.log(err); | |
} else { | |
console.log('COOOOOL'); | |
console.log(JSON.stringify(info)); |
Error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting! | |
Watchers fired in the last 5 iterations: [["fn: function $locationWatch() {\n var oldUrl = $browser.url();\n var currentReplace = $location.$$replace;\n\n if (!changeCounter || oldUrl != $location.absUrl()) {\n changeCounter++;\n $rootScope.$evalAsync(function() {\n if ($rootScope.$broadcast('$locationChangeStart', $location.absUrl(), oldUrl).\n defaultPrevented) {\n $location.$$parse(oldUrl);\n } else {\n $browser.url($location.absUrl(), currentReplace);\n afterLocationChange(oldUrl);\n }\n });\n }\n $location.$$replace = false;\n\n return changeCounter;\n }; newVal: 20; oldVal: 19","fn: function(context) {\n try {\n for(var i = 0, ii = length, part; i<ii; i++) {\n if (typeof (part = parts[i]) == 'function') {\n part = part(context);\n if (trustedContex |
//https://gist.github.com/gion/6606933 | |
;(function(global, $, undefined){ | |
var stateManager = function(){ | |
this.root = null; | |
this.prefix = null; | |
this.settings = {}; | |
this.init(); | |
}; |