HORIZON HASKELLDocslts/ghc-10.0.xaa25b892026-10-10Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · aa25b89 · 2026-10-10

Modulegranite-0.7.4.0GHC2021

Granite.Chart

Convenience builders that construct a Chart from the same kinds of arguments accepted by the legacy chart functions in Granite. Use these when you want the declarative IR while still keeping ergonomic construction:

import Granite.Chart
import qualified Data.Text.IO as T
import Granite.Render.Pipeline

main = do
  let ch = scatterChart
              [(A, [(0,0),(1,1),(2,4)])
              ,(B, [(0,1),(1,3),(2,6)])
              ] (Just "Random points")
  T.putStrLn (renderChartTerminal ch)
  • 2 values
valuescatterChart :: [(Text, [(Double, Double)])] -> Maybe Text -> Chart
#

Build an IR scatter chart from N series, each with its own (x, y) pairs. Each series becomes a separate GeomPoint layer carrying its own data frame and a group aesthetic that drives the legend.