Open jwwq opened 5 days ago
Hi @jwwq,
Try this p.Plot.LastRender.DataRect.Width
This contains the size from the last render, which may not always be true for the current render as well.
The correct way would be to define your own Plottable inherited from BarPlot. Override the Render() method and implement any logic in it. On input it gets a RenderPack which contains information about the current size of the DataRect.
I want to make the width of the bar in barplot constant in pixels regardless of the chart size, so here is the pseudocode:
How can I get the size of the "data area" (excluding axes etc) in pixels? Thanks!
P.S. If there's a more elegant way to accomplish this, please let me know.