haskell-chart
haskell-chart copied to clipboard
How to put a PieChart or PieLayout in a Grid?
I need to draw a pie chart beside a simple plot on a single canvas.
I tried tval . pieToRenderable, but cannot unify LayoutPick and PickFn
I managed to draw a pie beside a plot with help of #218 and [1], but it looks like this:
[ pie ][ ]
[ ][ plot ]
while I expect
[ pie ][ plot ]
[1]:
-- | Generalize LayoutPick to PickFn under Grid.
layoutToGrid' ::
(Ord x, Ord y) =>
Layout x y -> Grid (Renderable (PickFn (LayoutPick x y y)))
layoutToGrid' = fmap (fmap (const . Just)) . layoutToGrid
pie `above` plotpie `beside` plotpie `overlay` plot
all give the same result:
[ pie ][ ]
[ ][ plot ]