Commit 4047e083 authored by Brian McKenna's avatar Brian McKenna

Workaround changed API in Chart-cairo 1.3

parent e63ff01e
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE NoImplicitPrelude, CPP #-}
module IHaskell.Display.Charts () where
import ClassyPrelude
......@@ -35,7 +35,13 @@ chartData renderable format = do
-- Write the PNG image.
let filename = ".ihaskell-chart.png"
opts = def{_fo_format = format, _fo_size = (width, height)}
renderableToFile opts renderable filename
toFile = renderableToFile opts
#if MIN_VERSION_Chart_cairo(1,3,0)
toFile filename renderable
#else
toFile renderable filename
#endif
-- Convert to base64.
imgData <- readFile $ fpFromString filename
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment