Commit df7625e8 authored by Andrew Gibiansky's avatar Andrew Gibiansky

Replacing SVG with base64 encoded html+img tag for svg, closes #187

parent 4b4c233b
......@@ -43,4 +43,6 @@ chartData renderable format = do
imgData <- readFile $ fpFromString filename
return $ case format of
PNG -> png width height $ base64 imgData
SVG -> svg $ Char.unpack imgData
SVG -> html $ makeSvgImg $ base64 imgData
where
makeSvgImg base64data = Char.unpack $ "<img src=\"data:image/svg+xml;base64," ++ base64data ++ "\"/>"
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -3,7 +3,7 @@ module IHaskell.Display (
IHaskellDisplay(..),
plain, html, png, jpg, svg, latex,
serializeDisplay,
Width, Height, Base64,
Width, Height, Base64(..),
encode64, base64,
Display(..),
DisplayData(..),
......
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