Skip to content

Instantly share code, notes, and snippets.

View gion's full-sized avatar
💭
🦄 🌈 🍦

Bogdan Gradinariu gion

💭
🦄 🌈 🍦
View GitHub Profile
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}
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);
@gion
gion / README.md
Created November 24, 2023 12:04 — forked from larsenmtl/README.md
d3 mouseover multi-line chart

An interactive multi-line chart.

Note, I borrowed a bit of code from Duopixel's excellent code sample here.

Built with blockbuilder.org