react-pdf-charts icon indicating copy to clipboard operation
react-pdf-charts copied to clipboard

Add support for debug prop

Open nkerber-wex opened this issue 9 months ago • 2 comments

Clear and concise description of the problem

It would be a huge help to be able to apply the debug property available in react-pdf to recharts elements being rendered within a ReactPDFChart element. I'm working on formatting a graph with very specific layout requirements and this is proving to be near impossible apart from basically guessing on margin values one at a time to try to understand what bounding box is being used for the individual components within the overarching recharts element.

Suggested solution

Setting debug={true} on a recharts <Legend> element, for instance, could display the same bounding box, with padding, margin, etc. as setting this property on react-pdf elements like <View> does.

Additional context

No response

nkerber-wex avatar Mar 19 '25 20:03 nkerber-wex

I can definitely see the usefulness of this but it's not obvious to me how you would pass this prop in given that the chart components being passed into react-pdf-charts don't support that prop.

Did you have something in mind for that?

EvHaus avatar Mar 19 '25 20:03 EvHaus

@EvHaus only got as far as the vision not the execution, unfortunately.

nkerber-wex avatar Mar 20 '25 18:03 nkerber-wex