Clean Energy Distribution (GWh)
Source code
$ npx @flitterjs/cli@latest add sankey-chart --style agimport SankeyChart from "@/components/flitter/charts/sankey-chart";
const chart = SankeyChart({
data: [
{
from: "Solar",
to: "Grid",
value: 36,
},
{
from: "Wind",
to: "Grid",
value: 44,
},
{
from: "Hydro",
to: "Grid",
value: 20,
},
{
from: "Grid",
to: "Homes",
value: 42,
},
{
from: "Grid",
to: "Industry",
value: 38,
},
{
from: "Grid",
to: "Transport",
value: 20,
},
],
config: { title: { text: galleryTitle, visible: true } },
});