Skip to content

Paged chart is not working for me #455

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
leabaertschi opened this issue Apr 10, 2025 · 0 comments
Open

Paged chart is not working for me #455

leabaertschi opened this issue Apr 10, 2025 · 0 comments

Comments

@leabaertschi
Copy link

leabaertschi commented Apr 10, 2025

I'm trying to make my chart paged, but it's not working. On some levels it's not rendering a pagination button at all, and on others with many nodes it's rendering the button in place of the node at this position and to the right continues to render the other nodes nevertheless. My chart looks as follows:

chartRef.current
        .container(d3Container.current)
        .data(data)
        .nodeId((node) => getNodeData(node)[0].id)
        .parentNodeId((node) => getNodeData(node)[0].content.parentItemId.getOrUndefined())
        .svgWidth(width)
        .svgHeight(height)
        .nodeWidth(() => NODE_WIDTH)
        .nodeHeight(() => NODE_HEIGHT)
        .nodeContent((node) => {
          return ReactDOMServer.renderToString(
            <Item styles={styles} item={node.data} />
          );
        })
        .nodeButtonX(() => NODE_BUTTON_X)
        .nodeButtonY(() => NODE_BUTTON_Y)
        .nodeButtonHeight(() => NODE_BUTTON_HEIGHT)
        .nodeButtonWidth(() => NODE_BUTTON_WIDTH)
        .linkYOffset(LINK_Y_OFFSET)
        .buttonContent(({ node }) =>
          ReactDOMServer.renderToString(<ExpandeCollapseButton styles={styles} node={node} />)
        )
        .setActiveNodeCentered(setActiveNodeCentered)
        .compact(compact)
        .pagingStep((d) => 5)
        .minPagingVisibleNodes((d) => 3)
        .render();

Is there anything obvious I'm missing? I'm rendering all this in a React project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant