lightview
Version:
Small, simple, powerful web UI and micro front end creation ... Great ideas from Svelte, React, Vue and Riot combined.
34 lines (33 loc) • 782 B
HTML
<head>
<title>Chart</title>
<link href="../components/chart.html" rel="module">
<script src="../../lightview.js"></script>
</head>
<body>
<l-chart id="myChart" type="PieChart" style="height:500px;" title="How Much Pizza I Ate Last Night" hidden l-unhide>
{
options: {
},
columns: [
{label: "Topping", type: "string"},
{label: "Slices", type: "number"}
],
rows: [
["Mushrooms", 3],
["Onions", 1],
["Olives", 1],
["Zucchini", 1],
["Pepperoni", 2]
]
}
</l-chart>
<script>
const el = document.getElementById("myChart");
el.addEventListener("mounted",() => {
chart = el.chart;
chart.addRow(["Anchovies",1]);
});
</script>
</body>
</html>