Skip to content

Instantly share code, notes, and snippets.

@santi698
santi698 / App.js
Created May 22, 2019 17:59
Question 1
/** * What is wrong with this example, and how would you go
* about fixing or improving the component?
*/
class App extends React.Component {
constructor(props) {
super(props);
this.state = {
name: this.props.name || 'Anonymous'
}
@santi698
santi698 / index.html
Last active July 18, 2016 18:19
Stacked Bar Chart
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>D3: Stack layout stacked bar chart</title>
<script type="text/javascript" src="//d3js.org/d3.v3.min.js"></script>
<style type="text/css">
/* No style rules here yet */
</style>
</head>
@santi698
santi698 / index.html
Last active July 18, 2016 18:21
Pie Chart (d3js v4)
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.arc text {
font: 10px sans-serif;
text-anchor: middle;
}
.arc path {
@santi698
santi698 / .block
Last active May 19, 2016 15:17 — forked from mbostock/.block
Scatterplot
license: gpl-3.0