Commit 192368d9 authored by Andrew Gibiansky's avatar Andrew Gibiansky

Merge branch 'master' of github.com:gibiansky/IHaskell

parents 323a4cd9 c1e35a91
{-# 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