hs-gchart-0.1: Haskell wrapper for the Google Chart API

Graphics.GChart.Types

Contents

Description

Synopsis

Chart data

This type represents the Chart

Required Parameters

These parameters are required for all charts

Chart Size

data ChartSize Source

Size of the chart. width and height specified in pixels

Constructors

Size Int Int 

Instances

Show ChartSize 
ChartItem ChartSize 

Chart Data

data ChartData Source

Chart data along with encoding. XY data for is encoded a pair of | consecutive data sets | http://code.google.com/apis/chart/formats.html

Constructors

Simple [[Int]]

Simple - lets you specify integer values from 061, inclusive

Text [[Float]]

Text - supports floating point numbers from 0100, inclusive

Extended [[Int]]

Extended - lets you specify integer values from 04095, inclusive

Instances

Show ChartData 
ChartItem ChartData 

Chart Type

data ChartType Source

Constructors

Line

Line Chart

Sparklines

Sparklines

LineXY

Line Chart w/ XY co-ordinates

BarHorizontalStacked

Horizontal bar chart w/ stacked bars

BarVerticalStacked

Vertical bar chart w/ stacked bars

BarHorizontalGrouped

Horizontal bar chart w/ grouped bars

BarVerticalGrouped

Vertical bar chart w/ grouped bars

Pie

Two dimensional pie chart

Pie3D

Three dimensional pie chart

PieConcentric

Concentric pie chart

Venn

Venn Diagram

ScatterPlot

Scatter Plot

Radar

Radar Chart

GoogleOMeter

Google-o-meter

Instances

Show ChartType 
ChartItem ChartType 

Optional Parameters

All other parameters are optional

Chart Colors

data ChartColors Source

Chart colors specified as a list of Color values for each data point. | http://code.google.com/apis/chart/colors.html#chart_colors

Constructors

ChartColors [Color] 

Instances

type Color = StringSource

Color data specified as a hex string

Solid Fill, Linear Gradient, Linear Stripes

type ChartFills = [Fill]Source

Chart fills, as a list of Fills

data Fill Source

Constructor for a chart fill

Constructors

Fill FillKind FillType 

Instances

data FillType Source

Specifies the type of fill

Constructors

Background

Background fill

Area

Chart area fill

Transparent

Apply transparency to whole chart (applicable to Solid fill only)

Instances

type Offset = FloatSource

Specifies at what point the color is pure. In this parameter, 0 specifies | the right-most chart position and 1 specifies the left-most chart | position. Applicable to LinearGradient

type Width = FloatSource

Width of the stripe. must be between 0 and 1, where 1 is the full width of | the chart

type Angle = FloatSource

Specifies the angle of the gradient between 0 (horizontal) and 90 | (vertical). Applicable to LinearGradient and LinearStripes

Chart Title

Chart Legend

data LegendPosition Source

Position of legend on chart. Applies to ChartLegend

Constructors

LegendBottom

Bottom of chart, horizontally

LegendTop

Top of chart, horizontally

LegendVBottom

Bottom of chart, vertically

LegendVTop

Bottom of chart, vertically

LegendRight

Left of chart

LegendLeft

Right of chart

Instances

Axis styles and labels

type ChartAxes = [Axis]Source

List of Axis for chart

data AxisType Source

Constructors

AxisBottom

Bottom x-axis

AxisTop

Top x-axis

AxisLeft

Left y-axis

AxisRight

Right y-axis

Instances

type AxisPosition = FloatSource

Axis Label Positions. http://code.google.com/apis/chart/labels.html#axis_label_positions

Labels with a specified position of 0 are placed at the bottom of the y- or r-axis, or at the left of the x- or t-axis.

Labels with a specified position of 100 are placed at the top of the y- or r-axis, or at the right of the x- or t-axis.

type FontSize = IntSource

Font size in pixels. Applicable to AxisStyle

data AxisRange Source

Axis Range http://code.google.com/apis/chart/labels.html#axis_range

The range is specifies with a tuple containing the start and end values. An optional interval value can be specified.

Constructors

Range (Float, Float) (Maybe Float) 

data DrawingControl Source

Control drawing of Axis. Applicable to AxisStyle

Constructors

DrawLines

Draw axis lines only

DrawTicks

Draw tick marks only

DrawLinesTicks

Draw axis lines and tick marks

data AxisStyleAlignment Source

Alignment of Axis labels. Applies to AxisStyle

Constructors

AxisStyleLeft

Left aligned labels

AxisStyleCenter

Centered labels

AxisStyleRight

Right aligned labels

Grid Lines

data ChartGrid Source

Constructors

ChartGrid 

Fields

xAxisStep :: Float

x-axis step size (0-100)

yAxisStep :: Float

y-axis step size (0-100)

lineSegmentLength :: Maybe Float

length of line segment

blankSegmentLength :: Maybe Float

length of blank segment

xOffset :: Maybe Float

x axis offset

yOffset :: Maybe Float

y axis offset

Instances

Show ChartGrid 
ChartItem ChartGrid 

Pie chart and Google-o-meter labels

data ChartLabels Source

Labels for Pie Chart and Google-o-meter. | Specify a list with a single label for Google-o-meter

Constructors

ChartLabels [String] 

Instances

Default Values

These functions return default values for complex parameters, which can be used as starting points to construct parameters when creating charts.