Skip to content

Instantly share code, notes, and snippets.

Last active May 17, 2017 07:03
What would you like to do?
Hello Lea (MAVO and D3 interaction)
license: mit

Testing interaction between MAVO and D3.

<!DOCTYPE html>
<meta charset="utf-8">
<script src=""></script>
<link rel='stylesheet' href=''>
<link rel='stylesheet' href='style.css'>
<script src=""></script>
<link rel="stylesheet" href="">
body { margin:0;position:fixed;top:0;right:0;bottom:0;left:0; }
h3 { border-top: 3px brown solid }
<h3>1. Mavo app</h3>
<div mv-app="elementStorage" mv-storage="#data">
Edit me:
<span property="firstName">David</span>
<span property="lastName">Karger</span>
<h3>2. Mavo HTML data storage</h3>
<pre id="data">{
"firstName": "Lea",
"lastName": "Verou"
<h3>3. d3 reading the storage</h3>
d3.interval(function(e) {'p').text(
'Hello ' + JSON.parse("#data").text()).firstName
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment