AykutSarac / jsoncrack.com

✨ Innovative and open-source visualization application that transforms various data formats, such as JSON, YAML, XML, CSV and more, into interactive graphs.
https://jsoncrack.com/
Other
30.49k stars 1.89k forks source link

[BUG]: View mode toggle #384

Closed Sabin-Adhikari closed 1 hour ago

Sabin-Adhikari commented 8 months ago

Issue description

Feature

Hi guys, I was not able to find a documentation on the view mode while using embed API I have the following js script:

        let iframe = document.createElement('iframe')
        iframe.id = 'json-crack-iframe'
        iframe.style.border = 'none'
        iframe.height = '1000px'
        iframe.width = '100%'
        iframe.src = "https://jsoncrack.com/widget"
        getShadowRootElementByID('json-crack-container')?.appendChild(iframe)
        const json = JSON.stringify(this.ratingResPayload)
        const options = {
          theme: "light", // "light" or "dark"
          direction: "RIGHT", // "UP", "DOWN", "LEFT", "RIGHT"
        }
window?.addEventListener("message", (event) => {
            iframe.contentWindow?.postMessage({json,options}, "*");
        })

I would like to toggle between graph mode and tree mode like in the website. Is there an option that I can pass? Thanks in advance!

Media & Screenshots

No response

Operating system

Priority this issue should have

Medium (slightly annoying)

AykutSarac commented 7 months ago

This currently not supported but if anyone is down to open a PR I can review.

Julias0 commented 6 days ago

Can someone assign this to me - I can take a stab at this

AykutSarac commented 1 hour ago

Hello, closing this issue as JSON Crack is intended to support graph visualization only for embedding.