-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Generate web-based charts using the Google Chart API -- -- Generate web-based charts using the Google Chart API @package GoogleChart @version 0.1 -- | This module is for generating web-based charts using Google's Chart -- API: http://code.google.com/apis/chart/. Its output is URLs -- that will resolve to a PNG image of the resulting chart. -- -- Most of the functions in this module, with names like setFoo, -- take a Chart as an argument and produce a new Chart with -- the specified attribute added. These calls are designed to be chained -- together. See the example below. -- -- Charts are represented as a hierarchy of type classes so that -- parameters that only affect a specific chart type are only available -- to that chart type. -- --
--   putStrLn "URL for your chart:"
--   putStrLn $ chartURL $
--     setSize 400 257 $
--     setTitle "My Chart" $
--     setData (encodeDataSimple [[1..20]]) $
--     setLegend ["1 to 20"] $
--     newLineChart
--   
-- -- This produces: -- http://chart.apis.google.com/chart?chs=400x257&chtt=My+Chart&chd=s%3aBCDEFGHIJKLMNOPQRSTU&chdl=1+to+20&cht=lc module Graphics.Google.Chart -- | The type class underneath all Charts. class Chart c -- | Construct the URL used to show the chart. chartURL :: (Chart c) => c -> String -- | Set the width and height, in pixels, of the resulting image. setSize :: (Chart c) => Int -> Int -> c -> c -- | Set the title of the chart. setTitle :: (Chart c) => String -> c -> c -- | Set options for the display of the title of the chart. setTitleOpts :: (Chart c) => String -> Int -> c -> c -- | Set the data displayed by the chart. setData :: (Chart c) => ChartData -> c -> c -- | All the encoding methods produce ChartData, which is usable by -- setData. data ChartData -- | Encode data using the "simple" encoding. This produces minimal URLs -- but doesn't have as much resolution. Input values must be in the range -- 0 <= x <= 61. Values outside the valid input range will -- be considered missing data. encodeDataSimple :: [[Int]] -> ChartData -- | Encode data using the "text" encoding. XXX unimplemented. encodeDataText :: [[Int]] -> ChartData -- | Encode data using the "extended" encoding. XXX unimplemented. encodeDataExtended :: [[Int]] -> ChartData -- | LegendChart represents charts that can display legends with -- setLegend. class (Chart c) => LegendChart c setLegend :: (LegendChart c) => [String] -> c -> c data LineChart newLineChart :: LineChart data PieChart newPieChart :: PieStyle -> PieChart data PieStyle Pie2D :: PieStyle Pie3D :: PieStyle setLabels :: [String] -> PieChart -> PieChart data BarChart newBarChart :: Orientation -> BarStyle -> BarChart data Orientation Horizontal :: Orientation Vertical :: Orientation data BarStyle Stacked :: BarStyle Grouped :: BarStyle instance Show ChartData instance LegendChart BarChart instance Chart BarChart instance Chart PieChart instance LegendChart LineChart instance Chart LineChart