chart: update for current Chart version
This commit is contained in:
parent
c6a85c4b88
commit
b8e3306819
@ -7,7 +7,6 @@ Released under GPL version 3 or later.
|
|||||||
|
|
||||||
module Hledger.Chart.Main
|
module Hledger.Chart.Main
|
||||||
where
|
where
|
||||||
import Control.Monad (liftM3)
|
|
||||||
import Graphics.Rendering.Chart
|
import Graphics.Rendering.Chart
|
||||||
import Data.Colour
|
import Data.Colour
|
||||||
import Data.Colour.Names
|
import Data.Colour.Names
|
||||||
@ -22,9 +21,7 @@ import Prelude hiding (putStr, putStrLn)
|
|||||||
import System.IO.UTF8 (putStr, putStrLn)
|
import System.IO.UTF8 (putStr, putStrLn)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
import Hledger.Cli.Commands
|
|
||||||
import Hledger.Cli.Options
|
import Hledger.Cli.Options
|
||||||
import Hledger.Cli.Tests
|
|
||||||
import Hledger.Cli.Utils (withJournalDo)
|
import Hledger.Cli.Utils (withJournalDo)
|
||||||
import Hledger.Cli.Version (progversionstr, binaryfilename)
|
import Hledger.Cli.Version (progversionstr, binaryfilename)
|
||||||
import Hledger.Data
|
import Hledger.Data
|
||||||
@ -76,6 +73,7 @@ chart opts args j = do
|
|||||||
t <- getCurrentLocalTime
|
t <- getCurrentLocalTime
|
||||||
let chart = genPie opts (optsToFilterSpec opts args t) j
|
let chart = genPie opts (optsToFilterSpec opts args t) j
|
||||||
renderableToPNGFile (toRenderable chart) w h filename
|
renderableToPNGFile (toRenderable chart) w h filename
|
||||||
|
return ()
|
||||||
where
|
where
|
||||||
filename = getOption opts ChartOutput defchartoutput
|
filename = getOption opts ChartOutput defchartoutput
|
||||||
(w,h) = parseSize $ getOption opts ChartSize defchartsize
|
(w,h) = parseSize $ getOption opts ChartSize defchartsize
|
||||||
|
|||||||
@ -46,5 +46,5 @@ executable hledger-chart
|
|||||||
-- ,split == 0.1.*
|
-- ,split == 0.1.*
|
||||||
-- ,time
|
-- ,time
|
||||||
-- ,utf8-string >= 0.3.5 && < 0.4
|
-- ,utf8-string >= 0.3.5 && < 0.4
|
||||||
,Chart >= 0.11
|
,Chart >= 0.11 && < 0.15
|
||||||
,colour
|
,colour
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user