diff --git a/CHANGELOG.md b/CHANGELOG.md index 00f5795..fd8963b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline ## Dev +### Added + +- **client-api**: `toggleClustering(isOn)` to start/stop clustering + ### Infra - Update Storybook from 6 to 7 @@ -13,6 +17,10 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline - Update dependencies +### Fix + +- **client-api**: `tickClustering(milliseconds)` now works, requires Graphistry server upgrade + ## 4.6.1 ### Added diff --git a/projects/client-api-react/src/stories/GraphistryJS.stories.jsx b/projects/client-api-react/src/stories/GraphistryJS.stories.jsx index f8264e4..b2bfcd7 100644 --- a/projects/client-api-react/src/stories/GraphistryJS.stories.jsx +++ b/projects/client-api-react/src/stories/GraphistryJS.stories.jsx @@ -12,7 +12,7 @@ import { toggleToolbar, toggleHistograms, toggleTimebars, - togglePlay, + toggleClustering, toggleInspector, encodeAxis, selectionUpdates, @@ -443,14 +443,50 @@ export const verticalLayoutAndAxis = { }, }; + + +export const tick = { + render: (args) => { + const iframe = useRef(null); + const [messages, setMessages] = useState(['loading...']); + const [g, setG] = useState(null); + const [tickCount, setTickCount] = useState(0); + + const milliseconds = 2000; + + useEffect(() => { + //////// Instantiate GraphistryJS for an iframe + graphistryJS(iframe.current) + .pipe(tap((g) => setG(g))) + .subscribe( + (g) => setMessages((arr) => arr.concat([`graphistryJS instantiated`, String(g)])), + (err) => { + console.error('Error:', err); + setMessages((arr) => arr.concat([`Error: ${err}`])) + }, + () => setMessages((arr) => arr.concat(['Completed']))); }, [iframe]); - return ( -