Slackbot
06/09/2023, 8:17 PMaaronkyle
06/10/2023, 12:50 AMaaronkyle
06/10/2023, 1:00 AMMike Bostock
06/10/2023, 2:19 AMDavid Gwyer
06/10/2023, 2:05 PMEzra Lee
06/10/2023, 2:54 PMimport React, {useRef, useEffect} from "react";
import {Runtime, Inspector} from "@observablehq/runtime";
import notebook from "063ec903459cbc40";
function Notebook() {
const stockChartRef = useRef();
useEffect(() => {
const runtime = new Runtime();
runtime.module(notebook, name => {
if (name === "stockChart") return new Inspector(stockChartRef.current);
});
return () => runtime.dispose();
}, []);
return (
<>
<div ref={stockChartRef} />
<p>Credit: <a href="<https://observablehq.com/d/063ec903459cbc40@23>">Plot: Line chart, interactive tip by Thrive Capital</a></p>
</>
);
}
export default Notebook;
Ezra Lee
06/10/2023, 2:55 PMaaronkyle
06/10/2023, 3:22 PM<3
The auto-generated embed code snippets are working well for me. Along the lines of Mike's suggestions, maybe an old version of the CSS or inspector are loaded in somewhere.Ezra Lee
06/10/2023, 3:38 PMEzra Lee
06/10/2023, 3:46 PMcreate-react-app
with the Plot chart and tooltips are working for me. So will dig into older versions being loaded somewhere.Ezra Lee
06/10/2023, 3:48 PMEzra Lee
06/10/2023, 3:48 PMEzra Lee
06/10/2023, 4:58 PM@observable/runtime
from 5.7.0
to 5.7.4
. Thank you!