getGraphStyle()
This hook returns the graph style data applied in the current version.
Example
import { useRef } from "react";
import { Palito } from "../palito/Palito.jsx";
const ExamplePage = () => {
const palitoRef = useRef(null);
const LICENSE_KEY = "key-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
const handleGetData = () => {
if (palitoRef.current) {
const graphStyle = palitoRef.current.getGraphStyle();
console.log("--- Palito Library Data ---");
console.log("Graph Style:", graphStyle);
}
};
return (
<div>
<Palito
ref={palitoRef}
licenseKey={LICENSE_KEY}
/>
<div style={{ position: 'absolute', bottom: '40px', right: '20px', zIndex: 1000 }}>
<button onClick={handleGetData} style={{ padding: '10px 20px', fontSize: '16px' }}>
Get Data from Library
</button>
</div>
</div>
);
};
export default ExamplePage;
Example Output

Props
This hook does not accept any props.
| Name | Type | Description | Default |
|---|---|---|---|
| (none) | - | - | - |
Return
{
"edgeType": "string", // customStep: step, default: bezier, straight: straight, smoothstep: smoothstep
"lineStyle": "string" // dashed, solid
}