gipsy-king/radar-chart/3.0.1

Renamed to benjajaja/radar-chart. It is published under that name, and new versions come out there.

Versions published as gipsy-king/radar-chart still install under that name. 4 versions of 5 come from the new location (see their notes). 1 version could not be recovered and cannot be installed.

Rerouted (renamed, verified). The GitHub user or repository was renamed. The tag is still there, at the new name. The Lamdera package server serves a copy recovered from https://github.com/benjajaja/radar-chart.

What we checked: The repo moved to github.com/benjajaja/radar-chart. Rebuilt with git archive from commit 1a426751837c of https://github.com/benjajaja/radar-chart (zip prefix gipsy-king-radar-chart-1a42675/, America/Los_Angeles times): the zip is byte-identical to the one package.elm-lang.org recorded, SHA-1 20d9d7164ebed899f3f0c3cb749d29c7b0be24db.

The Lamdera compiler uses this copy and prints a one-line notice saying so. elm itself fails to download this version.

Details · package.elm-lang.org's zip: https://github.com/gipsy-king/radar-chart/zipball/3.0.1/

RadarChart

Simple chart data

type alias DatumSeries =
{ color : String
, data : List Float
}

You can have multiple "series", or polygons, on one chart. The data list should be of same size as axis labels.

Show a radar chart

view : Options -> List (LabelMaker msg) -> List DatumSeries -> Svg msg

Render a radar chart with options, labels, and some values

defaultOptions : Options

Get a default options object.

simpleLabels : List String -> List (LabelMaker msg)

Default text labels, positioned conveniently

Customize chart a bit

type alias Options =
{ maximum : Maximum
, margin : Float
, strokeWidth : Float
, axisColor : String
, axisStyle : AxisStyle
, lineStyle : LineStyle
}

Chart options:

= Minimal
| Web Int

Axis style:

  • Minimal is just a line
  • Web count is a web with count "divisions"
= Empty
| Filled Float

The line style can be Empty (just lines) or Filled opacity (more like an area chart).

type Maximum
= FixedMax Float
| Infer

Fixed axis maximum or use highest data point of series

List a
-> (a -> List (Attribute msg) -> Svg msg)
-> List (LabelMaker msg)

Custom labels: use a list of anything, and a function that maps the elements together with position/alignment SVG attributes to Svg msg.

Customize chart labels completely

type alias LabelMaker msg =
Point -> TextAlign -> Svg msg

You can even completely make your own attributes and everything

type alias Point =
( Float, Float )

Point in SVG, suitable for x and y attributes of text

type alias TextAlign =
( String, String )

Text align is simply suitable values for dominant-baseline and text-anchor, respectively.